Re: django.core.urlresolvers.reverse capturing group before include behavior

2011-07-18 Thread Squeesh
Both* -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/9r8bIyO8WyUJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from

Re: django.core.urlresolvers.reverse capturing group before include behavior

2011-07-18 Thread Squeesh
Thanks Chang.Jian, Goth test_url = reverse('test.views.index', args=['slug']) and test_url = reverse('test.views.index', kwargs={'some_slug': 'slug'}) work as expected... reverse('test:index', args=['slug']) would be the desired syntax, but the other will work fine as a work around. Anyon

Re: django.core.urlresolvers.reverse capturing group before include behavior

2011-07-15 Thread Jian Chang
try this: reverse("mysites.views.index") 2011/7/16 Squeesh > I have run into an issue using reverse() to lookup named urls with > capturing groups before an include(). > > Code: > > mysite/urls.py > from django.conf.urls.defaults import * > > urlpatterns = patterns('', >url(r

django.core.urlresolvers.reverse capturing group before include behavior

2011-07-15 Thread Squeesh
I have run into an issue using reverse() to lookup named urls with capturing groups before an include(). Code: mysite/urls.py from django.conf.urls.defaults import * urlpatterns = patterns('', url(r'^$', 'views.index', name='root'), url(r'^(?P\w+)

Re: include behavior

2009-06-21 Thread tekion
Thanks for the explaination. On Jun 21, 5:53 am, Reiner wrote: > For 2.: > > I didn't try it, but if you're putting the path in quotes, include > tries to import it by itself, but there is no module named admin. It > is django.contrib.admin. admin.site.urls without quotes works, because > you pr

Re: include behavior

2009-06-21 Thread Reiner
For 2.: I didn't try it, but if you're putting the path in quotes, include tries to import it by itself, but there is no module named admin. It is django.contrib.admin. admin.site.urls without quotes works, because you probably allready imported it, e.g. to use admin.autodiscover(). That's the re

Re: include behavior

2009-06-21 Thread Richard Colley
For 1., did you import play_django? On Jun 21, 11:17 am, tekion wrote: > All, > I noticed that putting single quote around include argument makes a > different, for example: >  (r'^admin/', include(admin.site.urls)), >  (r'^polls/', include('play_django.polls.urls')), > works.  Where as: >  (r'^

include behavior

2009-06-20 Thread tekion
All, I noticed that putting single quote around include argument makes a different, for example: (r'^admin/', include(admin.site.urls)), (r'^polls/', include('play_django.polls.urls')), works. Where as: (r'^admin/', include(admin.site.urls)), (r'^polls/', include(play_django.polls.urls)), yi