Re: Django URL problem

2018-12-07 Thread thanh . nguyenba0611
It can be like {% url 'email' %} (incorrect) => {% url 'email' %} (correct) :D On Saturday, December 8, 2018 at 2:10:13 AM UTC+7, Kacsándi, Zsolt wrote: > > Hi, > > I am new in Django and I have a problem. > I want to build an URL structure like this: > > https://example.com/1/email >

Re: Django URL problem

2018-12-07 Thread thanh . nguyenba0611
Hello, I think you are missing ('email/') in template. On Saturday, December 8, 2018 at 2:10:13 AM UTC+7, Kacsándi, Zsolt wrote: > > Hi, > > I am new in Django and I have a problem. > I want to build an URL structure like this: > > https://example.com/1/email > https://example.com/1/email/2 >

Re: Django URL problem

2018-12-07 Thread vishal sharma
Hello, I am making multiupload files API in Django please suggest which functions we can use for uploading multiple upload? Thanks!! On Sat, 8 Dec 2018 at 12:40 AM, Kacsándi, Zsolt wrote: > Hi, > > I am new in Django and I have a problem. > I want to build an URL structure like this: > >

Django URL problem

2018-12-07 Thread Kacsándi , Zsolt
Hi, I am new in Django and I have a problem. I want to build an URL structure like this: https://example.com/1/email https://example.com/1/email/2 The first URL is the list view, the second is the detail view. The first integer (1) in those is the account id, and in the second URL the second

Re: Url problem

2016-07-18 Thread VilleP
Thanks James for your quick answer, the problem occurred on dev server as I haven't deployed the site yet. But I figured out how to fix this, which was suitable for everybody. Just used multiple apps, instead of one. Thanks a lot :) -Ville tiistai 12. heinäkuuta 2016 16.19.12 UTC+3 James

Re: Url problem

2016-07-12 Thread James Schneider
On Jul 12, 2016 4:27 AM, "VilleP" wrote: > > Hi guys! > > I've got a little problem with my url "generating". Everytime I try to run my testserver and move through pages, that I've linked there it goes like this: > > http://testserver.local/home #(this is totally fine) >

Url problem

2016-07-12 Thread VilleP
Hi guys! I've got a little problem with my url "generating". Everytime I try to run my testserver and move through pages, that I've linked there it goes like this: http://testserver.local/home #(this is totally fine) (click on another page) http://testserver.local/home/page1 (click on another

Re: newbie URL problem

2012-07-26 Thread Felipe Sitta
I did what you said and put an third parameter on the track view and it worked. I think it's not an good practice, because is maintaining useless data, but for now its ok, at least the listing is done :D I still have to learn to use those regular expressions, its kinda tricky =/ Anyway, thanks

Re: newbie URL problem

2012-07-26 Thread Karen Tracey
On Thu, Jul 26, 2012 at 8:32 AM, Karen Tracey wrote: > On Thu, Jul 26, 2012 at 12:20 AM, Felipe Sitta wrote: > >> >> I messed up with the code and figured that the problem is with the urls >> patterns. Here are the codes: >> >> the url patterns from

Re: newbie URL problem

2012-07-26 Thread Karen Tracey
On Thu, Jul 26, 2012 at 12:20 AM, Felipe Sitta wrote: > I'm new to programming and I'm designing an demo website to get used to > django, web and database stuff. It's about racetracks. > > The structure is the following: > There's a menu with a link "Track List", it leads

Re: newbie URL problem

2012-07-26 Thread Daniel Roseman
On Thursday, 26 July 2012 05:20:34 UTC+1, Felipe Sitta wrote: > > I'm new to programming and I'm designing an demo website to get used to > django, web and database stuff. It's about racetracks. > > The structure is the following: > There's a menu with a link "Track List", it leads to a page with

newbie URL problem

2012-07-26 Thread Felipe Sitta
I'm new to programming and I'm designing an demo website to get used to django, web and database stuff. It's about racetracks. The structure is the following: There's a menu with a link "Track List", it leads to a page with an country list each one as a link. Each link leads to an list with

Re: URL problem

2010-07-19 Thread Stephan Huiser
Many thanks, that did the trick! On 07/19/2010 03:44 PM, Tim Sawyer wrote: I think the problem is your regular expression: ^(?P\d{4})/(?P[a-z]{3})/(?P\w{1,2})/(?P\w+)/$ This says - four digits for a year (2010 - ok) - slash - three letters from a-z for month (jul - ok) - slash - one or two

Re: URL problem

2010-07-19 Thread Tim Sawyer
I think the problem is your regular expression: ^(?P\d{4})/(?P[a-z]{3})/(?P\w{1,2})/(?P\w+)/$ This says - four digits for a year (2010 - ok) - slash - three letters from a-z for month (jul - ok) - slash - one or two letters for day (11 - not ok, this should be \d{1,2}) - slash - slug, made up of

URL problem

2010-07-19 Thread Stephan Huiser
Hi, i have a strange problem with urls. Project name: erp Application name: blog (and some more) problem occurs with certain view of blog-application This URL works fine: http://erp/blog/ When I use the URL below, I get an 404-error. http://erp/blog/2010/jul/11/1ste-blog-post/

Re: Weird URL problem

2009-06-12 Thread James Bennett
On Fri, Jun 12, 2009 at 7:07 PM, Kenneth Gonsalves wrote: > I always set it for VirtualHost - AFAIK the docs say to do so. No. The docs say to set it to the prefix under which the site is being served. If the site is located at the root of the server -- e.g., "/" -- then

Re: Weird URL problem

2009-06-12 Thread Kenneth Gonsalves
On Saturday 13 June 2009 05:37:56 Kenneth Gonsalves wrote: > > Commenting out that line solved the problem. We're using > > a VirtualHost definition, so it seems django.root should > > not be set for a VirtualHost. > > I always set it for VirtualHost - AFAIK the docs say to do so. to clarify, I

Re: Weird URL problem

2009-06-12 Thread Kenneth Gonsalves
On Friday 12 June 2009 18:35:33 Lars Stavholm wrote: > > Notice the Request URL, there's a slash missing, > > something along the way removed the slash. > > > > If I try http://mbf//jobs, I end up at the right place. > > > > Can anyone tell me what it is that is removing that slash? > > Found the

Re: Weird URL problem

2009-06-12 Thread Lars Stavholm
Lars Stavholm wrote: > Hi All, > > got a problem that's slowly driving me crazy: > > http://mbf takes me to my apache+mod_python+django application. > > However, if I click a link, e.g. http://mbf/jobs, I get the > following exception: > > TypeError at jobs/ > 'NoneType' object is not

Weird URL problem

2009-06-12 Thread Lars Stavholm
Hi All, got a problem that's slowly driving me crazy: http://mbf takes me to my apache+mod_python+django application. However, if I click a link, e.g. http://mbf/jobs, I get the following exception: TypeError at jobs/ 'NoneType' object is not iterable Request Method: GET Request URL:

Re: flat page url problem

2009-04-07 Thread grimmus
After reading other similar posts all i needed to change was my site_id to 2 On Apr 6, 10:36 am, grimmus wrote: > Hi, > > I was experimenting locally using flatpages. I didnt add anything > extra into the urls.py file to handle these pages and they displayed > correctly

flat page url problem

2009-04-06 Thread grimmus
Hi, I was experimenting locally using flatpages. I didnt add anything extra into the urls.py file to handle these pages and they displayed correctly in the browser (using the django runserver) When i deploy my app to apache i get the error : The current URL, , didn't match any of these. My

url problem

2008-08-24 Thread Handle Huang
Hi all: I have a strange problem, In my project urls.py I define as follow: urlpatterns = patterns('', # Example: # (r'^urus/', include('urus.foo.urls')), # Uncomment this for admin: (r'^admin/', include('django.contrib.admin.urls')), (r'^site_media/(?P.*)$',

Re: url problem

2008-08-24 Thread Handle Huang
thanks for your replay. but my problem is still here, the include function seems not work( I use the last svn version of Django ). And you say why I having serveral different URLS pointing to the same view is that the inculde function not work, I have to point it directly (just to test if the view

Re: url problem

2008-08-24 Thread Handle Huang
urlpatterns = patterns('', url(r'^$', 'urus.app.views.main', name="main"), ) And in the last version when I use this way to define the URL an invalid syntax will popup. 2008/8/24 Handle Huang <[EMAIL PROTECTED]> > thanks for your replay. > but my problem is still here, the include function

Re: url problem

2008-08-24 Thread timc3
It looks like you are getting a little confused. For a start you don't match anything for just http://localhost:8000/ (r'^$', 'urus.app.views.main') Don't know whether thats on purpose or not. anyway. > urlpatterns = patterns('', >     # Example: >     # (r'^urus/', include('urus.foo.urls')),

Re: Named URL problem

2007-05-10 Thread Olivier Guilyardi
[EMAIL PROTECTED] wrote: > I'd suggest trying {% url telemeta-collection-detail object.id %} Thanks that fixed it ! It's not object.id, it's p.id, but it wasn't defined at this point in the template. It put the statement back in the loop where p.id is defined and it works great :) -- Olivier

Re: Named URL problem

2007-05-10 Thread [EMAIL PROTECTED]
I'd suggest trying {% url telemeta-collection-detail object.id %} --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To

Named URL problem

2007-05-10 Thread Olivier Guilyardi
Hi, Named URLs don't work for me so far. I'm using rev 5180. In my site's urls.py I have: (r'^', include('telemeta.urls')), In telemeta/urls.py: url(r'^collections/(?P[0-9A-Z._-]+)/?$', 'django.views.generic.list_detail.object_detail', dict(all_collections,

Re: {% url %} problem

2007-03-14 Thread Malcolm Tredinnick
On Tue, 2007-03-13 at 18:19 +0300, Ivan Sagalaev wrote: > akonsu wrote: > > i think the reason is two entries in the urlpatterns with the same > > view. is this a bug? > > Well, not exactly a bug but a limitation of "reverse" function that {% > url %} uses to do actual resolving. Incidentally

Re: {% url %} problem

2007-03-13 Thread Ivan Sagalaev
akonsu wrote: > thank you Ivan, > > the problem with collapsing is that the 'name' parameter in my view > does not get the default value then if the url is empty. Oh... Indeed :-( Then may be just checking the value inside the function is your best bet for this case.

Re: {% url %} problem

2007-03-13 Thread Ivan Sagalaev
akonsu wrote: > i think the reason is two entries in the urlpatterns with the same > view. is this a bug? Well, not exactly a bug but a limitation of "reverse" function that {% url %} uses to do actual resolving. Incidentally there is a thread in django-developers[1] about solving a similar

{% url %} problem

2007-03-13 Thread akonsu
hello, in urls.py: urlpatterns = patterns('', (r'^/?$', 'path.to.myview'), (r'^(\w+)/?$', 'path.to.myview')) in views.py: def myview(request, name = 'index') : ... in template: {% url path.to.myview var %} the url tag in the template is rendered as "//?" if i comment out the first item in