Hi Sebastian,
There is a very significant difference between the third pattern and the
last - the extra set of braces. That extra set of braces means that the
regex group that is being matched is
(?P\d+)/
That is - one or more numerical digits, identified as playerId, that *must*
be followed by
I'd like to make sure that this is an error not the feature.
I use following code in template
{{ player.id }} : "{{
player.name}}"
And in urls.py everything goes fine with those rules:
1. url(r'^player/select/(?P\d+)/$', myapp.views.player.select,
name="player-select"),
result URL is: /player
On Mar 29, 2012, at 12:59 PM, Alasdair Nicol wrote:
> Hi Jamie,
> Don't include the (.*)$ in the regex for the include. The documented pattern
> [1] for the include is
>
>(r'^d/events/', include('myproject.events.urls')),
Ah, thank you, that was it. (I do need sleep - don't know how long
Hi Jamie,
On 29/03/12 20:49, Jamie Lawrence wrote:
I'm very confused… this has worked fine in the past. Django 1.3.1
In myproject/urls.py:
urlpatterns = patterns('',
(r'^d/events/(.*)$', include('myproject.events.urls')),
[…]
Don't include the (.*)$ in the regex for the include. The docum
I'm very confused… this has worked fine in the past. Django 1.3.1
In myproject/urls.py:
urlpatterns = patterns('',
(r'^d/events/(.*)$', include('myproject.events.urls')),
[…]
in myproject/events/urls.py :
urlpatterns = patterns('myproject.events.views',
url(r'^add/$', 'add_view', nam
On Thu, Oct 29, 2009 at 1:40 PM, Alex Robbins wrote:
>
> Maybe it is just me, but I feel like writing out the view functions
> like that is a beating. I just name[1] all the urls. Then the url tag
> is easy. I just do things like {% url home-page %} or {% url blog-
> index %}. If you set up a gen
On 29 oct, 14:40, Alex Robbins wrote:
> Maybe it is just me, but I feel like writing out the view functions
> like that is a beating.
It's not just you !-)
yeps, named urls are the RightThing(tm) to do.
--~--~-~--~~~---~--~~
You received this message because you
Maybe it is just me, but I feel like writing out the view functions
like that is a beating. I just name[1] all the urls. Then the url tag
is easy. I just do things like {% url home-page %} or {% url blog-
index %}. If you set up a generic view in the views and name it, it
will work like normal.
[
On Wed, Oct 28, 2009 at 8:03 PM, Gabriel . wrote:
>
> On Wed, Oct 28, 2009 at 4:16 PM, Umapathy S wrote:
> > view_xyz is the view function. No arguments.
> >
> > exps is the application. pams is project.
> >
> > pams/urls.py
> >
> > urlpatterns = patterns('',
> > # Example:
> > # (r'^p
On Wed, Oct 28, 2009 at 4:16 PM, Umapathy S wrote:
> view_xyz is the view function. No arguments.
>
> exps is the application. pams is project.
>
> pams/urls.py
>
> urlpatterns = patterns('',
> # Example:
> # (r'^pams/', include('pams.foo.urls')),
> (r'pams/', include('pams.exps.url
view_xyz is the view function. No arguments.
exps is the application. pams is project.
pams/urls.py
urlpatterns = patterns('',
# Example:
# (r'^pams/', include('pams.foo.urls')),
(r'pams/', include('pams.exps.urls')),
pams/exps.urls.py
from django.conf.urls.defaults import *
fro
On Wed, Oct 28, 2009 at 3:55 PM, Umapathy S wrote:
>
> Hello there,
>
> I am developing a page which has a left side menu. This menu is a seperate
> html and gets includes in the base.html template.
>
> To make it less vulnerable to url changes, I am trying to implement the {%
> url %}
>
> in
What's your 'view_xyz'?
Are you sure that view_xyz is accessible through an URL without any
arguments?
-- dz
On Wed, Oct 28, 2009 at 2:55 PM, Umapathy S wrote:
> Hello there,
>
> I am developing a page which has a left side menu. This menu is a seperate
> html and gets includes in the base.h
Hello there,
I am developing a page which has a left side menu. This menu is a seperate
html and gets includes in the base.html template.
To make it less vulnerable to url changes, I am trying to implement the {%
url %}
in lhsmenu.html
view
{% url exps.view_xyz as viewxyzurl
14 matches
Mail list logo