Re: django 1.4 : gunicorn can't find static files. settings option

2014-01-05 Thread Mahdi Mazaheri
Hi Huseyin,

I have the same problem as Bo but this again did not solve my problem. This 
works with django webserver (runserver) but not with gunicorn.
Any Ideas?

Thanks in advance
Mahdi

On Wednesday, May 16, 2012 10:38:39 AM UTC+4:30, huseyin yilmaz wrote:
>
> For development, you could add this to main urls.py like this. 
> (r'^static/(?P.*)$', 'django.views.static.serve', 
> {'document_root': settings.STATIC_ROOT, 'show_indexes':True}), 
>
> But for production use your web server to serve static files. 
>
> At least this is how I solved it. I hope that helps. 
>
> On May 16, 5:56 am, Bolang  wrote: 
> > Hi, 
> > I just started to using django 1.4 with gunicorn 0.14.3 
> > With ./manage.py runserver , i can start django properly and django can 
> > find my files in static directory. 
> > Then i use gunicorn and then gunicorn can't find my files in static 
> > directory. 
> > 
> > I have tried these combination 
> > gunicorn myproject.wsgi:application --settings myproject.settings 
> > gunicorn myproject.wsgi:application --settings 
> /absolute/path/to/settings.py 
> > ./manage.py run_gunicorn --settings=myproject.settings 
> > 
> > All of the commands can start django, but can't find my files in static 
> > directory 
> > 
> > I also found this issuehttps://github.com/benoitc/gunicorn/issues/322 
> > But, i can't find the solution from that page. 
> > 
> > Any kind of help will be appreciated 
> > 
> > Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6e99aaf4-44e9-4fff-8ada-d5fc96e55d7b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Pyes and global connection

2013-09-20 Thread Mahdi Mazaheri
Hi
I want to use Pyes with django. The problem is that I dont know how to make 
a global connection in django so get rid of overhead of openning and 
closing the connection.
this is how making connection with pyes:
import pyes
conn = pyes.ES('127.0.0.1:9500')
should I define a global variable(Where?)? or there is better approach for 
this.

Thanks a lot in advance
Mahdi

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.