ModelAdmin not allowing dynamic fields to be set in __init__. Is it intended behavior?

2011-11-16 Thread Jyrki Pulliainen
Hi all, I discovered yesterday that ModelAdmin does not display fields set in the __init__ of the custom form. This is due to django.contrib.admin.ModelAdmin.get_fieldsets only looking at the base_field variable of the form *class' instead of the form instance. This can be circumvented with a

Re: load template tag library

2011-11-16 Thread Stephen Burrows
I second what Luke and Russ have already said. If what you're interested in is a way to securely allow users to enter template code into the database, you can just write a custom field that validates its input for security problems. Here's a third-party implementation of a validator for such a

Re: Can we drop Oracle 9 support?

2011-11-16 Thread Ian Kelly
On Wed, Nov 16, 2011 at 4:55 PM, Shai Berger wrote: > Hi, > > Oracle 10 has been released in 2003 -- the same year as Python 2.3, which is > no longer supported by Django. > > Oracle 9 is essentially end-of-life'd -- Oracle will not provide patches for > it, even for critical

Re: load template tag library

2011-11-16 Thread Russell Keith-Magee
On Wed, Nov 16, 2011 at 5:12 PM, Roald wrote: > Hi all, > > Can anybody explain why template tag libraries are loaded from > *inside* a template? The more I work with them, the more I get the > feeling that specifying which template tags are available in a > template should be

Can we drop Oracle 9 support?

2011-11-16 Thread Shai Berger
Hi, Oracle 10 has been released in 2003 -- the same year as Python 2.3, which is no longer supported by Django. Oracle 9 is essentially end-of-life'd -- Oracle will not provide patches for it, even for critical bugs, and even if you pay extra. This is since July 2010, according to

Re: add view_permission

2011-11-16 Thread Ric
ok this is my last message, i swear! i've created a new options.py file and a .diff, and i've attached it to the ticket you send to me. i've tested it and it works, it's pretty basic and there is more work to do. what i've done is to add a method has_view_permission, and check a view

Re: load template tag library

2011-11-16 Thread Luke Plant
On 16/11/11 09:12, Roald wrote: > Hi all, > > Can anybody explain why template tag libraries are loaded from > *inside* a template? The more I work with them, the more I get the > feeling that specifying which template tags are available in a > template should be specified in the view-code (or

Re: add view_permission

2011-11-16 Thread Ric
fine i'll keep in mind. On 16 Nov, 22:17, Aymeric Augustin wrote: > Hi Ric, > > I've noticed that you're posting a lot on this mailing list. Please remember > that each email sent here is broadcasted to around 7000 people, each of whom > will need a few

Re: add view_permission

2011-11-16 Thread Aymeric Augustin
Hi Ric, I've noticed that you're posting a lot on this mailing list. Please remember that each email sent here is broadcasted to around 7000 people, each of whom will need a few seconds to decide if it's interesting. You're expected to do some research and to structure your thoughts and

Re: load template tag library

2011-11-16 Thread Roald
On Nov 16, 8:40 pm, ptone wrote: > On Nov 16, 1:12 am, Roald wrote: > > > Hi all, > > > Can anybody explain why template tag libraries are loaded from > > *inside* a template? The more I work with them, the more I get the > > feeling that specifying which

Re: add view_permission

2011-11-16 Thread Ric
at a first look, the big file to patch is django.contrib.admin.options i need also to add a method to django.db.models.options def get_view_permission(self): return 'view_%s' % self.object_name.lower() so maybe it's better to work only on options.py and make a .diff, right? On 16 Nov,

Re: add view_permission

2011-11-16 Thread Ric
ok i can give a try... maybe it's difficult, not to much. i have to see inline models, and give the right behavior so from github i can fork django 1.3.1, but actually i'm working with the latest version. should i fork the lastest? On 16 Nov, 20:21, Aymeric Augustin

Re: load template tag library

2011-11-16 Thread ptone
On Nov 16, 1:12 am, Roald wrote: > Hi all, > > Can anybody explain why template tag libraries are loaded from > *inside* a template? The more I work with them, the more I get the > feeling that specifying which template tags are available in a > template should be specified

Re: Error in formfield in django.db.models.field

2011-11-16 Thread Ric
should i have to open a ticket? On 14 Nov, 23:19, Ric wrote: > form_class is not in kwargs if the method is declared like this > > def formfield(self, form_class=forms.CharField, **kwargs): > > a possible solution is to use a code like this > > def formfield(self,

Re: add view_permission

2011-11-16 Thread Aymeric Augustin
Hi Ric, This feature request is quite common, and it's tracked here: https://code.djangoproject.com/ticket/8936 A few people talked to me since I wrote the GSoC project description linked in comment #5, but I don't think anyone is actively working on this. Since we deprecated databrowse, the

Re: add view_permission

2011-11-16 Thread Ric
yes i would use it too, because i've got a lot of models with a view permission to the final user but with no change permission. it could be archived with backward compatibility, because by default a user has got no view permission view permission can be added with a syncdb, and user must add

Re: add view_permission

2011-11-16 Thread Bradley Ayers
I would benefit from this. With administration systems I build with Django I generally have to add my own 'view_foo' permission to each model. +1 On 17/11/2011, at 2:47 AM, Ric wrote: > i've been thinking about a new django admin feature, that could be > backward implemented > > it's about

Re: Forbiden 403 error

2011-11-16 Thread Justin Holmes
Hello there. You've posted to django-developers which is a mailing list of development of the django project itself. For help using django, please post to django-users. On Wed, Nov 16, 2011 at 1:25 PM, Djano_newb wrote: > > I am new to both python and Django but I have

Forbiden 403 error

2011-11-16 Thread Djano_newb
I am new to both python and Django but I have been programming for more than 20 years so I am teaching myself this stuff. I came across an old training video that I have been going through. This training has you develop a website that can create web pages. I got everything right so far but I

add view_permission

2011-11-16 Thread Ric
i've been thinking about a new django admin feature, that could be backward implemented it's about adding a view permission for models so we can have 1.change_permission 2.delete_permission 3.add_permission and 4.view_permission in the changelist_view view_permission allow user to see the

Re: mark_safe(media) in django admin

2011-11-16 Thread Ric
i've created a ticket https://code.djangoproject.com/ticket/17239 sorry but i'm new, i'would like to contribute. let me know if it's fine. On 15 Nov, 07:02, Aymeric Augustin wrote: > On 14 nov. 2011, at 23:15, Ric wrote: > > > a minor bug in django admin. >

load template tag library

2011-11-16 Thread Roald
Hi all, Can anybody explain why template tag libraries are loaded from *inside* a template? The more I work with them, the more I get the feeling that specifying which template tags are available in a template should be specified in the view-code (or more general: the thing that loads/renders the