template {% url %} tag is giving server's absolute path

2018-12-27 Thread Paul Lanza
I have recently changed my django project (using A2 hosting) from fcgi to wsgi. I have successfully gotten the project to work, but I am experiencing a minor caveat I am trying to solve. Now, when I use the {% url %} tag in the templates to form a link, I get the absolute path of the server

Re: template {% url } tag syntax

2017-02-26 Thread Carsten Fuchs
Hi Richard, Am 27.02.2017 um 04:01 schrieb Richard Belew: {%url 'djggApp/guest'guest.guestId 'update'%} but this generates a /NoReverseMatch/ error /Reverse for 'djggApp/guest' with arguments '(1, u'update')' and keyword arguments '{}' not found. 0 pattern(s) tried: []/ In the {% url %}, yo

Re: template {% url } tag syntax

2017-02-26 Thread Richard Belew
i should also probably say that the url spec is in the djggApp's specific urls.py file, included in the project's urls.py my primary reference is the url tag reference doc <https://docs.djangoproject.com/en/1.10/ref/templates/builtins/#url> but i must not be composing its arg

template {% url } tag syntax

2017-02-26 Thread Richard Belew
ate code with a more modern reverse lookup via a url tag: {% url 'djggApp/guest' guest.guestId 'update'%} but this generates a *NoReverseMatch* error *Reverse for 'djggApp/guest' with arguments '(1, u'update')' and keyword arguments '{}' no

Re: How to send parameters in url tag?

2016-09-20 Thread Ares Ou
Hi, You have to use a form of keyword arguments to provide parameters in {% url %} tag. For example, {% url post_view post_id=post_id %} the former post_id is the argument name in your view function, the latter post_id is the variable name in your template context. If you have more than

Re: How to send parameters in url tag?

2016-09-20 Thread Alessandro Madruga Correia
> > {%url url_name url_params%} > > where url_params as 'pk=object.id' or 'page=page.number' > Here have an example https://docs.djangoproject.com/en/1.10/topics/http/urls/#reverse-resolution-of-urls -- ,= ,-_-. =. [] Alessandro Madruga Correia ((_/)o o(\_)) [http://counter.li.org]

How to send parameters in url tag?

2016-09-20 Thread Za Ars
Hou to send parameters in url as string? {%url url_name url_params%} where url_params as 'pk=object.id' or 'page=page.number' Please, help me, if you can -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: Calling a function for a url tag parameter

2014-10-31 Thread Aubrey Stark-Toller
rey On Thu, Oct 30, 2014, at 03:23 PM, Daniel Grace wrote: > Hi, I am trying to use the url tag on some parameters, one of which > needs to come from a function. For example as follows: {% with > state_url=encode_url flow.state.description %} advance > > encode_url is defined a

Calling a function for a url tag parameter

2014-10-30 Thread Daniel Grace
Hi, I am trying to use the url tag on some parameters, one of which needs to come from a function. For example as follows: {% with state_url=encode_url flow.state.description %} advance encode_url is defined as follows: @register.simple_tag def encode_url(link_text): return link_text.replace

Re: url tag: "'str' object has no attribute 'regex'"

2013-05-15 Thread quilpy
emove the > last comma in the patterns() > ) > > Hope this helps > > On Friday, May 18, 2012 5:58:28 AM UTC+8, refreegrata wrote: >> >> Hello list >> >> I know, this question has been posted and resolved before, but the >> solutions don't wo

Re: url tag: "'str' object has no attribute 'regex'"

2013-04-01 Thread Wenliang Chen
: > > Hello list > > I know, this question has been posted and resolved before, but the > solutions don't work in my situation. I don't know why. > > When I try to use the "url" tag in any template an exception is raised: > "

Re: Django 1.5 and url tag ( {% url 'django.contrib.auth.views.login' %})

2013-03-13 Thread Alexey Kinyov
;> >> Exception Type: NoReverseMatch >> >> Exception Value: >> >> >> >> Reverse for 'django.contrib.auth.views.login' with arguments '()' and >> >> keyword arguments '{}' not found. >> >> >> >> >> &g

Re: Django 1.5 and url tag ( {% url 'django.contrib.auth.views.login' %})

2013-03-13 Thread VVilku
blog/urls.py: > > urlpatterns = patterns('', > >url(r'^accounts/login/$', > > 'django.contrib.auth.views.login', name='login1'), > > url(r'^accounts/logout/$', > > 'd

Re: Django 1.5 and url tag ( {% url 'django.contrib.auth.views.login' %})

2013-03-13 Thread VVilku
#x27; not found. > >> > >> > >> blog/urls.py: > >> urlpatterns = patterns('', > >>url(r'^accounts/login/$', > >> 'django.contrib.auth.views.login', name='login1'), > >>

Re: Django 1.5 and url tag ( {% url 'django.contrib.auth.views.login' %})

2013-03-13 Thread Mike Doroshenko II
t/$', 'django.contrib.auth.views.logout'), ) blog/templates/registration/login.html: I try without quotes, but I receive another error (I know, in django 1.5 are a some changes in url tag): 'url' requires a non-empty first argument. The syntax changed in Django 1.5,

Re: Django 1.5 and url tag ( {% url 'django.contrib.auth.views.login' %})

2013-03-13 Thread Alexey Kinyov
;, >> 'django.contrib.auth.views.login', name='login1'), >>url(r'^accounts/logout/$', >> 'django.contrib.auth.views.logout'), >> ) >> >> blog/templates/registration/login.html: >> >> >&

Re: Django 1.5 and url tag ( {% url 'django.contrib.auth.views.login' %})

2013-03-13 Thread VVilku
/$', > 'django.contrib.auth.views.login', name='login1'), >url(r'^accounts/logout/$', > 'django.contrib.auth.views.logout'), > ) > > blog/templates/registration/login.html: > > > I try without quot

Re: Django 1.5 and url tag ( {% url 'django.contrib.auth.views.login' %})

2013-03-13 Thread Tom Evans
; not found. > > > blog/urls.py: > urlpatterns = patterns('', >url(r'^accounts/login/$', > 'django.contrib.auth.views.login', name='login1'), >url(r'^accounts/logout/$', > 'django.c

Django 1.5 and url tag ( {% url 'django.contrib.auth.views.login' %})

2013-03-13 Thread VVilku
'django.contrib.auth.views.login', name='login1'), url(r'^accounts/logout/$', 'django.contrib.auth.views.logout'), ) blog/templates/registration/login.html: I try without quotes, but I receive another error (I know, in django 1.5 are a s

Re: About the Django URL tag {% url %}……

2012-09-01 Thread 绯红天空
2012/8/31 Amyth Arora > Paste the code to your urls.py and highlight which urls are not working. > > > On Thu, Aug 30, 2012 at 8:07 PM, Nikolas Stevenson-Molnar < > nik.mol...@consbio.org> wrote: > >> Also, your URL patters should start with "^" like your first one does. >> And unless you need th

Re: About the Django URL tag {% url %}……

2012-08-30 Thread Amyth Arora
Paste the code to your urls.py and highlight which urls are not working. On Thu, Aug 30, 2012 at 8:07 PM, Nikolas Stevenson-Molnar < nik.mol...@consbio.org> wrote: > Also, your URL patters should start with "^" like your first one does. > And unless you need the older version, I would upgrade to

Re: About the Django URL tag {% url %}……

2012-08-30 Thread Nikolas Stevenson-Molnar
Also, your URL patters should start with "^" like your first one does. And unless you need the older version, I would upgrade to the latest stable version of Django (1.4.1) before doing anything else. _Nik On 8/29/2012 7:37 PM, Scarl wrote: > My python version is 2.7.2 , and django version is 1.2

Re: About the Django URL tag {% url %}……

2012-08-30 Thread Nikolas Stevenson-Molnar
It should still work... the problem may be elsewhere. Would you please provide the full contents of both url files? _Nik On 8/29/2012 7:37 PM, Scarl wrote: > My python version is 2.7.2 , and django version is 1.2.7 > I have a test just now. > If i put the name parameter in mysite.urls like url(r'

Re: About the Django URL tag {% url %}……

2012-08-29 Thread Scarl
I am so sorry……I didn't provide the render params... -- 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/-/04wrFi8MWRcJ. To post to this group, send email to djan

About the Django URL tag {% url %}……

2012-08-29 Thread Scarl
My python version is 2.7.2 , and django version is 1.2.7 I have a test just now. If i put the name parameter in mysite.urls like url(r'^test/$', 'testpage', name='www'), the {% url www %} can work... But when I put the name parameter in mysite.myapp.urls like url(r'help/$', 'testpage', name='www'

url tag: "'str' object has no attribute 'regex'"

2012-05-17 Thread refreegrata
Hello list I know, this question has been posted and resolved before, but the solutions don't work in my situation. I don't know why. When I try to use the "url" tag in any template an exception is raised: "'str' object has no attribute 'regex&#

Re: How to pass url parameters to template url tag

2011-08-11 Thread Kayode Odeyemi
On Thu, Aug 11, 2011 at 9:52 AM, Tom Evans wrote: > On Wed, Aug 10, 2011 at 7:06 PM, bruno desthuilliers > wrote: > > On 10 août, 16:35, Reinout van Rees wrote: > >> > >> Best solution: calculate that url in your python view code and just pass > >> it along in the context. > > > > Definitly not

Re: How to pass url parameters to template url tag

2011-08-11 Thread Kayode Odeyemi
On Wed, Aug 10, 2011 at 10:37 PM, bruno desthuilliers < bruno.desthuilli...@gmail.com> wrote: > On 10 août, 21:52, Kayode Odeyemi wrote: > > You don't pass anything from "one view to another". You eventually > pass data from a request to another, using either request params > (querystring, post..

Re: How to pass url parameters to template url tag

2011-08-11 Thread Tom Evans
On Wed, Aug 10, 2011 at 7:06 PM, bruno desthuilliers wrote: > On 10 août, 16:35, Reinout van Rees wrote: >> >> Best solution: calculate that url in your python view code and just pass >> it along in the context. > > Definitly not the best solution if this has to work for more than > exactly ONE v

Re: How to pass url parameters to template url tag

2011-08-10 Thread bruno desthuilliers
On 10 août, 21:52, Kayode Odeyemi wrote: > On Wed, Aug 10, 2011 at 6:57 PM, bruno desthuilliers < > > bruno.desthuilli...@gmail.com> wrote: > > On 10 août, 16:30, Tom Evans wrote: > > > Now for the third solution: write your own template tag. Not > > necessarily required, but that's often the bes

Re: How to pass url parameters to template url tag

2011-08-10 Thread Kayode Odeyemi
On Wed, Aug 10, 2011 at 6:57 PM, bruno desthuilliers < bruno.desthuilli...@gmail.com> wrote: > On 10 août, 16:30, Tom Evans wrote: > > > Now for the third solution: write your own template tag. Not > necessarily required, but that's often the best solution wrt/ > decoupling / flexibility / mainta

Re: How to pass url parameters to template url tag

2011-08-10 Thread bruno desthuilliers
On 10 août, 16:35, Reinout van Rees wrote: > > Best solution: calculate that url in your python view code and just pass > it along in the context. Definitly not the best solution if this has to work for more than exactly ONE view. > The generic rule is that most processing should happen in pytho

Re: How to pass url parameters to template url tag

2011-08-10 Thread bruno desthuilliers
On 10 août, 16:30, Tom Evans wrote: > > You have two options: Actually, three. > you can extract the value in the view, and put it into the context > that is used to render the template. Simple but totally unpractical for most projects, as it requires making ALL views duplicating this behavior.

Re: How to pass url parameters to template url tag

2011-08-10 Thread Reinout van Rees
On 10-08-11 16:17, Kayode Odeyemi wrote: I need some help on how to pass url parameters to template url tag. Something like this: my page page is the url parameter I want to get Best solution: calculate that url in your python view code and just pass it along in the context. The generic

Re: How to pass url parameters to template url tag

2011-08-10 Thread Tom Evans
On Wed, Aug 10, 2011 at 3:17 PM, Kayode Odeyemi wrote: > Hello friends, > I need some help on how to pass url parameters to template url tag. > Something like this: > my page > page is the url parameter I want to get > Thank you You have two options: you can extract the valu

How to pass url parameters to template url tag

2011-08-10 Thread Kayode Odeyemi
Hello friends, I need some help on how to pass url parameters to template url tag. Something like this: my page page is the url parameter I want to get Thank you -- Odeyemi 'Kayode O. http://www.sinati.com. t: @charyorde -- You received this message because you are subscribed t

Re: about url tag

2011-03-31 Thread Lic . José M . Rodriguez Bacallao
ok, thanks everyone 2011/3/31 Łukasz Rekucki : > On 31 March 2011 18:50, Lic. José M. Rodriguez Bacallao > wrote: >> well, I don't know if this is ok, but I solved the problem adding a >> name='help_subject' tu the urlconf line > > Sorry, I couldn't answer earlier, but yes - that is exactly what

Re: about url tag

2011-03-31 Thread Łukasz Rekucki
On 31 March 2011 18:50, Lic. José M. Rodriguez Bacallao wrote: > well, I don't know if this is ok, but I solved the problem adding a > name='help_subject' tu the urlconf line Sorry, I couldn't answer earlier, but yes - that is exactly what you should do. Class-based views can't be referenced by u

Re: about url tag

2011-03-31 Thread Micah Carrick
apps.help.views.HelpSubject.as_view()' with arguments '()' and > >> keyword arguments '{'slug': u'gdsgdgdg'}' not found. > >> > >> On Thu, Mar 31, 2011 at 12:33 PM, Lic. José M. Rodriguez Bacallao > >> wrote: > &

Re: about url tag

2011-03-31 Thread Lic . José M . Rodriguez Bacallao
ws.HelpSubject.as_view()' with arguments '()' and >> keyword arguments '{'slug': u'gdsgdgdg'}' not found. >> >> On Thu, Mar 31, 2011 at 12:33 PM, Lic. José M. Rodriguez Bacallao >> wrote: >>> I mean url tag: {% url ..

Re: about url tag

2011-03-31 Thread Lic . José M . Rodriguez Bacallao
ile rendering: Reverse for > 'apps.help.views.HelpSubject.as_view()' with arguments '()' and > keyword arguments '{'slug': u'gdsgdgdg'}' not found. > > On Thu, Mar 31, 2011 at 12:33 PM, Lic. José M. Rodriguez Bacallao > wrote: >>

Re: about url tag

2011-03-31 Thread Lic . José M . Rodriguez Bacallao
2011 at 12:33 PM, Lic. José M. Rodriguez Bacallao wrote: > I mean url tag: {% url ... %} > > this is what I am using: Leer > mas... > > directory structure: > > site >  |--> url.py >  |--> apps (included in the python path) >        |--> help >            

Re: about url tag

2011-03-31 Thread Lic . José M . Rodriguez Bacallao
I mean url tag: {% url ... %} this is what I am using: Leer mas... directory structure: site |--> url.py |--> apps (included in the python path) |--> help |--> models.py |--> views.py |--> urls.py where: "apps&q

Re: about url tag

2011-03-31 Thread Łukasz Rekucki
On 31 March 2011 17:16, Lic. José M. Rodriguez Bacallao wrote: > use the tag: > url What do you mean by that ? Do you mean the {% url %} template tag, or the `url` function commonly used in urls.py module. Give us some examples of what you want to achieve and what problems you have. -- Łukasz Re

about url tag

2011-03-31 Thread Lic . José M . Rodriguez Bacallao
hi folks, I was using django 1.2.5 and generic views to some simple things, now, I upgrade to django 1.3 and I am trying to use the tag: url but it doesn't seems to work with django class based generic views. How to use this tag correctly? -- Lic. José M. Rodriguez Bacallao Centro de Biofisica Me

execution time of qualified view name vs alias in reverse and url tag

2010-08-26 Thread kbs
After accumulating a large number of apps over the years in a single web project, I would say that the time it takes to reverse urls has become quite significant, especially if we have multiple links on screen using the reverse function. Would there be a noticeable difference if we go back to usin

Re: Encoding with {% url %} tag

2010-08-16 Thread aa56280
> In other words, if you designed the URL regex to handle a certain sort > of string, and the view it points to handle a certain sort of string, > and now in your template you're running that string through iriencode > first, then the URL definition and the view it points to is receiving > somethin

Re: Encoding with {% url %} tag

2010-08-16 Thread shacker
On Aug 15, 9:34 am, aa56280 wrote: > > Does the view code in app.views.blah know what to do with the > > iriencode'd values? > > What does that have to do with anything? More accurately, I should have asked "Does the URL definition and view for app.views.blah know what to do with the iriencode'd

Re: Encoding with {% url %} tag

2010-08-15 Thread aa56280
ning. > Remember there are two ways to generate URLs in your templates - > either with the {% url ... %} tag as you're doing now or with a > get_absolute_url() method on the model (you then refer to href="{{ instancename.get_absolute_url }}"> in your template). I'

Re: Encoding with {% url %} tag

2010-08-13 Thread shacker
On Aug 12, 9:22 am, aa56280 wrote: > I'm using the url tag like so: {% url app.views.blah var1, var2 %} > > var1 and var2 need to be encoded, using the iriencode filter, so I > tried this: {% url app.views.blah var1|iriencode, var2|iriencode %} > > That doesn't do a

Encoding with {% url %} tag

2010-08-12 Thread aa56280
I'm using the url tag like so: {% url app.views.blah var1, var2 %} var1 and var2 need to be encoded, using the iriencode filter, so I tried this: {% url app.views.blah var1|iriencode, var2|iriencode %} That doesn't do anything though. I can't find any examples anywhere to figure

[Solved] template url tag fetches wrong URL with generic view

2010-05-12 Thread Mike Dewhirst
› Entries › Entry detail {% endblock %} ... and here the url tag fetches the wrong URL. Instead of rendering entry_archive.html as I expected, it renders entry_detail.html with exactly the same detail as the link in 2 above. I have tried closing down the dev server and browser and starting again b

template url tag fetches wrong URL with generic view

2010-05-12 Thread Mike Dewhirst
t ... 3. I have a problem in breadcrumbs in coltrane/entry_detail.html ... {% block breadcrumbs %}{{ block.super }} › Entries › Entry detail {% endblock %} ... and here the url tag fetches the wrong URL. Instead of rendering entry_archive.html as I expected, it renders entry_detail.html wi

Re: Using urlencode with the url tag

2010-03-18 Thread saxon75
Yes, that's it exactly. Thanks! -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For mo

Re: Using urlencode with the url tag

2010-03-18 Thread Nuno Maltez
On Mon, Mar 15, 2010 at 11:28 PM, saxon75 wrote: > I'm trying to generate a link where the URL of the current page gets > passed in the querystring of the link.  Like so: . > > I would have thought that I could do this relatively easily with > template tags, so I've tried this: > > <% url arg1, ar

Using urlencode with the url tag

2010-03-15 Thread saxon75
I'm trying to generate a link where the URL of the current page gets passed in the querystring of the link. Like so: . I would have thought that I could do this relatively easily with template tags, so I've tried this: <% url arg1, arg2 as the_url %> http://www.example.com?variable={{ the_url|ur

Re: Javascript and the 'url' tag?

2009-12-11 Thread Tom Evans
On Fri, Dec 11, 2009 at 3:37 PM, Stodge wrote: > Thanks. Bear with me - I'm new to javascript. I have this, rather this > is what I want to do: > >        function view_document() { >                id = get_document_id(); >                if (id != -1) { >                        url = "/document/

Re: Javascript and the 'url' tag?

2009-12-11 Thread Stodge
Thanks. Bear with me - I'm new to javascript. I have this, rather this is what I want to do: function view_document() { id = get_document_id(); if (id != -1) { url = "/document/view/" + id + "/"; window.open(ur

Re: Javascript and the 'url' tag?

2009-12-11 Thread Tom Evans
On Fri, Dec 11, 2009 at 3:25 PM, Stodge wrote: > I'm writing some javascript for my django app and I need to use 'url' > to lookup an... url! But I can't see how to do it for urls that > require parameters. It works for urls without parameters, otherwise I > get syntax errors. Any pointers? I'm se

Javascript and the 'url' tag?

2009-12-11 Thread Stodge
I'm writing some javascript for my django app and I need to use 'url' to lookup an... url! But I can't see how to do it for urls that require parameters. It works for urls without parameters, otherwise I get syntax errors. Any pointers? I'm searching the groups and Google but nothing jumps out so a

URL Tag for feeds

2009-09-24 Thread When ideas fail
If i want to create a URL tag for feeds then where should the path.to.view point to? Should it point to urls.py or feeds.py? or do i need to do something else entirely? This is using the standard sydication framwork. Thanks, Andrew --~--~-~--~~~---~--~~ You

Re: URL Tag

2009-09-24 Thread W3
ct.myapp.views.blog'), > > (r'^myposts/(?P.+)/$', 'myproject.myapp.views.title_view'), > > > On 24 Sep, 20:17, When ideas fail wrote: > >> Hello, I was wondering if somebody could tell me what i'm doing   > >> wrong. > > >> I keep gett

Re: URL Tag

2009-09-24 Thread Emiel van de Laar
Hello, I was wondering if somebody could tell me what i'm doing >> wrong. >> >> I keep getting this error relating to a url tag: >> >> Traceback: >> File "C:\Python26\lib\site-packages\django\core\handlers\base.py" in >> get_response >>

Re: URL Tag

2009-09-24 Thread W3
ong. > > I keep getting this error relating to a url tag: > > Traceback: > File "C:\Python26\lib\site-packages\django\core\handlers\base.py" in > get_response >   92.                 response = callback(request, *callback_args, >

URL Tag

2009-09-24 Thread When ideas fail
Hello, I was wondering if somebody could tell me what i'm doing wrong. I keep getting this error relating to a url tag: Traceback: File "C:\Python26\lib\site-packages\django\core\handlers\base.py" in get_response 92. response = callback(request,

Re: template url tag issue

2009-08-30 Thread selcukcihan
Hi, i resolved the problem by creating a custom url tag named app1_url. I copied the code from URLNode and related url method (of defaulttags.py) and modified the calls to reverse so that it gets the argument urlconf. On Aug 29, 9:06 pm, selcukcihan wrote: > (Django release 1.1) > Hi, i h

template url tag issue

2009-08-29 Thread selcukcihan
(Django release 1.1) Hi, i have an application within my project, call it app1. It has urls.py within its directory. That project.app1.urls does not get included within ROOT_URLCONF(which points to 'project.urls'). I needed project.app1.urls be isolated from other urls. Then i wrote a middleware i

Re: how to use the url tag with optional arguments?

2009-07-27 Thread Michael
On Mon, Jul 27, 2009 at 7:58 AM, Kenneth Gonsalves wrote: > > On Monday 27 Jul 2009 5:21:46 pm Kenneth Gonsalves wrote: > > > can't handle anything except the outermost capturing groups in a > > > reg-exp. > > > > > > I suspect you intend your pattern to be > > > > > > r'^addlandmark/(?:(?

Re: how to use the url tag with optional arguments?

2009-07-27 Thread Kenneth Gonsalves
On Monday 27 Jul 2009 5:21:46 pm Kenneth Gonsalves wrote: > > can't handle anything except the outermost capturing groups in a > > reg-exp. > > > > I suspect you intend your pattern to be > > > > r'^addlandmark/(?:(?P\d+)/)?$' > > > > changing the optional portion to be a non-captu

Re: how to use the url tag with optional arguments?

2009-07-27 Thread Kenneth Gonsalves
On Monday 27 Jul 2009 4:55:42 pm Malcolm Tredinnick wrote: > > url(r'^addlandmark/((?P\d+)/)?$', 'addlandmark', > > name='add_landmark'), > > You have nested capturing groups here, which is almost always an error. > You have also mixed positional and named arguments, for bonus confusion > (if they

Re: how to use the url tag with optional arguments?

2009-07-27 Thread Malcolm Tredinnick
On Mon, 2009-07-27 at 16:30 +0530, Kenneth Gonsalves wrote: > hi > latest trunk. > in my urls.py I have a url: > > url(r'^addlandmark/((?P\d+)/)?$', 'addlandmark', name='add_landmark'), You have nested capturing groups here, which is almost always an error. You have also mixed positional and nam

how to use the url tag with optional arguments?

2009-07-27 Thread Kenneth Gonsalves
hi latest trunk. in my urls.py I have a url: url(r'^addlandmark/((?P\d+)/)?$', 'addlandmark', name='add_landmark'), as can be seen, the id part is optional. In my template I have: Edit this entry this does not work as it says Reverse not found. How does one use this tag when the argument is op

url tag or get_absolute_url()

2009-02-20 Thread nixon66
I have a a list that I generate using this code in a template: {% extends "base.html" %} {% block title %}Lobbyist by Country {% endblock %} {% block content %} Browse by County Click on one of the items below to get information about the firms {% for county in county_list %} {{ coun

Re: Strange url tag behaviour

2009-02-11 Thread Malcolm Tredinnick
normal? > > Probably you should try setting `FORCE_SCRIPT_NAME`: > http://docs.djangoproject.com/en/dev/ref/settings/#force-script-name. > > I had similar issue with `url` tag giving awkward path. To be accurate, this isn't a problem with the URL tag. The URL tag is providing a complet

Re: Strange url tag behaviour

2009-02-11 Thread Alex Koshelev
> `FORCE_SCRIPT_NAME`:http://docs.djangoproject.com/en/dev/ref/settings/#force-script-name. > > I had similar issue with `url` tag giving awkward path. > > > > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: Strange url tag behaviour

2009-02-11 Thread Leslie Maclachlan
o teh location of the >> view.py (/var/opt/django/projects/ilayer/intranet/) >> >> Anyone seen this before - is it normal? >> > > Probably you should try setting `FORCE_SCRIPT_NAME`: > http://docs.djangoproject.com

Re: Strange url tag behaviour

2009-02-11 Thread Dmitry Dzhus
gt; the absolute path on my apache mail server to teh location of the > view.py (/var/opt/django/projects/ilayer/intranet/) > > Anyone seen this before - is it normal? Probably you should try setting `FORCE_SCRIPT_NAME`: http://docs.djangoproject.com/en/dev/ref/settings/#force-script-name

Strange url tag behaviour

2009-02-11 Thread Leslie Maclachlan
Hi, I have a url tag as follows in my template: {{username.name}} I would expect the url to show as: http://intranet/MV_Edit_Employee/1/ But, it shows up as: http://intranet/var/opt/django/projects/ilayer/MV_Edit_Employee/1/ Everything still workds, but it just looks strange to have a url

Re: Strage Url Tag Problem

2008-12-29 Thread madhav
Thankyou Malcom. I understood the bottom line. On Dec 12, 6:09 am, Malcolm Tredinnick wrote: > On Thu, 2008-12-11 at 04:01 -0800, madhav wrote: > > I am facing a strage error while using 'url' tag. I am using {%url > > logout%} for getting the logout url in th

Re: Problem with url tag

2008-12-27 Thread patrick91
Resolved, if I could say so :) the problem was that I can't use reverse in forms.py 'cause is to early for doing that :( --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, se

Re: Problem with url tag

2008-12-23 Thread patrick91
Almost resolved :) I tried everything to find the error and finally I did, but I don't know how to resolve :( the error is casued by this line in a imported script: CITY_URL = reverse('get_city_list') if I remove that line the project works fine, but I need that line :( Ps. the url get_city_l

Re: Problem with url tag

2008-12-22 Thread patrick91
This is really boring :( I've restarted the server, and it doens't work again :/ also I've noticed that no urls in reparations.urls can't be called with the template tag url... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Problem with url tag

2008-12-22 Thread patrick91
What a strangeness! I edit the template removing the extend tag, and it worked, next I readded the extend and it still worked :O this is really strange :/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users

Re: Problem with url tag

2008-12-22 Thread patrick91
s: > >         In [3]: from django.template import Template, Context > >         In [4]: t = Template("{% url show_worksheet 5537 %}") > >         In [5]: t.render(Context()) >         Out[5]: u'/foglio/5537/' > > That shows the url tag is working in my setup when I

Re: Problem with url tag

2008-12-22 Thread Malcolm Tredinnick
de. That's going to be a little tougher to debug. Oh ... other idea. Try some experiments like this: In [3]: from django.template import Template, Context In [4]: t = Template("{% url show_worksheet 5537 %}") In [5]: t.render(Context()) Out[5]:

Re: Problem with url tag

2008-12-21 Thread patrick91
On 22 Dic, 02:17, Malcolm Tredinnick wrote: > Certainly a bit unexpected. Can you paste the relevant lines from your > URL Conf file, please? > > Regards, > Malcolm Sure :) here it is: url(r'foglio/(?P[0-9]+)/$', views.show_worksheet, name='show_worksheet'), Thanks for the reply --~--~-

Re: Problem with url tag

2008-12-21 Thread Malcolm Tredinnick
On Sun, 2008-12-21 at 11:45 -0800, patrick91 wrote: > Hi, I've a problem with the url tag, when I call this template: > Visualizza > I get this error: > Caught an exception while rendering: Reverse for > 'catsnc.show_worksheet' with arguments '(5537,)'

Problem with url tag

2008-12-21 Thread patrick91
Hi, I've a problem with the url tag, when I call this template: Visualizza I get this error: Caught an exception while rendering: Reverse for 'catsnc.show_worksheet' with arguments '(5537,)' and keyword arguments '{}' not found. But when I call

Re: Strage Url Tag Problem

2008-12-11 Thread Malcolm Tredinnick
On Thu, 2008-12-11 at 04:01 -0800, madhav wrote: > I am facing a strage error while using 'url' tag. I am using {%url > logout%} for getting the logout url in the template. It is telling > "Reverse for 'PROD_settings.logout' with arguments '()' and ke

Strage Url Tag Problem

2008-12-11 Thread madhav
I am facing a strage error while using 'url' tag. I am using {%url logout%} for getting the logout url in the template. It is telling "Reverse for 'PROD_settings.logout' with arguments '()' and keyword arguments '{}' not found". Why is it referrin

Re: can't pass a parameter to my named url using {% url %} tag in template

2008-11-27 Thread Rock
I had the same problem recently in a template that was created for use in an inclusion_tag. My workaround was to the perform the reverse call in the templatetag and pass in the resulting url. If that is not an appropriate workaround for you, perhaps a "with" will do the trick. If that doesn't wor

Re: can't pass a parameter to my named url using {% url %} tag in template

2008-11-27 Thread dash86no
On Nov 27, 10:43 pm, bruno desthuilliers <[EMAIL PROTECTED]> wrote: > On 27 nov, 14:19, dash86no <[EMAIL PROTECTED]> wrote: > (snip) > > > However, when I do : > > > delete > > > I get the error: > > > Caught an exception while rendering: Reverse for 'sam_project.delete- > > quote-page,' with arg

Re: can't pass a parameter to my named url using {% url %} tag in template

2008-11-27 Thread bruno desthuilliers
On 27 nov, 14:19, dash86no <[EMAIL PROTECTED]> wrote: (snip) > However, when I do : > > delete > > I get the error: > > Caught an exception while rendering: Reverse for 'sam_project.delete- > quote-page,' with arguments '('',)' and keyword arguments '{}' not > found. > > If anyone has any hints th

Re: can't pass a parameter to my named url using {% url %} tag in template

2008-11-27 Thread Thomas Kerpe
Why don't write {% url delete-quote-page object.id %} ? HTH //Thomas On Nov 27, 2:19 pm, dash86no <[EMAIL PROTECTED]> wrote: > I'm trying to use a URL tag as following: > > delete > > my named url is here: > > url(r'^quote/delete/(?P\d+)/$', >

can't pass a parameter to my named url using {% url %} tag in template

2008-11-27 Thread dash86no
I'm trying to use a URL tag as following: delete my named url is here: url(r'^quote/delete/(?P\d+)/$', 'django.views.generic.create_update.delete_object', dict(quote_info, post_delete_redirect='/sam/'), name="delete-quote-page"), If I change the co

Re: Keyword arguments with spaces and the url tag

2008-10-06 Thread Alexis Bellido
Thanks for the reply. I just submitted it as bug 9315. http://code.djangoproject.com/ticket/9315 Regards. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

Re: Keyword arguments with spaces and the url tag

2008-10-05 Thread Malcolm Tredinnick
> And the view is defined like this: > > def search(request, words): > > Now I'd like to print a link to the search page with certain words > from a template and used the url tag like this: > > {% url search_page words="someword" %} > > When viewing on

Keyword arguments with spaces and the url tag

2008-10-05 Thread Alexis Bellido
t a link to the search page with certain words from a template and used the url tag like this: {% url search_page words="someword" %} When viewing on the browser I get something like '/search/someword', which is good. My question is how do I pass more than one word in the

Re: Problem with url tag (Caught an exception while rendering: Reverse ...)

2008-09-19 Thread Steve Holden
Brian Neal wrote: > > > On Sep 19, 12:45 pm, Steve Holden <[EMAIL PROTECTED]> wrote: >> That's annoying: now *I* have a (named) pattern that won't reverse with >> the URL tag: specifically, the edit profile URL from the Google code >> profiles ap

Re: Problem with url tag (Caught an exception while rendering: Reverse ...)

2008-09-19 Thread Brian Neal
On Sep 19, 12:45 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > That's annoying: now *I* have a (named) pattern that won't reverse with > the URL tag: specifically, the edit profile URL from the Google code > profiles app: > >    

  1   2   >