Re: In URL dispatcher, is there a way to pass values of Named Groups directly to template?

2008-11-05 Thread yuanyun.ken
Thanks for all gays' great help. This does help me a lot. --~--~-~--~~~---~--~~ 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 unsubscribe from th

How to get project's root path in template?

2008-11-05 Thread yuanyun.ken
I see in django.contrib.admin, there are {{ root_path }} and {{ app_path }} in its base.html. But if I use them in my template, they are always empty. What I should do to enable these variables. Any help is greatly appreciated. --~--~-~--~~~---~--~~ You received th

Re: How to get site's root path in Django

2008-10-30 Thread yuanyun.ken
hi, Karen, Thanks for your reply. I am sure I hit that problem, http://code.djangoproject.com/ticket/8906 and I wish some excellent gays have time to investigate, and provide a fix. For now, I would just include root path in LOGIN_URL and LOGOUT_URL variable. On Oct 29, 12:46 am, "Karen Tracey" <

Re: How to get value of query string in template

2008-10-30 Thread yuanyun.ken
hi, bruno, Thanks very much for your reply, it does help a lot... On Oct 29, 1:29 am, bruno desthuilliers <[EMAIL PROTECTED]> wrote: > If you add "django.core.context_processors.request" to your > settings.CONTEXT_PROCESSORS and use RequestContext objects in your > views, you'll have access to t

How to get value of query string in template

2008-10-28 Thread yuanyun.ken
Hi,I am a newbie to Django, and will use it in my latest project right away. now I encounter a little problem. How can I get value of query string in template? http://localhost/mysite/login/?next=/mysite/product/ My aim is to set next value in my login.html, if there is "next" in query string, u

Re: How to get site's root path in Django

2008-10-28 Thread yuanyun.ken
Graham, thanks for your kindly help. I know we don't need root url when configure url mapping. but it seems that LOGIN_URL is somewhat special. When I set LOGIN_URL = '/login/' accessing http://localhost/root_url/login/ is ok, but when I access some pages which need login first, I will got 404 e

Re: How to get site's root path in Django

2008-10-27 Thread yuanyun.ken
Steve, Thanks for your expeditious reply. because our apache server includes other apps, I can not deploy my app to the root of the server. and I am sure, many Django apps are not deployed to server's root too. so there must be a way to handle this problem. --~--~-~--~~~---

How to get site's root url path in Django

2008-10-27 Thread yuanyun.ken
Hi, all great Django users and developers, I have a little problem. To make @login_required work, I have to configure those in settings.py: root_url = '/root_url/' LOGIN_URL = root_url + '/login/' LOGOUT_URL = root_url + '/logout/' But this is obviously not a good idea, as it couples with projec

How to get site's root path in Django

2008-10-27 Thread yuanyun.ken
Hi, all great Django users and developers, I have a little problem. To make @login_required work, I have to configure those in settings.py: root_url = '/root_url/' LOGIN_URL = root_url + '/login/' LOGOUT_URL = root_url + '/logout/' But this is obviously not a good idea, as it couples with projec

In URL dispatcher, is there a way to pass values of Named Groups directly to template?

2008-10-20 Thread yuanyun.ken
Hi,all great Django users and developers, I have a little problem. In URL dispatcher, is there a way to pass values of Named Groups directly to template, don't want to write a view function just for this. for example, I have the following urls: (r'^machine_logs/$', direct_to_template, {'templa