Re: Better error message for django.core.urlresolvers.reverse
Hi Tom, currently it seems that the url resolver that is actually raising the error doesn't know about in which namespace he acts. However I think as well that this might be a usefull addition to the error message. I would suggest adding a ticket to django's bugtracker [1] for this. Ideally write a patch for this issue and attach it to the ticket. [1] https://code.djangoproject.com/ -- Servus, Gregor Müllegger 2011/6/9 tomv : > Hi, > > This is the current error message when a url name or argument doesn't > exist: > reverse('core:non_existant') > NoReverseMatch: Reverse for 'non_existant' with arguments '()' and > keyword arguments '{}' not found. > > Is there support for adding the namespace into the error message? > > Tom > > -- > You received this message because you are subscribed to the Google Groups > "Django developers" group. > To post to this group, send email to django-developers@googlegroups.com. > To unsubscribe from this group, send email to > django-developers+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-developers?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.
Undocumented feature for INSTALLED_APPS settings
Hi, I've read source code for django.conf package and as of Django 1.3 INSTALLED_APPS can accept wildcards for application names (e.g. django.contrib.*). It seems that the official documentation doesn't mention it in the Available Settings section. Am I wrong? -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.
Re: Undocumented feature for INSTALLED_APPS settings
Hello, I checked the SVN history. This "feature" was never documented, even before the reorganization at r8506. It appears in django/conf/__init__.py when magic-removal is merged (r2809). We just discussed it on IRC, and the consensus is that it dates back to before Django was open-sourced. It was probably only used at World Online. In my opinion, it's an anti-feature: 1 - It's un-pythonic: in essence, it's equivalent to an filesystem-based implementation of "from import *", which was not rejected in Python for a good reason [1] 2 - like "from import *", it's not explicit, 3 - you don't add apps to your settings file every day, so there's little to gain. I think it should be deprecated; since it was never documented, we could even remove it outright. Best regards, -- Aymeric Augustin. [1] http://www.python.org/doc/essays/packages.html - section "Importing * From a Package" On 12 juin 2011, at 19:38, Francesco Mari wrote: > Hi, > > I've read source code for django.conf package and as of Django 1.3 > INSTALLED_APPS can accept wildcards for application names (e.g. > django.contrib.*). It seems that the official documentation doesn't > mention it in the Available Settings section. > > Am I wrong? > > -- > You received this message because you are subscribed to the Google Groups > "Django developers" group. > To post to this group, send email to django-developers@googlegroups.com. > To unsubscribe from this group, send email to > django-developers+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-developers?hl=en. > -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.
Re: Undocumented feature for INSTALLED_APPS settings
On 12 juin 2011, at 22:35, Aymeric Augustin wrote: > Hello, > > I checked the SVN history. This "feature" was never documented, even before > the reorganization at r8506. It appears in django/conf/__init__.py when > magic-removal is merged (r2809). > > We just discussed it on IRC, and the consensus is that it dates back to > before Django was open-sourced. It was probably only used at World Online. > > In my opinion, it's an anti-feature: > 1 - It's un-pythonic: in essence, it's equivalent to an > filesystem-based implementation of "from import *", which was not > rejected in Python for a good reason [1] Argh! I wanted to write: "which was rejected in Python for a good reason" > 2 - like "from import *", it's not explicit, > 3 - you don't add apps to your settings file every day, so there's > little to gain. > > I think it should be deprecated; since it was never documented, we could even > remove it outright. > > Best regards, > > -- > Aymeric Augustin. > > [1] http://www.python.org/doc/essays/packages.html - section "Importing * > From a Package" > > On 12 juin 2011, at 19:38, Francesco Mari wrote: > >> Hi, >> >> I've read source code for django.conf package and as of Django 1.3 >> INSTALLED_APPS can accept wildcards for application names (e.g. >> django.contrib.*). It seems that the official documentation doesn't >> mention it in the Available Settings section. >> >> Am I wrong? >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django developers" group. >> To post to this group, send email to django-developers@googlegroups.com. >> To unsubscribe from this group, send email to >> django-developers+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/django-developers?hl=en. >> > -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.
What should be a forms.py and views.py be like for a template that has radio buttons ?
My template has radio buttons . I would like to know what exactly be there in forms.py to render this template in the views ? This is my tempalte Username: Who can view the data Any registered users Only users that can edit Who can edit the data Any registered user Only the following users -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.
Ability to change dismissRelatedLookupPopup on my own callback function
Hi all! I make integration with warehouse system and want to reuse existing functionality in django.contrib.admin to manage links between this system and catalog on site. I can't get access to warehouse system database, I have only export file. I write some views to represent its items in django admin. And now I need something like related field in django admin forms, but has some filters applied to changelist and has some other user interface. I think, the best solution for this case is put some links with showRelatedObjectLookupPopup javascript function on admin changelist, but after user choose the object, my own javascript function must be called instead of dismissRelatedLookupPopup javascript function. Execution of dismissRelatedLookupPopup is hard coded in python code now. The easiest way to implement use case described higher is adding new GET argument "_callback" to changelist view. What are you think about this? If this solution was accepted I can write patch and tests for it. Cheers! -- Alex Kamedov skype: kamedovwww: kamedov.ru -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.
Re: What should be a forms.py and views.py be like for a template that has radio buttons ?
Please ask questions about using Django on django-users. The topic of this list is development of Django itself. Karen -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.