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
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
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
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+)
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
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
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'^
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
8 matches
Mail list logo