ordering edit inlines in admin

2008-10-21 Thread patrickk
does anyone know about a clean way to order edit-inlines using the admin-interface? 1. I´ve seen this and other javascript-based snippets: http://simonwillison.net/2008/Sep/13/django/ ... it´s quite simple, but it doesn´t really work. for example, if the formset isn´t valid, the order is lost. ev

Re: ordering edit inlines in admin

2008-10-22 Thread patrickk
just found this ticket (http://code.djangoproject.com/ticket/8165) which is probably the reason why (re-)ordering edit-inlines is so complicated. On Oct 21, 3:43 pm, patrickk <[EMAIL PROTECTED]> wrote: > does anyone know about a clean way to order edit-inlines using the > admin-inte

Re: Breaking up models into smaller files

2008-10-25 Thread patrickk
be aware that you also have to define app_label = "myapp" for every model when using the admin-interface. patrick. On Oct 25, 12:13 pm, TiNo <[EMAIL PROTECTED]> wrote: > They are just normal python files. So you could just create a 'models' > folder and within it an __init__.py. > so: > > - app

Re: order of apps in the admin panel

2008-10-25 Thread patrickk
unfortunately, I don´t think there is. stuff like this doesn´t seem to be important enough for the django developers. guess you just have to accept that (and shake your head). On Oct 25, 1:49 am, shacker <[EMAIL PROTECTED]> wrote: > > On Oct 13, 11:00 am, Vokial <[EMAIL PROTECTED]> wrote: > > >

Re: Breaking up models into smaller files

2008-10-25 Thread patrickk
t ... from myappname.models.model2 import ... and for model1 and model2 you have to define: class Meta: app_label = "myappname" patrick On 25 Okt., 14:02, "Low Kian Seong" <[EMAIL PROTECTED]> wrote: > How is the "app_label" used? Sparse documentation about th

Re: Splitting models.py won't install models

2008-10-28 Thread patrickk
you could try changing the import in __init__.py to someting like this: from app_name.models.model_file import Model1, Model2, ... e.g. from library.models.material import Material, MaterialImage ... might work. patrick. On 28 Okt., 10:36, Alistair Marshall <[EMAIL PROTECTED]> wrote: > I have

Re: Splitting models.py won't install models

2008-10-29 Thread patrickk
strange. I´m using this for one of my applications and it works fine. hers´s my setup: /library/ __init__.py admin.py views.py /models/ __init__.py addon.py camera.py material.py __init__.py (in the models-directory): from library.models.material

limit choices to logged-in user

2008-08-19 Thread patrickk
is there a way to limit choices (using foreign key) to the logged-in user? I´ve tried limit_choices_to = {'user': request.user}, but that is obviously not working since "request" is not available. any ideas? thanks, patrick --~--~-~--~~~---~--~~ You received thi

Re: limit choices to logged-in user

2008-08-19 Thread patrickk
functionality of the site. thanks, patrick On Aug 19, 5:48 pm, "Emily Rodgers" <[EMAIL PROTECTED]> wrote: > > -Original Message- > > From: django-users@googlegroups.com > > [mailto:[EMAIL PROTECTED] On Behalf Of patrickk > > Sent: 19 August 2008 14:12 > &g

Re: translating app name

2008-08-20 Thread patrickk
how? On Aug 15, 10:43 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > On Aug 15, 10:17 am, patrickk <[EMAIL PROTECTED]> wrote: > > > is there any possibility to translate the name of an application for > > the admin-interface? it´s a bit disturbing if every mode

Re: translating app name

2008-08-20 Thread patrickk
how do I provide the translations ... ??? On Aug 20, 3:33 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > On Aug 20, 8:43 am, patrickk <[EMAIL PROTECTED]> wrote: > > > how? > > You can see the following "blocktrans" fragment in django/con

formset and __init__

2008-08-20 Thread patrickk
my upload form looks like this: class UploadForm(forms.Form): def __init__(self, path_server, path, *args, **kwargs): self.path_server = path_server self.path = path super(UploadForm, self).__init__(*args, **kwargs) file = forms.FileField(label="File") use_im

Re: formset and __init__

2008-08-20 Thread patrickk
, Aug 20, 2008 at 9:10 AM, patrickk <[EMAIL PROTECTED]> wrote: > > > my upload form looks like this: > > > class UploadForm(forms.Form): > > >    def __init__(self, path_server, path, *args, **kwargs): > >        self.path_server = path_server > >        se

Re: formset and __init__

2008-08-20 Thread patrickk
thanks. and how do I pass these arguments within the view? UploadFormSet = formset_factory(form=UploadForm, formset=BaseUploadFormSet, extra=5, PATH_SERVER, path) ... or ... ??? On Aug 20, 5:52 pm, "Justin Fagnani" <[EMAIL PROTECTED]> wrote: > On Wed, Aug 20, 2008 at 8:34 A

Re: formset and __init__

2008-08-20 Thread patrickk
one last question: how do I pass the paramaters from the view to the form? thanks, patrick On Aug 20, 5:56 pm, "Brian Rosner" <[EMAIL PROTECTED]> wrote: > On Wed, Aug 20, 2008 at 9:34 AM, patrickk <[EMAIL PROTECTED]> wrote: > > > ok. I know how to use

Re: formset and __init__

2008-08-21 Thread patrickk
dumb here myself ... but I really don´t get it. thanks for your patience, patrick On Aug 20, 6:32 pm, "Justin Fagnani" <[EMAIL PROTECTED]> wrote: > On Wed, Aug 20, 2008 at 9:13 AM, patrickk <[EMAIL PROTECTED]> wrote: > > > one last question: how do I pass the

Re: formset and __init__

2008-08-21 Thread patrickk
n Thu, Aug 21, 2008 at 12:30 AM, patrickk <[EMAIL PROTECTED]> wrote: > > > I´m not sure (anymore) we´re all talking about the same issue. > > I think we are. I'll see if I can clarify... The broad idea is that > you pass the parameters to the formset in your view via a

Re: simple form question

2008-08-21 Thread patrickk
try this: form.save(commit=False) form.autor = request.user form.save() On Aug 21, 12:24 pm, "Genis Pujol Hamelink" <[EMAIL PROTECTED]> wrote: > Hello, > > I'm trying to pass a the id of the user logged in to a form field, but it > doesn't seem to work... any ideas / suggestions? > > Thanks in ad

Re: simple form question

2008-08-21 Thread patrickk
anks for your reply, > > save() got an unexpected keyword argument 'commit'  as I didn't define > commit in my save function... where did u get this commit=False from? > > Grtz, > > G. > > > > On Thu, Aug 21, 2008 at 12:41 PM, patrickk <[EMAIL PROTECT

Re: formset and __init__

2008-08-21 Thread patrickk
to be more precise: when I do "print form" in formsets.py in line 96, at the end of _construct_form, the form is there. but when trying to display the form(s) in the template, the formset is empty ... On Aug 21, 12:19 pm, patrickk <[EMAIL PROTECTED]> wrote: > thanks justin. &

Re: formset and __init__

2008-08-21 Thread patrickk
uct_forms. the print-statement at the end of _construct_form displays the form, but the print-statement in _construct_forms displays: [None, None, None, None, None]. On Aug 21, 1:36 pm, patrickk <[EMAIL PROTECTED]> wrote: > to be more precise: > when I do "print form" in form

Re: formset and __init__

2008-08-21 Thread patrickk
self.path_server = path_server self.path = path print self.path_server print self.path super(UploadForm, self).__init__(*args, **kwargs) ... define fields here ... On Aug 21, 2:30 pm, patrickk <[EMAIL PROTECTED]> wrote: > hmm, this is getting funn

Re: formset and __init__

2008-08-21 Thread patrickk
hehe :-) doesn´t work when data is posted: if request.method == 'POST': formset = UploadFormSet(path_server=PATH_SERVER, path=path, request.POST, request.FILES) error: __init__() got multiple values for keyword argument 'path' On Aug 21, 2:55 pm, patric

Re: formset and __init__

2008-08-21 Thread patrickk
ght be nice, but could be very > complicated. > > Another way to do this would be to create your formset, and then > iterate over formset.forms and set the attributes you need, and then > do what you need with the formset. > > -Justin > > On Thu, Aug 21, 2008 at

Re: complex forms validation logic?

2008-08-26 Thread patrickk
for having a custom error message for one of the fields (or both), use form.errors[key] = forms.util.ErrorList([_('Your error message.')]) within the clean() method. I haven´t tested it, but it should work. be aware that "raise forms.ValidationError(_('Your error message.'))" is only tied to a sp

Re: limiting choices in admin.ModelAdmin based on request.user

2008-08-26 Thread patrickk
can someone provide an example for this? moreover, how is it possible to limit choices on a website (not using ModelAdmin)? thanks, patrick On Aug 25, 9:35 am, krylatij <[EMAIL PROTECTED]> wrote: > > There is no longer any reason whatsoever to use this in any way in the > > admin. It was an ug

formset issue

2008-08-26 Thread patrickk
scenario: users are uploading documents (e.g. images, files, ...). these documents are saved in a model "Attachment" assigned to the currently logged-in "User". now, every user has the possibility to attach documents to a blog-entry. these attachments are saved in a model "BlogEntryAttachment" ass

Re: formset issue

2008-08-27 Thread patrickk
anyone? On Aug 26, 12:19 pm, patrickk <[EMAIL PROTECTED]> wrote: > scenario: users are uploading documents (e.g. images, files, ...). > these documents are saved in a model "Attachment" assigned to the > currently logged-in "User". now, every user has the pos

custom field: clean-method not called ...

2008-08-27 Thread patrickk
I´m just trying to write a custom field for the django filebrowser (a filebrowsefield). the __init__ method of the form-field is called, but the clean method is not ... instead the clean method of forms.CharField is called, which is strange, because a) I´ve made a model field (FileBrowseField) wit

Re: custom field: clean-method not called ...

2008-08-27 Thread patrickk
ah, thanks a lot. this is it ... defaults = {'max_length': self.max_length} defaults['form_class'] = FileBrowseFormField defaults['widget'] = FileBrowseWidget(attrs=attrs) patrick. On Aug 27, 11:11 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On W

Re: inlineformset_factory

2008-08-30 Thread patrickk
here (http://dpaste.com/71450/) is an example for using inlineformset_factory (see better_author_edit). don´t know if this is much help though. maybe you can post your exact error-message. patrick. On Aug 30, 12:09 am, cmiller <[EMAIL PROTECTED]> wrote: > Hi All, > > I have been hitting my head

Re: Question about "Writing your first Django app, part 1"

2008-08-31 Thread patrickk
c = Choice.objects.filter(choice__startswith='Just') results in a queryset (not a single object). you could do: for obj in c: obj.poll you have to loop through the items/objects of the queryset, before getting the related poll-object. btw: c[0].poll should also work. On Aug 31, 12:15 pm,

Re: formset issue

2008-08-31 Thread patrickk
, but it´s also not possible to limit the basic queryset to the current user. so - before going back to pure forms and re-writing the main part of my application, I´m just asking this question for the last time ... thanks, patrick On Aug 27, 9:04 am, patrickk <[EMAIL PROTECTED]> wrote: >

Re: formset issue

2008-09-01 Thread patrickk
obably not the best thing to do though. On Aug 31, 4:35 pm, patrickk <[EMAIL PROTECTED]> wrote: > sorry for being so annoying with this issue, but I´m asking this one > more time. > > - with using inlineformset_factory, my problem is that limiting the > choices to the currently

threadlocals: hack or best practice?

2008-09-01 Thread patrickk
http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser using threadlocals has been considered a "hack" recently by one of the main django-developers (james bennett, see http://groups.google.com/group/django-users/browse_frm/thread/f5b2b7775d7c7422/). on the other hand, writing a custom ma

Re: formset issue

2008-09-01 Thread patrickk
... thanks, patrick On Sep 1, 1:51 pm, koenb <[EMAIL PROTECTED]> wrote: > I have not tried this, but can't you just in your view instantiate the > formset and then loop over the forms and set the queryset on your > field ? > > Koen > > On 1 sep, 09:24, patrickk <[EMA

Re: threadlocals: hack or best practice?

2008-09-02 Thread patrickk
... however, thanks a lot. patrick. On Sep 1, 7:15 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2008-09-01 at 00:33 -0700, patrickk wrote: > >http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser > > > using threadlocals has been considered a "hack&quo

Re: formset issue

2008-09-02 Thread patrickk
 pm, koenb <[EMAIL PROTECTED]> wrote: > Are you sure the data will be retrieved twice ? I thought those > queryset definitions were lazy, so they are only executed when the > widgets are rendered. > Hmm, I'll try that out some time to check. > > Koen > > On 1 s

Re: Trivial question about instances forms

2008-09-03 Thread patrickk
you´re obviously using an older django-version. is there a (good) reason for not upgrading? On Sep 3, 4:05 pm, Denis Frère <[EMAIL PROTECTED]> wrote: > On Sep 3, 12:52 pm, "Denis Frère" <[EMAIL PROTECTED]> wrote: > > > Hello, > > > It should be trivial to most of you... > > > When I create an in

admin changelist: how to display selected filter (in the headline)

2008-09-10 Thread patrickk
when selecting a filter in the admin changelist, is it possible to show that selected filter (e.g. in the headline)? when you have lots of filters on the right hand side of the changelist, it´s really hard to find out which filter is selected (you may have to scroll down). so, instead of the head

Re: django-projekt - vcs - media folder

2008-09-15 Thread patrickk
our environment looks like this: all media-files uploaded with the admin-interface are in /media/ uploads/. this directory is not under version control. here´s the basic structure: /media/admin/ (not under vcs) /media/site/ (these files are in our repository, but never uploaded with the admin-int

Re: django-projekt - vcs - media folder

2008-09-15 Thread patrickk
AIL PROTECTED]> wrote: > Just curious, maybe I'm missing something: why do you not keep your / > media/admin/ files under version control? > > Erik > > On 15.09.2008, at 19:26, patrickk wrote: > > > > > our environment looks like this: > > all media-fil

admin inline formsets / drag/drop resp. move-up/down / how to retrieve "order_with_respect_to"?

2008-10-10 Thread patrickk
I like to implement drag/drop functionality resp. move-up/move-down buttons for inline-elements within the admin-interface. therefore, in tabular.html/stacked.html I need to know whether or not "order_with_respect_to" is being used for that model - if yes, the buttons will be available - if not, t

Re: FileBrowser: Easy access to generated images from the template?

2009-01-19 Thread patrickk
you could either use a templatetag or a custom-method. that said, we are just working on integrating this with the filebrowse- field. so, if you wait a couple of days it´ll be there. here´s more information: http://code.google.com/p/django-filebrowser/issues/detail?id=63 patrick. On Jan 18,

Re: File Browser App

2009-02-17 Thread patrickk
of course you can install the django-filebrowser outside of the admin ... it´s basically a standalone-app with the look and feel of the admin-interface. so, you just have to change the templates and maybe the permissions. patrick. On Feb 3, 1:38 pm, cootetom wrote: > Hi all, > > I'm looking for

Re: Filebrowser No thumbnail generation

2009-02-21 Thread patrickk
could you be a bit more specific? what exactly works? what not? it seems that you can upload an image but the thumbnail is not created. do you mean the actual "thumbnail" or one of the image- versions named "thumbnail"? patrick On Feb 21, 11:50 am, leau2001 wrote: > Hi, > > I try to  use file

Re: Filebrowser No thumbnail generation

2009-02-22 Thread patrickk
there has never an issue/ticket posted about this (on the google-code page of the filebrowser), so I guess there´s something wrong with your configuration/setup ... you could try to debug by using print- statements within the image-generator function. On Feb 22, 8:02 am, leau2001 wrote: > Patr

translating app name ... again

2009-03-04 Thread patrickk
so far, it doesn´t seem possible to translate the app-names within the admin-interface, which results in a strange index-site with mixed languages. any updates on this issue? any ideas? thanks, patrick --~--~-~--~~~---~--~~ You received this message because you

Re: translating app name ... again

2009-03-04 Thread patrickk
ation-file (django.po, django.mo), but that doesn´t work. probably because I´m missing that "file" you´re talking about. thanks, patrick On Mar 5, 2:51 am, Malcolm Tredinnick wrote: > On Wed, 2009-03-04 at 09:39 -0800, patrickk wrote: > > so far, it doesn´t seem possible to trans

Re: translating app name ... again

2009-03-04 Thread patrickk
just tried to write the app-names to my applications __init__-file. the po-file is generated fine, but the translation still doesn´t work. On Mar 5, 8:30 am, patrickk wrote: > great - a gleam of hope ... but what do you mean with "put each of > your app names into a file ..."?

Re: translating app name ... again

2009-03-05 Thread patrickk
(even if you do speak english, "auth" is not very descriptive). thanks, patrick On 5 Mrz., 10:23, Malcolm Tredinnick wrote: > On Wed, 2009-03-04 at 23:30 -0800, patrickk wrote: > > great - a gleam of hope ... but what do you mean with "put each of > > your app nam

Re: translating app name ... again

2009-03-06 Thread patrickk
r app name in admin panel > > i think u can use > > *USE_I18N = True > > in settings.py* > >  and > >    * class Meta: >         verbose_name_plural = "Your App Name" > > in models.py* > > try it and write me answer please > > 2009/3/4

Re: translating app name ... again

2009-03-06 Thread patrickk
label|capfirst }} with {% trans app_label %} 5. change breadcrumbs in change_form.html /// on line 28 replace { app_label|capfirst }} with {% trans app_label %} 6. change app-names in app_index.html /// on line 11 replace {% blocktrans with app.name as name %}{{ name }}{% endblocktrans %

self.content_type within __unicode__ ???

2009-03-11 Thread patrickk
when using "self.content_type" within "__unicode__" on one of my models, I´m not getting the right ContentType. instead of getting the reference to _another_ model, I´m always getting the current model. an example: class ContainerListItem(models.Model): containerlist = models.ForeignKey(Cont

Re: self.content_type within __unicode__ ???

2009-03-11 Thread patrickk
I´ve figured out that this seems to be a bug with edit_inline. patrick. On 11 Mrz., 13:46, patrickk wrote: > when using "self.content_type" within "__unicode__" on one of my > models, I´m not getting the right ContentType. instead of getting the > reference t

Re: self.content_type within __unicode__ ???

2009-03-11 Thread patrickk
just for the record, this is the ticket: http://code.djangoproject.com/ticket/9362 it´s been opened 5 months ago ... On 11 Mrz., 15:07, patrickk wrote: > I´ve figured out that this seems to be a bug with edit_inline. > > patrick. > > On 11 Mrz., 13:46, patrickk wrote: &

admin: search generic relation?

2009-03-19 Thread patrickk
is there any way to search for a "content_object" within the change- list? my model: class Trailer(models.Model): ... content_type = models.ForeignKey(ContentType) object_id = models.PositiveIntegerField() content_object = generic.GenericForeignKey() ... now, I´d like to do

Re: admin: search generic relation?

2009-03-19 Thread patrickk
hmmm, what about defining a custom search_method? is that possible? maybe with using a Custom Manager? On 19 Mrz., 19:59, Alex Gaynor wrote: > On Thu, Mar 19, 2009 at 12:37 PM, patrickk wrote: > > > is there any way to search for a "content_object" within the change- &g

how to run just ONE test?

2009-06-22 Thread patrickk
this is the first time I´m using the test-framework, so it might be a really stupid question. when using python manage.py test myapp or python manage.py test myapp.BaseTest I´m getting lots of output for other apps than "myapp" - it seems that tests are running for every installed app (and not ju

Re: how to run just ONE test?

2009-06-22 Thread patrickk
that´s it. thanks a lot. On 22 Jun., 13:28, Russell Keith-Magee wrote: > On Mon, Jun 22, 2009 at 6:42 PM, patrickk wrote: > > > this is the first time I´m using the test-framework, so it might be a > > really stupid question. > > > when using > > python manag

Re: how to run just ONE test?

2009-06-22 Thread patrickk
performed. btw, models.py is empty (I don´t need that file for my app). thanks, patrick On 22 Jun., 13:55, patrickk wrote: > that´s it. thanks a lot. > > On 22 Jun., 13:28, Russell Keith-Magee wrote: > > > On Mon, Jun 22, 2009 at 6:42 PM, patrickk wrote: > > > > th

Re: how to run just ONE test?

2009-06-22 Thread patrickk
another note: it doesn´t matter if I restrict the tests to "myapp" or any other app (e.g. "tagging" or "sorl-thumbnail") I´ve installed. with every test, all tables are created/removed. On 22 Jun., 14:50, patrickk wrote: > unfortunately, I´m still stuck w

problem with mod_wsgi and integrated devserver

2009-06-23 Thread patrickk
we have our dedicated webserver setup with django & mod_wsgi, where everything works fine. but: when I start the devserver, the templates and mediafiles are not there ... if I start the integrated devserver with: --adminmedia = /path/to/admin/media/ and if I add: "/var/www/myserver/django_src/dja

Re: how to run just ONE test?

2009-06-24 Thread patrickk
explain the problem very well. thanks a lot for your effort and patience, patrick On Jun 24, 9:45 am, Russell Keith-Magee wrote: > On Mon, Jun 22, 2009 at 8:50 PM, patrickk wrote: > > > unfortunately, I´m still stuck with it ... > > > here´s my tests.py: > &g

Re: how to run just ONE test?

2009-06-24 Thread patrickk
statements are not related to the app I´m actually testing. thanks, patrick On Jun 24, 11:28 am, Kenneth Gonsalves wrote: > On Wednesday 24 June 2009 14:47:05 patrickk wrote: > > > just to avoid any misunderstanding: > > when I´m running one test with "... test > > m

Re: how to run just ONE test?

2009-06-24 Thread patrickk
I see. your foreign key example makes things much clearer to me. sorry for not being clear enough about the issue with my first question. thanks a lot, patrick On Jun 24, 12:47 pm, Russell Keith-Magee wrote: > On Wed, Jun 24, 2009 at 5:17 PM, patrickk wrote: > > > just

Re: Forms __init__ : use of **kwargs

2009-06-29 Thread patrickk
I´m also interested in this question/answer - since the documentation about forms lack more complex examples, form/formset-definitions are a guessing game at times. not a huge problem though, because with some experience and lots of research it´s (more or less) working. but what´s "best practice"

Re: Setting up TinyMCE with django-grappelli?

2009-06-29 Thread patrickk
hi chris, the question about tinymce is answered/discussed at the grappelli google-code issue-list. you might want to ask your question about the filebrowser setup at the filebrowser google-group: http://groups.google.com/group/djangofilebrowser please not that you should give more details. you

Re: Learning curve toward build reasonable webpage for a newbie

2009-07-02 Thread patrickk
IMHO, you´re mixing things up here. django helps you with the structure of your app, the database access/ retrieval, the _logic_ of your application. this has nothing to do with UI design. django neither limits nor helps you with actually _designing_ your so-called frontend. that said, django ha

Re: Admin page set up.

2009-07-02 Thread patrickk
you have defined it in urls.py ... with (r'^admin/(.*)', admin.site.root), your URL is http://server-name:1020/admin/ after adding 'django.contrib.admin' to your INSTALLED_APPS you have sync the database, of course: python mangage.py syncdb regards, patrick On 2 Jul., 15:13, kamal sharma wrot

Re: Admin page set up.

2009-07-02 Thread patrickk
not found on this server > > Thanks, > Pankaj > > On Thu, Jul 2, 2009 at 8:00 PM, patrickk wrote: > > > you have defined it in urls.py ... with > > (r'^admin/(.*)', admin.site.root), > > your URL is > >http://server-name:1020/admin/ > > > a

Re: Admin page set up.

2009-07-02 Thread patrickk
ontrib.admin.urls')), >     #  (r'^admin/', include(admin.site.urls)), >        (r'^admin/(.*)', admin.site.root), > > But not able to find what I am missing. How do I get the admin login page? > > Thanks, > Damudar > > On Thu, Jul 2, 2009 at 8:38 P

Re: Admin page set up.

2009-07-02 Thread patrickk
o we have other better doc for admin page set up? > > On Thu, Jul 2, 2009 at 9:19 PM, patrickk wrote: > > > your admin-url has NO relation whatsoever to the name of your project > > or app. > > > IMHO, you should try to understand how the url-configuration works in > &g

Re: inlineformset delete on empty revisited

2009-07-11 Thread patrickk
maybe this helps (well ... it probably doesn´t help, but it maybe clarifies): http://code.djangoproject.com/ticket/10828 regards, patrick On 11 Jul., 08:11, nbv4 wrote: > http://pastebin.com/f40a3bde9 > > I found this little snippet on this group and am trying to get it to > work on my model, b

ANN: FileBrowser 3.0 Pre-Release

2009-07-18 Thread patrickk
The first pre-release of FileBrowser 3 is out now. The Source is currently available as a Branch: http://code.google.com/p/django-filebrowser/source/browse/#svn/branches/filebrowser_3/filebrowser Please read the Documentation, because a lot has changed: http://code.google.com/p/django-filebrowse

ANN: Grappelli 2.0 prerelease

2009-08-14 Thread patrickk
The prerelease of Grappelli 2 is out now. –Screenshots http://code.google.com/p/django-grappelli/wiki/screenshots –Source The Source is currently available in /branches/grappelli_2/. Please read the Documentation for Installtion & Setup: http://code.google.com/p/django-grappelli/wiki/Grappelli_2

/// job offer: django-webdeveloper in vienna/austria

2009-08-24 Thread patrickk
I hope that this doesn´t violate any group-rules ... * * * * * * * * * * vonautomatisch is looking for a webdeveloper having profound knowledge and experience with django/python/html/css/javascript. – scope of work in collaboration with the concept- and graphics-department, you have to accompli

Re: Many-to-many column admin interface

2009-08-28 Thread patrickk
I could be mistaken ... but why not using a third model. C(models.model): a = models.ForeignKey('A') b = models.ForeignKey('B') when editing either A or B, you could use C as inlines. regards, patrick On 28 Aug., 17:18, Sven Richter wrote: > But i wonder how this would help me further.

Re: Renaming displayed django application name in admin

2009-09-01 Thread patrickk
I don´t think it´s possible to change an app-name. you can change the name of the models though. regards, patrick On 1 Sep., 10:50, Joshua Russo wrote: > On Tue, Sep 1, 2009 at 1:10 AM, Joshua Partogi > wrote: > > > Dear all, > > How do we change the displayed application name in django admin

admin & edit-inlines: how to get ordered_forms in case of error?

2009-04-06 Thread patrickk
let´s say I´m having inlines with a field "pub_date" and the ordering is set to pub_date. in the admin-interface, I´m changing the pub_date for several fields/inlines and trying to save. if there are no errors, everyting´s fine. however, if there are errors (somewhere on the page and not necessari

Re: admin & edit-inlines: how to get ordered_forms in case of error?

2009-04-07 Thread patrickk
just for the record: http://code.djangoproject.com/ticket/8165 guess this makes (re)ordering of edit-inlines impossible for now (at least if one wants to preserve the ordering in case of errors). thanks, patrick On 6 Apr., 16:21, patrickk wrote: > let´s say I´m having inlines with a fi

adminsite instance and (registered) related objects question

2009-04-09 Thread patrickk
I´ve recently figured out that if you use different adminsite instances, you have to register every related model with every instance. giving an example: /admin/ ... autodiscover /configuration_admin/ ... config stuff /main_admin/ ... stuff important for editors (e.g. including the model "Movie")

Re: Generating USER documentation?

2009-04-10 Thread patrickk
something like this is included with grappelli, see http://code.google.com/p/django-grappelli/ patrick On 10 Apr., 16:28, "bax...@gretschpages.com" wrote: > What I'm after is documentation for the admin users, similar to the > generated documentation, only less technical. A simple how-to for >

Re: adminsite instance and (registered) related objects question

2009-04-10 Thread patrickk
anyone? I´m not sure whether or not to open a ticket on this issue. It could be "solved" with a better explanation in the docs. Question is: Is this a "bug" or is the documentation incomplete/ inexplicit? thanks, patrick On Apr 9, 9:50 am, patrickk wrote: > I´ve recen

Re: adminsite instance and (registered) related objects question

2009-04-10 Thread patrickk
On Apr 11, 6:03 am, Malcolm Tredinnick wrote: > On Fri, 2009-04-10 at 20:17 -0700, patrickk wrote: > > anyone? > > *sigh* If somebody had an answer, they would have answered already. It's > kind of self-fulfilling prophecy! your answer shows that it´s someti

Re: django-grappelli setup problem

2009-04-15 Thread patrickk
which URL causes that error? please note that in order to use grappelli you have to setup the admin- site before, see http://docs.djangoproject.com/en/dev/ref/contrib/admin/#ref-contrib-admin. maybe this should be mentioned in the docs, but I guess it´s pretty obvious. patrick. On Apr 14, 8:3

Re: Two projects, one admin, filebrowser

2009-04-15 Thread patrickk
although I don´t fully understand the problem, there seem to be different solutions: ### when using the filebrowsefield, you could also write a custom model method to get the different URLs. ### if your intranet-site and your public-site are on the same server you could maybe use a symlink as wel

Re: django-grappelli setup problem

2009-04-15 Thread patrickk
in order to use the admin, just use /admin/ (grappelli doesn´t change the admin-urls). patrick On 15 Apr., 10:06, Lars Stavholm wrote: > patrickk wrote: > > which URL causes that error? > > http://localhost:8000/grappelli/admin/ > > > please note that in order to u

Re: django-grappelli setup problem

2009-04-15 Thread patrickk
tested this locally, so I´m not sure if that can cause the error (we´re having test/development-servers to do this). if you dig a little depper and you think you´ve found a bug - then please report it using the google-code issue tracker. patrick On 15 Apr., 20:14, Lars Stavholm wrote: > patri

how to require/validate minimum number of forms in formset?

2009-04-15 Thread patrickk
I´m allowing the forms within a formset to be deleted. but I need at least one form to save the formset. is it possible to require at least one form? if yes, how do I achieve this? thanks, patrick --~--~-~--~~~---~--~~ You received this message because you are subs

Re: how to require/validate minimum number of forms in formset?

2009-04-15 Thread patrickk
resp. the number of delete forms here. or is this approach the wrong way? thanks, patrick On 15 Apr., 21:03, patrickk wrote: > I´m allowing the forms within a formset to be deleted. but I need at > least one form to save the formset. is it possible to require at least > one form? if ye

Re: how to require/validate minimum number of forms in formset?

2009-04-15 Thread patrickk
this is strange (at least to me), but the clean-method doesn´t seem to be called when _all_ forms are marked for deletion. patrick On 15 Apr., 22:05, patrickk wrote: > to be more precise: > > class AmountBaseFormset(formsets.BaseFormSet): > >     def clean(self): >      

Re: django-grappelli setup problem

2009-04-16 Thread patrickk
ht now and I'm not sure what to do about it. The recommended > fixtures are loaded. > > Any ideas anyone? > /L > > Lars Stavholm wrote: > > patrickk wrote: > >> line 53 of base.html is {% get_help request.path %}. > > >> I´m not exactly sure what´s ha

Re: django-grappelli setup problem

2009-04-16 Thread patrickk
;, to your template context processors. however, I´ll take another look at that in order to simplify. thanks, patrick On 16 Apr., 21:44, Lars Stavholm wrote: > patrickk wrote: > > it´s really easy to debug here: > > line 60 of index.html is {% get_navigation request.user %}.

Re: django-grappelli setup problem

2009-04-17 Thread patrickk
ick On Apr 17, 8:18 am, Lars Stavholm wrote: > patrickk wrote: > > I´m working with the request-context-processor. I´ll change that for > > the user (because the auth-processor is required for the admin > > anyway). nevertheless, without the request-processor, bookmark

Re: django-filebrowser

2009-04-26 Thread patrickk
there´s something wrong with your setup. please take a look at the "available settings" and change stuff accordingly. when I´m having an error like this, it looks like: OSError: [Errno 2] No such file or directory: '/srv/www/media/ auto_media/uploads/xxx/' since there´s no path in your error mes

Re: how to require/validate minimum number of forms in formset?

2009-04-30 Thread patrickk
., 22:34, patrickk wrote: > this is strange (at least to me), but the clean-method doesn´t seem to > be called when _all_ forms are marked for deletion. > > patrick > > On 15 Apr., 22:05, patrickk wrote: > > > to be more precise: > > > class AmountBaseFormset(

Re: djangotiny and filebrowser question

2009-05-16 Thread patrickk
using the filebrowser outside the admin is easy: just change the templates/stylesheets and remove the staff member decorator. besides that, you may want to add/remove some functionality. we used the filebrowser for a public blog-system about 2 years ago. unfortunately, that site doesn´t exist any

Re: FileBrowser: Models for media

2009-05-21 Thread patrickk
I´d use a slightly different approach: class Course(models.Model): name = ... class Material(models.Model): course = models.ForeignKey(Course) media = FileBrowseField(max_length=200, blank=True, null=True) order = models.PositiveIntegerField("Order", blank=True, null=True) the p

Re: FileBrowser: Models for media

2009-05-21 Thread patrickk
er change you made was to replace the ManyToMany on Course with a > Foreign key to Course from Material. > Could you explain the benefit of that? > > On May 21, 4:36 am, patrickk wrote: > > > I´d use a slightly different approach: > > > class Course(models.Mode

  1   2   3   4   >