django.core.exceptions.ImproperlyConfigured:

2017-10-01 Thread harsh sharma
i am getting this error whenever i m trying to run django-admin runserver django.core.exceptions.ImproperlyConfigured: Requested setting DEBUG, but settings are not configured. You must eit her define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing s

Re: Help with staticfiles in deployment

2017-10-01 Thread Alexander Joseph
environ allows you to use environment variables in your settings files, heres the docs https://django-environ.readthedocs.io/en/latest/# and my nginx config look like this... thanks server { listen 80; server_name [domain name]; ssl_dhparam /etc/ssl/certs/dhparam.pem; location =

Re: Help with staticfiles in deployment

2017-10-01 Thread Antonis Christofides
Hi, 1) What is environ? Could you point to its documentation page? 2) Could you show your nginx configuration? Antonis Christofides http://djangodeployment.com On 2017-10-01 03:40, Alexander Joseph wrote: > Hello, > > My site is deployed on an ubuntu/nginx/gunicorn droplet on digitalOcean. For

Re: get_ip_address() not working when used Custom Decorators

2017-10-01 Thread mitesh_django
Manu, Try print kwargs.get('request')... You should get Django HTTPRequest Object, pass that to get_client_ip method. On Thursday, September 28, 2017 at 3:03:09 PM UTC-4, Mannu Gupta wrote: > > While making a customer decorator in django, the code is here :- > > def owner_required(function): >

Re: get_ip_address() not working when used Custom Decorators

2017-10-01 Thread Constantine Covtushenko
Sorry for late response, I meant that you might using that decorator in 2 places. And asked about that. It seems like you specified `@owner_required` to decorate your view function. But that decorator behave like `@owner_required()`. With your last response I see that decorated function instead

Re: Setting up Django for the first time, urls.py and settings.py

2017-10-01 Thread Jani Tiainen
Hi. Urls changed so that you can't pass view as a string anymore. If you're looking good tutorial Django Girls do have one. And it's using recent djangi. 1.10.2017 2.40 ip. "drone4four" kirjoitti: > I’m playing with Django for the first time. I am using a guide called, > “Python > from Scra

Setting up Django for the first time, urls.py and settings.py

2017-10-01 Thread drone4four
I’m playing with Django for the first time. I am using a guide called, “Python from Scratch - Creating a Dynamic Website ” by [b]Tuts+ Code[/b] from YouTube. It’s kinda old. It was first posted in November 2011 and Django has evolved considerab