UrlConf problem when capture value from url

2012-04-20 Thread DanYun Liu
When I use url pattern like this "/search/(\s+)","myview" : django will set mydomain/search as the root domain, so the css and js will not request correctly: in my template: the request url for the index.css is: http://mydomain/search/styles/index.css but not: http://mydomain/styles/index.css

Re: UrlConf problem when capture value from url

2012-04-20 Thread DanYun Liu
yes, it works well :) On Fri, Apr 20, 2012 at 10:11 PM, Daniel Sokolowski < daniel.sokolow...@klinsight.com> wrote: > Yes {{STATIC_URL}} - > https://docs.djangoproject.com/en/dev/howto/static-files/#using-django-contrib-staticfiles > > > > Does that help? >

why django document does not specify how to use non-global middleware

2012-04-25 Thread DanYun Liu
I am new to django, before django I used struts2 to build web application. It is common that we need to apply some middleware to a part of views and others not. I didn't find any userful information on the django site, so I searched the stackoverflow and got the right answer. http://stackoverflow.

how to get the variable in the context

2012-04-28 Thread DanYun Liu
I defined a context processor to pass the login user info to the template. and, I also need to use it in the view. is there any way to get the variable from the context? -- Pursuit the freedom of the soul. -- You received this message because you are subscribed to the Google Groups "Django us

Re: Parent module does not exist

2012-05-26 Thread DanYun Liu
does wikicamp is your working directory? try to make wikicamp as a package to add __init__.py On Sun, May 27, 2012 at 11:45 AM, Ali Shaikh wrote: > Hello!! > > > ViewDoesNotExist at /wikicamp/start/ > Could not import wikicamp.views.view_page. Parent module > wikicamp.views does no

The idle process does not destroy when request finished

2012-07-26 Thread DanYun Liu
As the visit user is growing fast, I switch the method=threaded to method=prefork to handle more quest. But the service then become not available sometimes, I found that one or two processes were created every minute and the old ones still here with CPU usage 0%, idled. I don't have any idea whe

log file will be overwrite when use prefork?

2012-08-09 Thread DanYun Liu
below is the logging config in setting.py. only the newest logs in the output file.. It seems the log file is overwrite when new process been forked LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'formatters': { 'standard': { 'format': '%(levelname)s