Re: named url patterns - invalid syntax

2012-08-06 Thread Blaxton
o-users@googlegroups.com Sent: Sunday, August 5, 2012 4:51:46 PM Subject: Re: named url patterns - invalid syntax Al 05/08/12 13:43, En/na Blaxton ha escrit: > > Hi > > Why following line cause an invalid syntax : > (r'^myform/$', 'mysite.views.myform', nam

Re: named url patterns - invalid syntax

2012-08-05 Thread Adriano Teixeira
Hi, You are probably not using the url() function, but just the tuple format. You should have something like: urlpatterns = patterns('', url(r'^myform/$', 'mysite.views.myform', name="myform") ) instead of urlpatterns = patterns('', (r'^myform/$', 'mysite.views.myform', name="myform") ) The

Re: named url patterns - invalid syntax

2012-08-05 Thread Alexis Roda
Al 05/08/12 13:43, En/na Blaxton ha escrit: Hi Why following line cause an invalid syntax : (r'^myform/$', 'mysite.views.myform', name="myform"), Because it's syntax is invalid: the 'name=value' is allowed in function calls but not in tuples. Try with: urlpatterns = patterns('', url(r

Re: named url patterns - invalid syntax

2012-08-05 Thread Daniel Roseman
On Sunday, 5 August 2012 12:43:48 UTC+1, Blaxxton wrote: > > > Hi > > Why following line cause an invalid syntax : > (r'^myform/$', 'mysite.views.myform', name="myform"), > > it seems named url pattern has changed from name="myform" to just 'myform' > because when I change it to: > (r'^myform/$',

Re: Named URL Patterns -- Syntax Error

2009-09-25 Thread W3
Thanks, that was it. Bit of a simple one I probably should have spotted. Andrew On 25 Sep, 19:42, Tim Chase wrote: > > Can somebody tell me why i get a syntax error with this named URL > > pattern? > > > urlpatterns = patterns('', > >     url(r'^feed/(?P.*)/$', > >     'django.contrib.syndicati

Re: Named URL Patterns -- Syntax Error

2009-09-25 Thread Tim Chase
> Can somebody tell me why i get a syntax error with this named URL > pattern? > > urlpatterns = patterns('', > url(r'^feed/(?P.*)/$', > 'django.contrib.syndication.views.feed', > {'feed_dict': feeds} looks like a missing comma here... > name="feed"), > ) -tim --~--~---

Re: Named URL Patterns

2008-10-18 Thread Keith Eberle
i think you may need to "name" the argument. For example: url(r'^$', list_detail.object_list, {'queryset': Project.objects.all()}, name='project-home'), keith On Fri, Oct 17, 2008 at 4:59 PM, Karen Tracey <[EMAIL PROTECTED]> wrote: > On Fri, Oct 17, 2008 at 3:30 PM, dkadish <[EMAIL PROTECTED]

Re: Named URL Patterns

2008-10-17 Thread Karen Tracey
On Fri, Oct 17, 2008 at 3:30 PM, dkadish <[EMAIL PROTECTED]> wrote: > > Okay. I think the issue is that I am trying to use reverse( ) in the > URLConf file. According to the django docs, "the reverse() function > has to import all of your URLConf files and examine the name of each > view". My thin

Re: Named URL Patterns

2008-10-17 Thread dkadish
Okay. I think the issue is that I am trying to use reverse( ) in the URLConf file. According to the django docs, "the reverse() function has to import all of your URLConf files and examine the name of each view". My thinking is that this is leading to to attempt to import itself as it evaluates th

Re: Named URL Patterns

2008-10-17 Thread dkadish
Do you know if there's an easy way to try and figure out where reverse( ) is looking for the pages? On Oct 17, 11:24 am, dkadish <[EMAIL PROTECTED]> wrote: > Nope. Tried that. > > This shouldn't (I don't think) make any difference but I am running > Django 1.0, Python 2.5, Apache 2.210 on Windows

Re: Named URL Patterns

2008-10-17 Thread dkadish
Nope. Tried that. This shouldn't (I don't think) make any difference but I am running Django 1.0, Python 2.5, Apache 2.210 on Windows Server 2003 with SQL Server 2005 as the db (I know, I know...out of my hands) David On Oct 17, 11:19 am, Steve Holden <[EMAIL PROTECTED]> wrote: > dkadish wrote:

Re: Named URL Patterns

2008-10-17 Thread Steve Holden
dkadish wrote: > I'm having issues with a named URL pattern in my code. Django does not > seem to be finding the correct URL when the {% url %} and reverse( ) > tag/functions are used. > > the urls.py file at app_root/project/urls.py contains: > > from django.views.generic import list_detail, crea

Re: Named URL patterns with included urlconfs

2007-11-18 Thread Justin Fagnani
Solved. The url names were apparently being cached, so it appeared that naming a included url didn't work. Lesson: always restart django when changing url names -Justin On 11/18/07, Justin Fagnani <[EMAIL PROTECTED]> wrote: > > I've noticed that if you're trying to use named url patterns with an

Re: Named URL patterns to use prefix?

2007-04-26 Thread Malcolm Tredinnick
Hey Ryan, On Wed, 2007-04-25 at 16:23 +, Ryan Kanno wrote: > Already a ticket? Shoot, I swore I searched, but I couldn't find > one. Sorry about that - my apologies. > > (http://code.djangoproject.net/ticket/4129) No problems -- I forgot to point you to the ticket number, too. Anyway, th

Re: Named URL patterns to use prefix?

2007-04-25 Thread Ryan Kanno
Already a ticket? Shoot, I swore I searched, but I couldn't find one. Sorry about that - my apologies. (http://code.djangoproject.net/ticket/4129) _RK On Apr 24, 6:32 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Tue, 2007-04-24 at 15:21 +, Ryan Kanno wrote: > > I'm just curious

Re: Named URL patterns to use prefix?

2007-04-24 Thread Malcolm Tredinnick
On Tue, 2007-04-24 at 15:21 +, Ryan Kanno wrote: > I'm just curious if named URL patterns will be able to use the prefix > given (or if there's any reason not to) ie, > > urlpatterns += patterns('my_pattern', > url(r'^(?P[\d]+)/$', 'details', > name="my-detai