Re: Help in designing excel like sheet in Django/python

2020-04-13 Thread suman patel
Hey,
   Thanks all for your suggestions. I am exploring Jexcel and its very
good.

Thx Guerrero.

Regards
Patel

On Sat, Apr 11, 2020 at 1:43 AM Gerardo Palazuelos Guerrero <
gerardo.palazue...@gmail.com> wrote:

> Hi,
> I used in the past the following library:
> https://bossanova.uk/jexcel/v3/
>
> It enables you to incorporate kind-of Excel spreadsheet so users feels in
> home; it basically reacts to changes on cells/rows and you decide what to
> do. It really has lots of good features.
>
> On our case, an internal REST API (in .NET) provided and received the
> data. Frontend in jQuery managed the rest.
>
> Good luck.
>
> ---
> Gerardo Palazuelos
> Enviado desde mi iPhone
>
>
> El 10 abr 2020, a la(s) 23:08, dvij parekh 
> escribió:
>
> 
>
>
> On Saturday, April 11, 2020 at 7:03:20 AM UTC+5:30, s.patel wrote:
>>
>> Hi All:
>>   I need advice on how to design spreadsheet like screen using
>> python/Django. I need some idea around this for my college project.
>>
>> Requirement: Need to build math calculation like framework where user can
>> select rows/column and perform calculations like sum, Mean etc
>> Similar to excel. something like this:
>>
>> Do we have any package already. I searched we can do this with eval
>> function but need some ideas around this.
>>
>> Thanks,
>> Patel
>>
>
> As told above you can use handstone or can code custome using javascript
> if you want to know more contact me on - dvijparekh1...@gmail.com
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/5ac20dee-1d13-4b0d-b203-aae17791809f%40googlegroups.com
> 
> .
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/6F097C6A-04B4-4CEB-85FC-08ED30ABF09C%40gmail.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPjHK8B6FVQQ_P9Kiin_6XrqRROuGcgXqWzvEtP1RA5yvOxA_A%40mail.gmail.com.


Re: Using external libraries for analytics

2020-04-13 Thread Roger Gammans
On Mon, 2020-04-13 at 13:59 -0700, 'MH' via Django users wrote:
> d to create some kind of dashboard for myself. So I googled some
> applications of django for analytical dashboards and they proposed
> things like highcharts. From what I read I got the impression that I
> would use external sources and as if I would transmit data to other
> sites (e.g. 
> https://www.highcharts.com/blog/tutorials/create-a-dashboard-using-highcharts-and-django/
> ). But perhaps I misunderstood that.
> 

Plotly is one good alternative. There however are many Python based
visualisation libraries tuned for use with Jupyter, it shouldn't be to
difficult to use them with django. Plotly can defiantly be used as a
all local library (but don't confuse it with dash ), although it does
or did have online alternates.

If you are conformable doing more at the frontend there are quite a few
js visualisation tools (often based on d3), restricting myself to just
the open source ones, I can find/know about  nvd3js, dygraphs,
chart.js, n3-charts, c3  and more.

There are many alternatives and it can definitely be done a) open
source, and b) without uploading the data to a third party.


-- 
Roger Gammans 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/329b39f6dec92ee7dc155b9ea91e87c0179aaa7d.camel%40gammascience.co.uk.


Using external libraries for analytics

2020-04-13 Thread 'MH' via Django users
Hi

I wanted to create some kind of dashboard for myself. So I googled some 
applications of django for analytical dashboards and they proposed things 
like highcharts. From what I read I got the impression that I would use 
external sources and as if I would transmit data to other sites (e.g. 
https://www.highcharts.com/blog/tutorials/create-a-dashboard-using-highcharts-and-django/).
 
But perhaps I misunderstood that.

If you have any experience with libraries for the visualization of 
analytical data, what would you recommend that renders the data on premise?

Best regards
MH

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e995a9f3-0368-4081-9961-6c82d5822dc2%40googlegroups.com.


Re: Integrate a third pary app in Django and Gunicorn

2020-04-13 Thread 'MH' via Django users
Friendly push :)



On Wednesday, April 8, 2020 at 6:09:21 PM UTC+2, MH wrote:
>
> Hi everyone
>
> I created two first, very small apps with Django and serve them on my NAS 
> with gunicorn and nginx as reverse proxy. That took me quite a while as I 
> am not an experienced coder or administrator. Now I successfully installed 
> Mayan EDMS which uses its own Python instance in an venv and uses its own 
> gunicorn. Well, that works, but I do not know if it is so clever or 
> recommendable to have to multiple Django and gunicorn instances running on 
> the same machine.
>
> What do you think about that?
>
> And is it possible to integrate a big app like Mayan EDMS in my existing 
> small Django/gunicorn environment? I always thought that Django could 
> easily take over one or another app just by copying the corresponding 
> folder and registering the app in the settings.py.
>
> Best regards
> MH
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/41cbfcf1-975b-47cb-b882-1b711b785794%40googlegroups.com.


Scanning Uploaded Files

2020-04-13 Thread 'Aaron Wilson' via Django users
What is the recommended method to scan uploaded files for viruses? I see a 
lot of information about pyclamd which appears to be unmaintained. 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1c972078-dde2-4c02-9678-84129b3f96ef%40googlegroups.com.


Re: 502 Bad Gateway nginx/1.14.0 (Ubuntu)

2020-04-13 Thread Jagtar Singh Lakhyan
@soham will keep in mind next time
You forgot one step after enabling ufw.

You have to execute sudo ufw allow ssh.

@Aldian will try n update the same

On Mon, Apr 13, 2020 at 10:30 PM Jagtar Singh Lakhyan <
jagtar.lakhe...@gmail.com> wrote:

> sudo journalctl -u gunicorn
>
> -- Logs begin at Fri 2020-04-10 23:00:11 IST, end at Mon 2020-04-13
> 21:54:16 IST. --
>
> Apr 13 19:49:35 wms systemd[1]: Started gunicorn daemon.
>
> Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2515]
> [INFO] Starting gunicorn 20.0.4
>
> Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2515]
> [INFO] Listening at: unix:/run/gunicorn.sock (2515)
>
> Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2515]
> [INFO] Using worker: sync
>
> Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2520]
> [INFO] Booting worker with pid: 2520
>
> Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2521]
> [INFO] Booting worker with pid: 2521
>
> Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2522]
> [INFO] Booting worker with pid: 2522
>
> Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2520]
> [ERROR] Exception in worker process
>
> Apr 13 19:49:36 wms gunicorn[2515]: Traceback (most recent call last):
>
> Apr 13 19:49:36 wms gunicorn[2515]:   File
> "/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/arbiter.py",
> line 583, in spawn_worker
>
> Apr 13 19:49:36 wms gunicorn[2515]: worker.init_process()
>
> Apr 13 19:49:36 wms gunicorn[2515]:   File
> "/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/workers/base.py",
> line 119, in init_process
>
> Apr 13 19:49:36 wms gunicorn[2515]: self.load_wsgi()
>
> Apr 13 19:49:36 wms gunicorn[2515]:   File
> "/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/workers/base.py",
> line 144, in load_wsgi
>
> Apr 13 19:49:36 wms gunicorn[2515]: self.wsgi = self.app.wsgi()
>
> Apr 13 19:49:36 wms gunicorn[2515]:   File
> "/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/app/base.py",
> line 67, in wsgi
>
> Apr 13 19:49:36 wms gunicorn[2515]: self.callable = self.load()
>
> Apr 13 19:49:36 wms gunicorn[2515]:   File
> "/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py",
> line 49, in load
>
> Apr 13 19:49:36 wms gunicorn[2515]: return self.load_wsgiapp()
>
> Apr 13 19:49:36 wms gunicorn[2515]:   File
> "/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py",
> line 39, in load_wsgiapp
>
> Apr 13 19:49:36 wms gunicorn[2515]: return
> util.import_app(self.app_uri)
>
> Apr 13 19:49:36 wms gunicorn[2515]:   File
> "/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/util.py",
> line 358, in import_app
>
> Apr 13 19:49:36 wms gunicorn[2515]: mod =
> importlib.import_module(module)
>
> Apr 13 19:49:36 wms gunicorn[2515]:   File
> "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
>
> Apr 13 19:49:36 wms gunicorn[2515]: return
> _bootstrap._gcd_import(name[level:], package, level)
>
> Apr 13 19:49:36 wms gunicorn[2515]:   File " importlib._bootstrap>", line 994, in _gcd_import
>
> Apr 13 19:49:36 wms gunicorn[2515]:   File " importlib._bootstrap>", line 971, in _find_and_load
>
> Apr 13 19:49:36 wms gunicorn[2515]:   File " importlib._bootstrap>", line 953, in _find_and_load_unlocked
>
> Apr 13 19:49:36 wms gunicorn[2515]: ModuleNotFoundError: No module named
> 'iitians.wsgi'
>
> Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2522]
> [ERROR] Exception in worker process
>
> Apr 13 19:49:36 wms gunicorn[2515]: Traceback (most recent call last):
>
> Apr 13 19:49:36 wms gunicorn[2515]:   File
> "/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/arbiter.py",
> line 583, in spawn_worker
>
> Apr 13 19:49:36 wms gunicorn[2515]: worker.init_process()
>
> Apr 13 19:49:36 wms gunicorn[2515]:   File
> "/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/workers/base.py",
> line 119, in init_process
>
> Apr 13 19:49:36 wms gunicorn[2515]: self.load_wsgi()
>
> Apr 13 19:49:36 wms gunicorn[2515]:   File
> "/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/workers/base.py",
> line 144, in load_wsgi
>
> Apr 13 19:49:36 wms gunicorn[2515]: self.wsgi = self.app.wsgi()
>
> Apr 13 19:49:36 wms gunicorn[2515]:   File
> "/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/app/base.py",
> line 67, in wsgi
>
>
> $ sudo nano /etc/systemd/system/gunicorn.service
>
>
> -- Logs begin at Fri 2020-04-10 23:00:11 IST, end at Mon 2020-04-13
> 22:26:42 IST. --
>
> Apr 13 19:49:35 wms systemd[1]: Started gunicorn daemon.
>
> Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2515]
> [INFO] Starting gunicorn 20.0.4
>
> Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2515]
> [INFO] Listening at: unix:/run/gunicorn.sock (2515)
>
> Apr 13 

Re: 502 Bad Gateway nginx/1.14.0 (Ubuntu)

2020-04-13 Thread Jagtar Singh Lakhyan
sudo journalctl -u gunicorn

-- Logs begin at Fri 2020-04-10 23:00:11 IST, end at Mon 2020-04-13
21:54:16 IST. --

Apr 13 19:49:35 wms systemd[1]: Started gunicorn daemon.

Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2515]
[INFO] Starting gunicorn 20.0.4

Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2515]
[INFO] Listening at: unix:/run/gunicorn.sock (2515)

Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2515]
[INFO] Using worker: sync

Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2520]
[INFO] Booting worker with pid: 2520

Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2521]
[INFO] Booting worker with pid: 2521

Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2522]
[INFO] Booting worker with pid: 2522

Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2520]
[ERROR] Exception in worker process

Apr 13 19:49:36 wms gunicorn[2515]: Traceback (most recent call last):

Apr 13 19:49:36 wms gunicorn[2515]:   File
"/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/arbiter.py",
line 583, in spawn_worker

Apr 13 19:49:36 wms gunicorn[2515]: worker.init_process()

Apr 13 19:49:36 wms gunicorn[2515]:   File
"/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/workers/base.py",
line 119, in init_process

Apr 13 19:49:36 wms gunicorn[2515]: self.load_wsgi()

Apr 13 19:49:36 wms gunicorn[2515]:   File
"/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/workers/base.py",
line 144, in load_wsgi

Apr 13 19:49:36 wms gunicorn[2515]: self.wsgi = self.app.wsgi()

Apr 13 19:49:36 wms gunicorn[2515]:   File
"/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/app/base.py",
line 67, in wsgi

Apr 13 19:49:36 wms gunicorn[2515]: self.callable = self.load()

Apr 13 19:49:36 wms gunicorn[2515]:   File
"/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py",
line 49, in load

Apr 13 19:49:36 wms gunicorn[2515]: return self.load_wsgiapp()

Apr 13 19:49:36 wms gunicorn[2515]:   File
"/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/app/wsgiapp.py",
line 39, in load_wsgiapp

Apr 13 19:49:36 wms gunicorn[2515]: return util.import_app(self.app_uri)

Apr 13 19:49:36 wms gunicorn[2515]:   File
"/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/util.py",
line 358, in import_app

Apr 13 19:49:36 wms gunicorn[2515]: mod =
importlib.import_module(module)

Apr 13 19:49:36 wms gunicorn[2515]:   File
"/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module

Apr 13 19:49:36 wms gunicorn[2515]: return
_bootstrap._gcd_import(name[level:], package, level)

Apr 13 19:49:36 wms gunicorn[2515]:   File "",
line 994, in _gcd_import

Apr 13 19:49:36 wms gunicorn[2515]:   File "",
line 971, in _find_and_load

Apr 13 19:49:36 wms gunicorn[2515]:   File "",
line 953, in _find_and_load_unlocked

Apr 13 19:49:36 wms gunicorn[2515]: ModuleNotFoundError: No module named
'iitians.wsgi'

Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2522]
[ERROR] Exception in worker process

Apr 13 19:49:36 wms gunicorn[2515]: Traceback (most recent call last):

Apr 13 19:49:36 wms gunicorn[2515]:   File
"/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/arbiter.py",
line 583, in spawn_worker

Apr 13 19:49:36 wms gunicorn[2515]: worker.init_process()

Apr 13 19:49:36 wms gunicorn[2515]:   File
"/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/workers/base.py",
line 119, in init_process

Apr 13 19:49:36 wms gunicorn[2515]: self.load_wsgi()

Apr 13 19:49:36 wms gunicorn[2515]:   File
"/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/workers/base.py",
line 144, in load_wsgi

Apr 13 19:49:36 wms gunicorn[2515]: self.wsgi = self.app.wsgi()

Apr 13 19:49:36 wms gunicorn[2515]:   File
"/home/wms/iitians/iitiansenv/lib/python3.6/site-packages/gunicorn/app/base.py",
line 67, in wsgi


$ sudo nano /etc/systemd/system/gunicorn.service


-- Logs begin at Fri 2020-04-10 23:00:11 IST, end at Mon 2020-04-13
22:26:42 IST. --

Apr 13 19:49:35 wms systemd[1]: Started gunicorn daemon.

Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2515]
[INFO] Starting gunicorn 20.0.4

Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2515]
[INFO] Listening at: unix:/run/gunicorn.sock (2515)

Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2515]
[INFO] Using worker: sync

Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2520]
[INFO] Booting worker with pid: 2520

Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2521]
[INFO] Booting worker with pid: 2521

Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2522]
[INFO] Booting worker with pid: 2522

Apr 13 19:49:36 wms gunicorn[2515]: [2020-04-13 19:49:36 +0530] [2520]
[ERROR] Exception in worker process


Re: 502 Bad Gateway nginx/1.14.0 (Ubuntu)

2020-04-13 Thread Jagtar Singh Lakhyan
Now im following this guide
https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-18-04

its working till domain/ip:8000 as i already said but

curl --unix-socket /run/gunicorn.sock localhost

curl: (7) Couldn't connect to server


and


sudo systemctl status gunicorn

[sudo] password for wms:

*●* gunicorn.service - gunicorn daemon

   Loaded: loaded (/etc/systemd/system/gunicorn.service; disabled; vendor
preset: enabled)

   Active: *failed* (Result: exit-code) since Mon 2020-04-13 20:52:38 IST;
1h 28min ago

  Process: 4643 ExecStart=/home/wms/iitians/iitiansenv/bin/gunicorn
--access-logfile - --workers 3 --bind unix:/run/gunicorn.

 Main PID: 4643 (code=exited, status=3)


Apr 13 20:52:38 wms gunicorn[4643]:   File "",
line 953, in _find_and_load_unlocked

Apr 13 20:52:38 wms gunicorn[4643]: ModuleNotFoundError: No module named
'iitians.wsgi'

Apr 13 20:52:38 wms gunicorn[4643]: [2020-04-13 20:52:38 +0530] [4646]
[INFO] Worker exiting (pid: 4646)

Apr 13 20:52:38 wms gunicorn[4643]: [2020-04-13 20:52:38 +0530] [4643]
[INFO] Shutting down: Master

Apr 13 20:52:38 wms gunicorn[4643]: [2020-04-13 20:52:38 +0530] [4643]
[INFO] Reason: Worker failed to boot.

Apr 13 20:52:38 wms systemd[1]: *gunicorn.service: Main process exited,
code=exited, status=3/NOTIMPLEMENTED*

Apr 13 20:52:38 wms systemd[1]: *gunicorn.service: Failed with result
'exit-code'.*

Apr 13 20:52:38 wms systemd[1]: *gunicorn.service: Start request repeated
too quickly.*

Apr 13 20:52:38 wms systemd[1]: *gunicorn.service: Failed with result
'exit-code'.*

Apr 13 20:52:38 wms systemd[1]: *Failed to start gunicorn daemon.*

On Mon, Apr 13, 2020 at 7:19 PM Aldian Fazrihady  wrote:

> If you turned off gunicorn, will you still get the 502 error? If yes,
> the orginal error it means your nginx cannot connect to your gunicorn.
>
> Have you tested your app on dev server, i.e: `python manage.py runserver` ?
>
> On Sat, Apr 11, 2020 at 11:53 PM Jagtar Singh Lakhyan <
> jagtar.lakhe...@gmail.com> wrote:
>
>> Im trying to deploy django app using nginx & gunicorn but its showing
>> error
>>
>> sudo nginx -t
>>
>> nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
>>
>> nginx: configuration file /etc/nginx/nginx.conf test is successful
>>
>>
>> sudo systemctl status gunicorn.service
>>
>> gunicorn.service - gunicorn service
>>
>>Loaded: loaded (/etc/systemd/system/gunicorn.service; enabled; vendor
>> preset:
>>
>>Active: *active (running)* since Sat 2020-04-11 21:19:19 IST; 11s ago
>>
>>  Main PID: 16326 (gunicorn)
>>
>> Tasks: 4 (limit: 1689)
>>
>>
>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/b1031a40-e33c-4bca-8764-13849c75968e%40googlegroups.com
>> 
>> .
>>
>
>
> --
> Regards,
>
> Aldian Fazrihady
> http://aldianfazrihady.com
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAN7EoAaeBOPBq0NbvJYYV1n%3D7ZZkKLjcvYvVE1Aiw9ero8wS%2BA%40mail.gmail.com
> 
> .
>


-- 

*jagtar singh*founder & CEO
LinkedIn 
Twitter 

web 1: Network 
web 2: WMS 
web 3: Conference 

Android App 1: Network

Android App 2: WMS

Android App 3: Conference


LinkedIn

LinkedIn2 
Twitter 
*IITIAN'S ADVANCED SCHOOL OF COMPETITION PVT. LTD.
*



-- 
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 view this discussion on the web visit 

Re: 502 Bad Gateway nginx/1.14.0 (Ubuntu)

2020-04-13 Thread Aldian Fazrihady
If you turned off gunicorn, will you still get the 502 error? If yes,
the orginal error it means your nginx cannot connect to your gunicorn.

Have you tested your app on dev server, i.e: `python manage.py runserver` ?

On Sat, Apr 11, 2020 at 11:53 PM Jagtar Singh Lakhyan <
jagtar.lakhe...@gmail.com> wrote:

> Im trying to deploy django app using nginx & gunicorn but its showing error
>
> sudo nginx -t
>
> nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
>
> nginx: configuration file /etc/nginx/nginx.conf test is successful
>
>
> sudo systemctl status gunicorn.service
>
> gunicorn.service - gunicorn service
>
>Loaded: loaded (/etc/systemd/system/gunicorn.service; enabled; vendor
> preset:
>
>Active: *active (running)* since Sat 2020-04-11 21:19:19 IST; 11s ago
>
>  Main PID: 16326 (gunicorn)
>
> Tasks: 4 (limit: 1689)
>
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/b1031a40-e33c-4bca-8764-13849c75968e%40googlegroups.com
> 
> .
>


-- 
Regards,

Aldian Fazrihady
http://aldianfazrihady.com

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAN7EoAaeBOPBq0NbvJYYV1n%3D7ZZkKLjcvYvVE1Aiw9ero8wS%2BA%40mail.gmail.com.


Re: i want to change database sqllite to mysql but show error

2020-04-13 Thread myproblemsolution38
Just go to the settings.py file and make the following changes in Database 
section:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'your_DatabaseName',
'USER':'your_username',
'PASSWORD':'your_password',
'HOST':'localhost',
'PORT':'your_portnumber'
}
}

On Sunday, April 12, 2020 at 5:37:21 PM UTC+5, Arun Sharma wrote:
>
> python manage.py runserver
>
>
>
> Watching for file changes with StatReloader
> Exception in thread django-main-thread:
> Traceback (most recent call last):
>   File 
> "C:\Users\Arunkumar\PycharmProjects\app2\venv\lib\site-packages\django\db\backends\mysql\base.py",
>  
> line 16, in
> 
> import MySQLdb as Database
> ModuleNotFoundError: No module named 'MySQLdb'
>
> The above exception was the direct cause of the following exception:
>
> Traceback (most recent call last):
>   File 
> "C:\Users\Arunkumar\AppData\Local\Programs\Python\Python37-32\lib\threading.py",
>  
> line 926, in _bootstrap_inner
> self.run()
>   File 
> "C:\Users\Arunkumar\AppData\Local\Programs\Python\Python37-32\lib\threading.py",
>  
> line 870, in run
> self._target(*self._args, **self._kwargs)
>   File 
> "C:\Users\Arunkumar\PycharmProjects\app2\venv\lib\site-packages\django\utils\autoreload.py",
>  
> line 53, in wrappe
> r
> fn(*args, **kwargs)
>   File 
> "C:\Users\Arunkumar\PycharmProjects\app2\venv\lib\site-packages\django\core\management\commands\runserver.py",
> line 109, in inner_run
> autoreload.raise_last_exception()
>   File 
> "C:\Users\Arunkumar\PycharmProjects\app2\venv\lib\site-packages\django\utils\autoreload.py",
>  
> line 76, in raise_
> last_exception
> raise _exception[1]
>   File 
> "C:\Users\Arunkumar\PycharmProjects\app2\venv\lib\site-packages\django\core\management\__init__.py",
>  
> line 357,
> in execute
> autoreload.check_errors(django.setup)()
>   File 
> "C:\Users\Arunkumar\PycharmProjects\app2\venv\lib\site-packages\django\utils\autoreload.py",
>  
> line 53, in wrappe
> r
> fn(*args, **kwargs)
>   File 
> "C:\Users\Arunkumar\PycharmProjects\app2\venv\lib\site-packages\django\__init__.py",
>  
> line 24, in setup
> apps.populate(settings.INSTALLED_APPS)
>   File 
> "C:\Users\Arunkumar\PycharmProjects\app2\venv\lib\site-packages\django\apps\registry.py",
>  
> line 114, in populate
>
> app_config.import_models()
>   File 
> "C:\Users\Arunkumar\PycharmProjects\app2\venv\lib\site-packages\django\apps\config.py",
>  
> line 211, in import_mod
> els
> self.models_module = import_module(models_module_name)
>   File 
> "C:\Users\Arunkumar\AppData\Local\Programs\Python\Python37-32\lib\importlib\__init__.py",
>  
> line 127, in import_m
> odule
> return _bootstrap._gcd_import(name[level:], package, level)
>   File "", line 1006, in _gcd_import
>   File "", line 983, in _find_and_load
>   File "", line 967, in 
> _find_and_load_unlocked
>   File "", line 677, in _load_unlocked
>   File "", line 728, in exec_module
>   File "", line 219, in 
> _call_with_frames_removed
>   File "C:\Users\Arunkumar\PycharmProjects\app2\project\models.py", line 
> 4, in 
> class Project(models.Model):
>   File 
> "C:\Users\Arunkumar\PycharmProjects\app2\venv\lib\site-packages\django\db\models\base.py",
>  
> line 121, in __new__
>
> new_class.add_to_class('_meta', Options(meta, app_label))
>   File 
> "C:\Users\Arunkumar\PycharmProjects\app2\venv\lib\site-packages\django\db\models\base.py",
>  
> line 325, in add_to_
> class
> value.contribute_to_class(cls, name)
>   File 
> "C:\Users\Arunkumar\PycharmProjects\app2\venv\lib\site-packages\django\db\models\options.py",
>  
> line 208, in cont
> ribute_to_class
> self.db_table = truncate_name(self.db_table, 
> connection.ops.max_name_length())
>   File 
> "C:\Users\Arunkumar\PycharmProjects\app2\venv\lib\site-packages\django\db\__init__.py",
>  
> line 28, in __getattr__
>
> return getattr(connections[DEFAULT_DB_ALIAS], item)
>   File 
> "C:\Users\Arunkumar\PycharmProjects\app2\venv\lib\site-packages\django\db\utils.py",
>  
> line 207, in __getitem__
> backend = load_backend(db['ENGINE'])
>   File 
> "C:\Users\Arunkumar\PycharmProjects\app2\venv\lib\site-packages\django\db\utils.py",
>  
> line 111, in load_backend
> return import_module('%s.base' % backend_name)
>   File 
> "C:\Users\Arunkumar\AppData\Local\Programs\Python\Python37-32\lib\importlib\__init__.py",
>  
> line 127, in import_m
> odule
> return _bootstrap._gcd_import(name[level:], package, level)
>   File "", line 1006, in _gcd_import
>   File "", line 983, in _find_and_load
>   File "", line 967, in 
> _find_and_load_unlocked
>   File "", line 677, in _load_unlocked
>   File "", line 728, in exec_module
>   File "", line 219, in 
> _call_with_frames_removed
>   File 
> "C:\Users\Arunkumar\PycharmProjects\app2\venv\lib\site-packages\django\db\backends\mysql\base.py",
>  
> line 21, in
> 
> ) from err
> 

Re: 502 Bad Gateway nginx/1.14.0 (Ubuntu)

2020-04-13 Thread Soham Navadiya
You forgot one step after enabling ufw.

You have to execute sudo ufw allow ssh.

Currently you can't login via ssh bcoz ufw not allowing you.

On Mon, Apr 13, 2020, 18:39 Jagtar Singh Lakhyan 
wrote:

> Im working from terminal but on enabling ufw, server wasn't logging in
> from terminal and i had to go to server console to disable ufw to access
> again from terminal
>
> On Mon, Apr 13, 2020 at 6:24 PM Rok Klancar  wrote:
>
>> Jagtar, did you wanted to say before that enabling ufw disabled you to
>> access your server via ssh?
>>
>>
>> V V pon., 13. apr. 2020 ob 13:37 je oseba Jagtar Singh Lakhyan <
>> jagtar.lakhe...@gmail.com> napisala:
>>
>>> You mean to say
>>>
>>>
>>> https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-18-04
>>>
>>> https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04
>>>
>>> I followed these around 15 days back and i was able to run app at
>>> http://server_domain_or_IP:8000 but Not on http://server_domain_or_IP
>>>
>>> On Mon, Apr 13, 2020 at 4:35 PM Sunday Iyanu Ajayi <
>>> sunnexaj...@gmail.com> wrote:
>>>
 My bad.
 I meant sudo systemctl daemon-reload
 Use this as a  guide:
 https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-

 *AJAYI Sunday *
 (+234) 806 771 5394
 *sunnexaj...@gmail.com *



 On Sun, Apr 12, 2020 at 2:57 PM Jagtar Singh Lakhyan <
 jagtar.lakhe...@gmail.com> wrote:

> Hi Ajayi,
>
> sudo systemctl reload daemon-reload
>
> Failed to reload daemon-reload.service: Unit daemon-reload.service not
> found.
>
>
> perhaps u mean to say: sudo systemctl daemon-reload
>
>
> Ran these
> sudo systemctl daemon-reload
> sudo systemctl enable gunicorn
> sudo systemctl restart gunicorn
> sudo systemctl restart nginx
>
> wait for about 2-5minutes then run
> sudo systemctl status gunicorn
>
>
> Result:
>
>
> sudo systemctl status gunicorn
>
> [sudo] password for wms:
>
> *●* gunicorn.service - gunicorn service
>
>Loaded: loaded (/etc/systemd/system/gunicorn.service; enabled;
> vendor preset
>
>Active: *active (running)* since Sun 2020-04-12 19:17:35 IST; 6min
> ago
>
>  Main PID: 8587 (gunicorn)
>
> Tasks: 4 (limit: 1689)
>
>CGroup: /system.slice/gunicorn.service
>
>├─8587 /home/wms/iitiansenv/bin/python3
> /home/wms/iitiansenv/bin/gun
>
>├─8590 /home/wms/iitiansenv/bin/python3
> /home/wms/iitiansenv/bin/gun
>
>├─8592 /home/wms/iitiansenv/bin/python3
> /home/wms/iitiansenv/bin/gun
>
>└─8594 /home/wms/iitiansenv/bin/python3
> /home/wms/iitiansenv/bin/gun
>
>
> Apr 12 19:17:35 wms systemd[1]: Started gunicorn service.
>
> Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8587]
> [INFO] S
>
> Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8587]
> [INFO] L
>
> Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8587]
> [INFO] U
>
> Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8590]
> [INFO] B
>
> Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8592]
> [INFO] B
>
> Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8594]
> [INFO] B
>
>
> The app is well tested on my local, even i tried 15 days back the same
> app to run on nginx, gunicorn and it ran on ip/domain:8000 but Not it 
> didnt
> run on ip/domain.
>
>
> Also, i am checking for the app again if it has some issues.
>
>
> I am following this guide:
> https://medium.com/@_christopher/deploying-my-django-app-to-a-real-server-part-i-de78962e95ac
>
> On Sun, Apr 12, 2020 at 5:14 PM Sunday Iyanu Ajayi <
> sunnexaj...@gmail.com> wrote:
>
>> HI Jagtar,
>>
>> Sometimes when you get 502 nginx server error , it can be due to the
>> fact that your django code has some error. If there is an error in your
>> code, nginx will no serve.
>>
>> Try to run
>> sudo systemctl reload daemon-reload
>> sudo systemctl enable gunicorn
>> sudo systemctl restart gunicorn
>> sudo systemctl restart nginx
>>
>> wait for about 2-5minutes then run
>> sudo systemctl status gunicorn
>>
>> IT shoud display error in your code
>>
>> *AJAYI Sunday *
>> (+234) 806 771 5394
>> *sunnexaj...@gmail.com *
>>
>>
>>
>> On Sun, Apr 12, 2020 at 5:54 AM Jagtar Singh Lakhyan <
>> jagtar.lakhe...@gmail.com> wrote:
>>
>>> No luck, same 502 error.
>>>
>>> These r settings.py
>>>
>>> *# SECURITY WARNING: don't run with debug 

Re: 502 Bad Gateway nginx/1.14.0 (Ubuntu)

2020-04-13 Thread Jagtar Singh Lakhyan
Im working from terminal but on enabling ufw, server wasn't logging in from
terminal and i had to go to server console to disable ufw to access again
from terminal

On Mon, Apr 13, 2020 at 6:24 PM Rok Klancar  wrote:

> Jagtar, did you wanted to say before that enabling ufw disabled you to
> access your server via ssh?
>
>
> V V pon., 13. apr. 2020 ob 13:37 je oseba Jagtar Singh Lakhyan <
> jagtar.lakhe...@gmail.com> napisala:
>
>> You mean to say
>>
>>
>> https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-18-04
>>
>> https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04
>>
>> I followed these around 15 days back and i was able to run app at http://
>> server_domain_or_IP:8000 but Not on http://server_domain_or_IP
>>
>> On Mon, Apr 13, 2020 at 4:35 PM Sunday Iyanu Ajayi 
>> wrote:
>>
>>> My bad.
>>> I meant sudo systemctl daemon-reload
>>> Use this as a  guide:
>>> https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-
>>>
>>> *AJAYI Sunday *
>>> (+234) 806 771 5394
>>> *sunnexaj...@gmail.com *
>>>
>>>
>>>
>>> On Sun, Apr 12, 2020 at 2:57 PM Jagtar Singh Lakhyan <
>>> jagtar.lakhe...@gmail.com> wrote:
>>>
 Hi Ajayi,

 sudo systemctl reload daemon-reload

 Failed to reload daemon-reload.service: Unit daemon-reload.service not
 found.


 perhaps u mean to say: sudo systemctl daemon-reload


 Ran these
 sudo systemctl daemon-reload
 sudo systemctl enable gunicorn
 sudo systemctl restart gunicorn
 sudo systemctl restart nginx

 wait for about 2-5minutes then run
 sudo systemctl status gunicorn


 Result:


 sudo systemctl status gunicorn

 [sudo] password for wms:

 *●* gunicorn.service - gunicorn service

Loaded: loaded (/etc/systemd/system/gunicorn.service; enabled;
 vendor preset

Active: *active (running)* since Sun 2020-04-12 19:17:35 IST; 6min
 ago

  Main PID: 8587 (gunicorn)

 Tasks: 4 (limit: 1689)

CGroup: /system.slice/gunicorn.service

├─8587 /home/wms/iitiansenv/bin/python3
 /home/wms/iitiansenv/bin/gun

├─8590 /home/wms/iitiansenv/bin/python3
 /home/wms/iitiansenv/bin/gun

├─8592 /home/wms/iitiansenv/bin/python3
 /home/wms/iitiansenv/bin/gun

└─8594 /home/wms/iitiansenv/bin/python3
 /home/wms/iitiansenv/bin/gun


 Apr 12 19:17:35 wms systemd[1]: Started gunicorn service.

 Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8587]
 [INFO] S

 Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8587]
 [INFO] L

 Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8587]
 [INFO] U

 Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8590]
 [INFO] B

 Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8592]
 [INFO] B

 Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8594]
 [INFO] B


 The app is well tested on my local, even i tried 15 days back the same
 app to run on nginx, gunicorn and it ran on ip/domain:8000 but Not it didnt
 run on ip/domain.


 Also, i am checking for the app again if it has some issues.


 I am following this guide:
 https://medium.com/@_christopher/deploying-my-django-app-to-a-real-server-part-i-de78962e95ac

 On Sun, Apr 12, 2020 at 5:14 PM Sunday Iyanu Ajayi <
 sunnexaj...@gmail.com> wrote:

> HI Jagtar,
>
> Sometimes when you get 502 nginx server error , it can be due to the
> fact that your django code has some error. If there is an error in your
> code, nginx will no serve.
>
> Try to run
> sudo systemctl reload daemon-reload
> sudo systemctl enable gunicorn
> sudo systemctl restart gunicorn
> sudo systemctl restart nginx
>
> wait for about 2-5minutes then run
> sudo systemctl status gunicorn
>
> IT shoud display error in your code
>
> *AJAYI Sunday *
> (+234) 806 771 5394
> *sunnexaj...@gmail.com *
>
>
>
> On Sun, Apr 12, 2020 at 5:54 AM Jagtar Singh Lakhyan <
> jagtar.lakhe...@gmail.com> wrote:
>
>> No luck, same 502 error.
>>
>> These r settings.py
>>
>> *# SECURITY WARNING: don't run with debug turned on in production!*
>>
>> DEBUG = *False*
>>
>>
>> ALLOWED_HOSTS = [*'iitian.xyz '*,
>> *'192.95.37.123'*]
>>
>> On Sun, Apr 12, 2020 at 6:19 AM Andrew C. 
>> wrote:
>>
>>> What’s the HTTP status code? Does the nginx page even show anything?
>>> Try:
>>>
>>> sudo systemctl stop nginx && sudo systemctl disable nginx 

Re: 502 Bad Gateway nginx/1.14.0 (Ubuntu)

2020-04-13 Thread Rok Klancar
Jagtar, did you wanted to say before that enabling ufw disabled you to
access your server via ssh?


V V pon., 13. apr. 2020 ob 13:37 je oseba Jagtar Singh Lakhyan <
jagtar.lakhe...@gmail.com> napisala:

> You mean to say
>
>
> https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-18-04
>
> https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04
>
> I followed these around 15 days back and i was able to run app at http://
> server_domain_or_IP:8000 but Not on http://server_domain_or_IP
>
> On Mon, Apr 13, 2020 at 4:35 PM Sunday Iyanu Ajayi 
> wrote:
>
>> My bad.
>> I meant sudo systemctl daemon-reload
>> Use this as a  guide:
>> https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-
>>
>> *AJAYI Sunday *
>> (+234) 806 771 5394
>> *sunnexaj...@gmail.com *
>>
>>
>>
>> On Sun, Apr 12, 2020 at 2:57 PM Jagtar Singh Lakhyan <
>> jagtar.lakhe...@gmail.com> wrote:
>>
>>> Hi Ajayi,
>>>
>>> sudo systemctl reload daemon-reload
>>>
>>> Failed to reload daemon-reload.service: Unit daemon-reload.service not
>>> found.
>>>
>>>
>>> perhaps u mean to say: sudo systemctl daemon-reload
>>>
>>>
>>> Ran these
>>> sudo systemctl daemon-reload
>>> sudo systemctl enable gunicorn
>>> sudo systemctl restart gunicorn
>>> sudo systemctl restart nginx
>>>
>>> wait for about 2-5minutes then run
>>> sudo systemctl status gunicorn
>>>
>>>
>>> Result:
>>>
>>>
>>> sudo systemctl status gunicorn
>>>
>>> [sudo] password for wms:
>>>
>>> *●* gunicorn.service - gunicorn service
>>>
>>>Loaded: loaded (/etc/systemd/system/gunicorn.service; enabled;
>>> vendor preset
>>>
>>>Active: *active (running)* since Sun 2020-04-12 19:17:35 IST; 6min
>>> ago
>>>
>>>  Main PID: 8587 (gunicorn)
>>>
>>> Tasks: 4 (limit: 1689)
>>>
>>>CGroup: /system.slice/gunicorn.service
>>>
>>>├─8587 /home/wms/iitiansenv/bin/python3
>>> /home/wms/iitiansenv/bin/gun
>>>
>>>├─8590 /home/wms/iitiansenv/bin/python3
>>> /home/wms/iitiansenv/bin/gun
>>>
>>>├─8592 /home/wms/iitiansenv/bin/python3
>>> /home/wms/iitiansenv/bin/gun
>>>
>>>└─8594 /home/wms/iitiansenv/bin/python3
>>> /home/wms/iitiansenv/bin/gun
>>>
>>>
>>> Apr 12 19:17:35 wms systemd[1]: Started gunicorn service.
>>>
>>> Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8587]
>>> [INFO] S
>>>
>>> Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8587]
>>> [INFO] L
>>>
>>> Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8587]
>>> [INFO] U
>>>
>>> Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8590]
>>> [INFO] B
>>>
>>> Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8592]
>>> [INFO] B
>>>
>>> Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8594]
>>> [INFO] B
>>>
>>>
>>> The app is well tested on my local, even i tried 15 days back the same
>>> app to run on nginx, gunicorn and it ran on ip/domain:8000 but Not it didnt
>>> run on ip/domain.
>>>
>>>
>>> Also, i am checking for the app again if it has some issues.
>>>
>>>
>>> I am following this guide:
>>> https://medium.com/@_christopher/deploying-my-django-app-to-a-real-server-part-i-de78962e95ac
>>>
>>> On Sun, Apr 12, 2020 at 5:14 PM Sunday Iyanu Ajayi <
>>> sunnexaj...@gmail.com> wrote:
>>>
 HI Jagtar,

 Sometimes when you get 502 nginx server error , it can be due to the
 fact that your django code has some error. If there is an error in your
 code, nginx will no serve.

 Try to run
 sudo systemctl reload daemon-reload
 sudo systemctl enable gunicorn
 sudo systemctl restart gunicorn
 sudo systemctl restart nginx

 wait for about 2-5minutes then run
 sudo systemctl status gunicorn

 IT shoud display error in your code

 *AJAYI Sunday *
 (+234) 806 771 5394
 *sunnexaj...@gmail.com *



 On Sun, Apr 12, 2020 at 5:54 AM Jagtar Singh Lakhyan <
 jagtar.lakhe...@gmail.com> wrote:

> No luck, same 502 error.
>
> These r settings.py
>
> *# SECURITY WARNING: don't run with debug turned on in production!*
>
> DEBUG = *False*
>
>
> ALLOWED_HOSTS = [*'iitian.xyz '*, *'192.95.37.123'*
> ]
>
> On Sun, Apr 12, 2020 at 6:19 AM Andrew C. 
> wrote:
>
>> What’s the HTTP status code? Does the nginx page even show anything?
>> Try:
>>
>> sudo systemctl stop nginx && sudo systemctl disable nginx && sudo
>> systemctl enable nginx && sudo systemctl start nginx
>>
>> This command could also be in the wrong order... it’s been awhile.
>>
>> It could be a symbolic link error. I don’t know. If you see some web
>> page with an error message like Internal Error 500 or the default nginx
>> page, let us know.
>>
>> On Sat, Apr 11, 2020 at 1:39 PM Jagtar 

Re: django doughts

2020-04-13 Thread Chucky Mada Madamombe
Hi,

In your mysite.urls, you must include the polls app urls as well. The error
is basically telling you that there is no url you are trying to request.

Regards

Chuck G. Madamombe
NAM: +264 81 842 1284
RSA: +27 78 208 7034
Twitter: @chuckygari
Skype: chuckygari
Facebook: Chucky Mada Madamombe
LinkedIn: Chucknorris Garikayi Madamombe

On Sun, 12 Apr 2020, 14:37 rama prakash y  wrote:

> Hi can u plz tell me how can solve the pollsapp development in  django
> project. I had complete my pollsapp development project in Django
> documentation like that guidance.but i have browser error .
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/c09b3231-3700-4157-9c4a-a75bc9a6e69c%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJaKOsfCvtgd7fuz5YKm7KJgeC0cJyyVnSTTNxD4tZTEZsaG6w%40mail.gmail.com.


Re: 502 Bad Gateway nginx/1.14.0 (Ubuntu)

2020-04-13 Thread Jagtar Singh Lakhyan
You mean to say

https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-18-04
https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04

I followed these around 15 days back and i was able to run app at http://
server_domain_or_IP:8000 but Not on http://server_domain_or_IP

On Mon, Apr 13, 2020 at 4:35 PM Sunday Iyanu Ajayi 
wrote:

> My bad.
> I meant sudo systemctl daemon-reload
> Use this as a  guide:
> https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-
>
> *AJAYI Sunday *
> (+234) 806 771 5394
> *sunnexaj...@gmail.com *
>
>
>
> On Sun, Apr 12, 2020 at 2:57 PM Jagtar Singh Lakhyan <
> jagtar.lakhe...@gmail.com> wrote:
>
>> Hi Ajayi,
>>
>> sudo systemctl reload daemon-reload
>>
>> Failed to reload daemon-reload.service: Unit daemon-reload.service not
>> found.
>>
>>
>> perhaps u mean to say: sudo systemctl daemon-reload
>>
>>
>> Ran these
>> sudo systemctl daemon-reload
>> sudo systemctl enable gunicorn
>> sudo systemctl restart gunicorn
>> sudo systemctl restart nginx
>>
>> wait for about 2-5minutes then run
>> sudo systemctl status gunicorn
>>
>>
>> Result:
>>
>>
>> sudo systemctl status gunicorn
>>
>> [sudo] password for wms:
>>
>> *●* gunicorn.service - gunicorn service
>>
>>Loaded: loaded (/etc/systemd/system/gunicorn.service; enabled; vendor
>> preset
>>
>>Active: *active (running)* since Sun 2020-04-12 19:17:35 IST; 6min ago
>>
>>  Main PID: 8587 (gunicorn)
>>
>> Tasks: 4 (limit: 1689)
>>
>>CGroup: /system.slice/gunicorn.service
>>
>>├─8587 /home/wms/iitiansenv/bin/python3
>> /home/wms/iitiansenv/bin/gun
>>
>>├─8590 /home/wms/iitiansenv/bin/python3
>> /home/wms/iitiansenv/bin/gun
>>
>>├─8592 /home/wms/iitiansenv/bin/python3
>> /home/wms/iitiansenv/bin/gun
>>
>>└─8594 /home/wms/iitiansenv/bin/python3
>> /home/wms/iitiansenv/bin/gun
>>
>>
>> Apr 12 19:17:35 wms systemd[1]: Started gunicorn service.
>>
>> Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8587]
>> [INFO] S
>>
>> Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8587]
>> [INFO] L
>>
>> Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8587]
>> [INFO] U
>>
>> Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8590]
>> [INFO] B
>>
>> Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8592]
>> [INFO] B
>>
>> Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8594]
>> [INFO] B
>>
>>
>> The app is well tested on my local, even i tried 15 days back the same
>> app to run on nginx, gunicorn and it ran on ip/domain:8000 but Not it didnt
>> run on ip/domain.
>>
>>
>> Also, i am checking for the app again if it has some issues.
>>
>>
>> I am following this guide:
>> https://medium.com/@_christopher/deploying-my-django-app-to-a-real-server-part-i-de78962e95ac
>>
>> On Sun, Apr 12, 2020 at 5:14 PM Sunday Iyanu Ajayi 
>> wrote:
>>
>>> HI Jagtar,
>>>
>>> Sometimes when you get 502 nginx server error , it can be due to the
>>> fact that your django code has some error. If there is an error in your
>>> code, nginx will no serve.
>>>
>>> Try to run
>>> sudo systemctl reload daemon-reload
>>> sudo systemctl enable gunicorn
>>> sudo systemctl restart gunicorn
>>> sudo systemctl restart nginx
>>>
>>> wait for about 2-5minutes then run
>>> sudo systemctl status gunicorn
>>>
>>> IT shoud display error in your code
>>>
>>> *AJAYI Sunday *
>>> (+234) 806 771 5394
>>> *sunnexaj...@gmail.com *
>>>
>>>
>>>
>>> On Sun, Apr 12, 2020 at 5:54 AM Jagtar Singh Lakhyan <
>>> jagtar.lakhe...@gmail.com> wrote:
>>>
 No luck, same 502 error.

 These r settings.py

 *# SECURITY WARNING: don't run with debug turned on in production!*

 DEBUG = *False*


 ALLOWED_HOSTS = [*'iitian.xyz '*, *'192.95.37.123'*]

 On Sun, Apr 12, 2020 at 6:19 AM Andrew C. 
 wrote:

> What’s the HTTP status code? Does the nginx page even show anything?
> Try:
>
> sudo systemctl stop nginx && sudo systemctl disable nginx && sudo
> systemctl enable nginx && sudo systemctl start nginx
>
> This command could also be in the wrong order... it’s been awhile.
>
> It could be a symbolic link error. I don’t know. If you see some web
> page with an error message like Internal Error 500 or the default nginx
> page, let us know.
>
> On Sat, Apr 11, 2020 at 1:39 PM Jagtar Singh Lakhyan <
> jagtar.lakhe...@gmail.com> wrote:
>
>> sudo systemctl status nginx
>>
>> *●* nginx.service - A high performance web server and a reverse
>> proxy server
>>
>>Loaded: loaded (/lib/systemd/system/nginx.service; enabled;
>> vendor preset: enabled)
>>
>>Active: *active (running)* since Sat 2020-04-11 04:54:18 IST; 18h
>> ago
>>
>>  

Re: 502 Bad Gateway nginx/1.14.0 (Ubuntu)

2020-04-13 Thread Sunday Iyanu Ajayi
My bad.
I meant sudo systemctl daemon-reload
Use this as a  guide:
https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-

*AJAYI Sunday *
(+234) 806 771 5394
*sunnexaj...@gmail.com *



On Sun, Apr 12, 2020 at 2:57 PM Jagtar Singh Lakhyan <
jagtar.lakhe...@gmail.com> wrote:

> Hi Ajayi,
>
> sudo systemctl reload daemon-reload
>
> Failed to reload daemon-reload.service: Unit daemon-reload.service not
> found.
>
>
> perhaps u mean to say: sudo systemctl daemon-reload
>
>
> Ran these
> sudo systemctl daemon-reload
> sudo systemctl enable gunicorn
> sudo systemctl restart gunicorn
> sudo systemctl restart nginx
>
> wait for about 2-5minutes then run
> sudo systemctl status gunicorn
>
>
> Result:
>
>
> sudo systemctl status gunicorn
>
> [sudo] password for wms:
>
> *●* gunicorn.service - gunicorn service
>
>Loaded: loaded (/etc/systemd/system/gunicorn.service; enabled; vendor
> preset
>
>Active: *active (running)* since Sun 2020-04-12 19:17:35 IST; 6min ago
>
>  Main PID: 8587 (gunicorn)
>
> Tasks: 4 (limit: 1689)
>
>CGroup: /system.slice/gunicorn.service
>
>├─8587 /home/wms/iitiansenv/bin/python3
> /home/wms/iitiansenv/bin/gun
>
>├─8590 /home/wms/iitiansenv/bin/python3
> /home/wms/iitiansenv/bin/gun
>
>├─8592 /home/wms/iitiansenv/bin/python3
> /home/wms/iitiansenv/bin/gun
>
>└─8594 /home/wms/iitiansenv/bin/python3
> /home/wms/iitiansenv/bin/gun
>
>
> Apr 12 19:17:35 wms systemd[1]: Started gunicorn service.
>
> Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8587]
> [INFO] S
>
> Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8587]
> [INFO] L
>
> Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8587]
> [INFO] U
>
> Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8590]
> [INFO] B
>
> Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8592]
> [INFO] B
>
> Apr 12 19:17:35 wms gunicorn[8587]: [2020-04-12 19:17:35 +0530] [8594]
> [INFO] B
>
>
> The app is well tested on my local, even i tried 15 days back the same app
> to run on nginx, gunicorn and it ran on ip/domain:8000 but Not it didnt run
> on ip/domain.
>
>
> Also, i am checking for the app again if it has some issues.
>
>
> I am following this guide:
> https://medium.com/@_christopher/deploying-my-django-app-to-a-real-server-part-i-de78962e95ac
>
> On Sun, Apr 12, 2020 at 5:14 PM Sunday Iyanu Ajayi 
> wrote:
>
>> HI Jagtar,
>>
>> Sometimes when you get 502 nginx server error , it can be due to the fact
>> that your django code has some error. If there is an error in your code,
>> nginx will no serve.
>>
>> Try to run
>> sudo systemctl reload daemon-reload
>> sudo systemctl enable gunicorn
>> sudo systemctl restart gunicorn
>> sudo systemctl restart nginx
>>
>> wait for about 2-5minutes then run
>> sudo systemctl status gunicorn
>>
>> IT shoud display error in your code
>>
>> *AJAYI Sunday *
>> (+234) 806 771 5394
>> *sunnexaj...@gmail.com *
>>
>>
>>
>> On Sun, Apr 12, 2020 at 5:54 AM Jagtar Singh Lakhyan <
>> jagtar.lakhe...@gmail.com> wrote:
>>
>>> No luck, same 502 error.
>>>
>>> These r settings.py
>>>
>>> *# SECURITY WARNING: don't run with debug turned on in production!*
>>>
>>> DEBUG = *False*
>>>
>>>
>>> ALLOWED_HOSTS = [*'iitian.xyz '*, *'192.95.37.123'*]
>>>
>>> On Sun, Apr 12, 2020 at 6:19 AM Andrew C. 
>>> wrote:
>>>
 What’s the HTTP status code? Does the nginx page even show anything?
 Try:

 sudo systemctl stop nginx && sudo systemctl disable nginx && sudo
 systemctl enable nginx && sudo systemctl start nginx

 This command could also be in the wrong order... it’s been awhile.

 It could be a symbolic link error. I don’t know. If you see some web
 page with an error message like Internal Error 500 or the default nginx
 page, let us know.

 On Sat, Apr 11, 2020 at 1:39 PM Jagtar Singh Lakhyan <
 jagtar.lakhe...@gmail.com> wrote:

> sudo systemctl status nginx
>
> *●* nginx.service - A high performance web server and a reverse proxy
> server
>
>Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor
> preset: enabled)
>
>Active: *active (running)* since Sat 2020-04-11 04:54:18 IST; 18h
> ago
>
>  Docs: man:nginx(8)
>
>   Process: 1650 ExecStop=/sbin/start-stop-daemon --quiet --stop
> --retry QUIT/5 --pidfi
>
>   Process: 1652 ExecStart=/usr/sbin/nginx -g daemon on;
> master_process on; (code=exite
>
>   Process: 1651 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on;
> master_process on; (c
>
>  Main PID: 1653 (nginx)
>
> Tasks: 9 (limit: 1689)
>
>CGroup: /system.slice/nginx.service
>
>├─1653 nginx: master process /usr/sbin/nginx -g daemon on;
> master_process o
>
>├─1654 nginx: worker process
>
>

Re: Django user model. 1 admin account, 1 customer account with the same email and different password

2020-04-13 Thread Bill Freeman
Many e-mail systems allow you to add a suffix to the username portion of
the address, separated by something like a "-", or, last time I checked for
gmail, by a "+", and it will still be delivered to the same mailbox.  For
example, I expect mail sent to
 ks.kennysoh+ad...@gmail.com
will still reach you.  But username match in Django probably won't treat
these the same, so you could have two accounts: custo...@email.com, and
customer-zy...@email.com which, being separate Django accounts, could have
separate passwords.

That's not ideal because there are almost certainly some email providers
who don't follow this convention, and will treat the two addresses as
different, making it impossible to get activation emails, password reset
emails, and anything else that you want the Django instance to send you.

If you are willing to crawl down inside the Django code and make changes,
you can rework user so that, for example, username isn't unique, but
username and admin flag are "unique_together" (providing that the database
that you are using supports it), in which case these can be separate
accounts.  Or you could add decorations to the user field that are
impossible to type because your login code doesn't allow the separator,
which can be something not allowed in email addresses, like the nul
character, but you then also have to modify email sending to drop any such
decorator when producing the "to" part of a message.

But modifying the core code means re-applying the patch whenever you take
an update, and if things have changed in the area(s) that you modified,
recoding may be required, so changing the core code is considered fragile.

It might be (I'll let you investigate for yourself) that the supported
custom User model scheme lets you override user lookup at login in a
suitable way, decorating the username with, for example, a leading A for
admins and a leading U for normal users, but keep the undecorated email
address in a separate email field.  So long as whatever method you have to
override is part of the formal custom user model mechanism, it should be
pretty stable.

Good luck

On Mon, Apr 13, 2020 at 4:17 AM Carsten Fuchs  wrote:

> Hello,
>
> Am 13.04.20 um 02:59 schrieb Kenny Soh:
> >   * An admin account must not share the same password as the customer
> account.
>
> Your entire problem would become much easier if you just dropped that
> requirement. Whatever you want to achieve with forcing a single user to
> keep two passwords, I'm sure that you're better off with a different
> approach.
>
> Importantly, dropping this requirement gives you the option to follow the
> advice in the article that you linked (
> https://simpleisbetterthancomplex.com/tutorial/2018/01/18/how-to-implement-multiple-user-types-with-django.html
> )
>
> Best regards,
> Carsten
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/bccdd94d-2344-b1c2-0478-c4e0d47d0d51%40cafu.de
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAB%2BAj0vMhTCCstNx87gtRunX_eoEJiZhQ_%2BZAcA_invnRrno2w%40mail.gmail.com.


Re: Django - PrePopulate the Foreign Key on the web page, and use that id to save the model.

2020-04-13 Thread Antje Kazimiers
you're welcome, Mayank!

Adding initial to your ModelChoiceField definition should give you the
preselection.

  self.fields['project'] = forms.ModelChoiceField(
initial=projectid,
queryset=Project.objects.filter(id=projectid)
)

On Sun, Apr 12, 2020 at 10:58 PM _M_A_Y_A_N_K_ 
wrote:

> Cool, thanks Antje.
>
> Seems it is working now, the only thing is in Drop-down i will have the
> Project Name for which the URL is rest of the PRojects are removed from
> drop down.
> Now will work to have pre-selected. As of now it will default display as
> -- with only one required project name.
>
> Thanks & Regards,
> -
> Mayank Tripathi
> Mo. +1 615 962 2128
> "Do what you can, with what you have, where you are -by Theodore
> Roosevelt"
> https://datascience.foundation/datascienceawards
>
>
>
> On Sun, Apr 12, 2020 at 3:07 AM Antje Kazimiers 
> wrote:
>
>> Hi, I think in your view modulesView() you need to pass the project id to
>> ModuleForm:
>>
>> ..
>> else :
>> form = ModuleForm(projectid)
>> ..
>>
>> and then you need to overwrite the constructor of ModuleForm by adding an
>> __init__ function:
>>
>>   def __init__(self, projectid=None, *args, **kwargs):
>> super(ModuleForm, self).__init__(*args, **kwargs)
>> if projectid is not None:
>> self.fields['project'] = forms.ModelChoiceField(
>> ...
>> queryset=Project.objects.filter(id=projectid)
>> )
>>
>> something like that. --Antje
>>
>> On Sunday, April 12, 2020 at 8:14:51 AM UTC+2, Mayank Tripathi wrote:
>>>
>>> Hi All,
>>>
>>> I am facing an issue, to pre-populate the Foreign Key on the web page.
>>> Actually i have two models Projects and Modules.
>>> To create a Module, one has to select the Project and go to Module page
>>> for create it, but there the Project is not populated.
>>>
>>> Below are the details... Please guide me.
>>>
>>> *models.py*
>>> class Project(models.Model):
>>> name = models.CharField(max_length = 200, null = True)
>>> startdate = models.DateTimeField()
>>>
>>> def __str__(self):
>>> return self.name
>>>
>>> class Modules(models.Model):
>>> project = models.ForeignKey(Project, null = True, on_delete =
>>> models.SET_NULL)
>>> modulename = models.CharField(max_length = 200, null = True)
>>> modulestartdate = models.DateTimeField()
>>>
>>> def __str__(self):
>>> return self.modulename
>>>
>>> *forms.py*
>>> class ProjectForm(forms.ModelForm):
>>> class Meta:
>>> model = Project
>>> fields = '__all__'
>>>
>>>
>>> class ModuleForm(forms.ModelForm):
>>> class Meta:
>>> model = Modules
>>> fields = '__all__'
>>>
>>> *views.py*
>>> def projectView (request):
>>> if request.method == 'POST':
>>> form = ProjectForm(request.POST)
>>> if form.is_valid():
>>> form.save(commit=True)
>>>
>>> return render(request, 'budget/projectForm.html', {'form': form})
>>>
>>> else :
>>> form = ProjectForm()
>>> return render(request, 'budget/projectForm.html', {'form': form})
>>>
>>>
>>> def modulesView (request, projectid):
>>> project = Project.objects.get(pk=projectid)
>>>
>>> if request.method == 'POST':
>>> form = ModuleForm(request.POST)
>>> if form.is_valid():
>>> form.save(commit=True)
>>>
>>> return render(request, 'example/modulesForm.html', {'form': form})
>>>
>>> else :
>>> form = ModuleForm(instance=project)
>>> return render(request, 'example/modulesForm.html', {'form': form})
>>>
>>> *urls.py*
>>> path('testproject/', views.projectView, name='projectView'),
>>> path('testprojectmodule//', views.modulesView,
>>> name='modulesView'),
>>>
>>> in html forms for both Project and Modules... just using {{
>>> form.as_table }}.
>>>
>>> Now after createing the Project, i used the url as
>>> http://127.0.0.1:8000/testprojectmodule/1/
>>> then my Project should get pre-populated... as reached using the project
>>> id which is 1 in this case, but i am getting full drop-down. Refer attached
>>> image.
>>> Either the Project should be pre-selected.. or can make it non-editable
>>> either will work for me.
>>>
>>> Please help.
>>>
>>>
>>> --
>> 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 view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/26744cb1-03e3-4189-a438-0b462013bb66%40googlegroups.com
>> 
>> .
>>
> --
> 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 view this discussion on the web visit
> 

Re: Django user model. 1 admin account, 1 customer account with the same email and different password

2020-04-13 Thread Carsten Fuchs
Hello,

Am 13.04.20 um 02:59 schrieb Kenny Soh:
>   * An admin account must not share the same password as the customer account.

Your entire problem would become much easier if you just dropped that 
requirement. Whatever you want to achieve with forcing a single user to keep 
two passwords, I'm sure that you're better off with a different approach.

Importantly, dropping this requirement gives you the option to follow the 
advice in the article that you linked 
(https://simpleisbetterthancomplex.com/tutorial/2018/01/18/how-to-implement-multiple-user-types-with-django.html)

Best regards,
Carsten

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/bccdd94d-2344-b1c2-0478-c4e0d47d0d51%40cafu.de.