Re: Questions on Django queryset iterator - wrt select_related and prefetch_related and how it works

2017-03-16 Thread Shawn Milochik
I think the benefit of using the iterator is best explained by an example: Without iterator: You loop through the queryset, using each item for whatever you're doing. As you do this, all the items are now in your local scope, using up RAM. If, after the loop, you should want to loop through the

Questions on Django queryset iterator - wrt select_related and prefetch_related and how it works

2017-03-16 Thread Web Architect
Hi, Could someone please let me know what the implications of Django queryset iterator on select_related and prefetch_related? Also, I am still not quite clear on the concept of iterator which I understand returns a Generator. Whenever a for loop is run on the Generator, the DB is queried

Tweaking the admin title to display the model name

2017-03-16 Thread Mike Dewhirst
Currently in an admin model change form, the admin page title is "Change " How can I tweak the code or the template so it displays an attribute of the model instance instead? I'm trying to work on a few instances at the same time and having the model instance identifier would be very

new bee - starting to build web application based on python - Django - PostgreSQL (or) MYSQL

2017-03-16 Thread Camilo Torres
I recommend you the django tutorial: https://docs.djangoproject.com/en/1.10/intro/ -- 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

Re: new bee - starting to build web application based on python - Django - PostgreSQL (or) MYSQL

2017-03-16 Thread Mike Dewhirst
SD It would help to say if you have a particular web application in mind. What is it you would like to achieve? Mike On 17/03/2017 8:38 AM, SD wrote: Hi There, Am new to web development based on python,Django and PostgreSQL (or) MYSQL databases. I am able to build standalone applications.

need advice/tips on storing favicon in my django bookmark app

2017-03-16 Thread Stephen Fox
I've developed a bookmark manager app in django. Things are working well. It's pretty cool, has a js bookmarklet and such. In my model I have fields such as link title, link category, link url, etc... I'd like to have an image as well. So I was thinking of grabbing the favicon for the links

new bee - starting to build web application based on python - Django - PostgreSQL (or) MYSQL

2017-03-16 Thread SD
Hi There, Am new to web development based on python,Django and PostgreSQL (or) MYSQL databases. I am able to build standalone applications. Anyone from community could you help me to get start with web application based on mentioned technologies. Thanks, SD. -- You received this message

Re: Django and Nginx through uwsgi is not working

2017-03-16 Thread Melvyn Sopacua
On Thursday 16 March 2017 11:04:53 valerio orfano wrote: > http://uwsgi-docs.readthedocs.io/en/latest/Nginx.htm *sigh* http://nginx.org/en/docs/http/ngx_http_uwsgi_module.html#uwsgi_pass unix:/path/to Maybe unix:/// works, maybe it doesn't. But file:/// is supposed to be the exception to the

Re: Django and Nginx through uwsgi is not working

2017-03-16 Thread Rafael E. Ferrero
I've been using this tutorial on a Salix Linux and everythings goes well Rafael E. Ferrero 2017-03-16 15:04 GMT-03:00 valerio orfano : > I got it here

Re: Django and Nginx through uwsgi is not working

2017-03-16 Thread valerio orfano
I got it here "http://uwsgi-docs.readthedocs.io/en/latest/Nginx.html; and others actually On Thursday, March 16, 2017 at 4:51:35 PM UTC+1, Melvyn Sopacua wrote: > > On Thursday 16 March 2017 05:25:32 valerio orfano wrote: > > > > > Here my configurations files. > > > > > > [uwsgi] > > >

Re: Error running Django tutorial

2017-03-16 Thread Thomas Pittman
I'm not sure why, but it stopped the error and send to import it. I'm using 3.6? On Mar 16, 2017 11:45 AM, "Vijay Khemlani" wrote: > Why is there a backslash in > > from django.conf.urls import polls\ > > ? > > On 3/16/17, Camilo Torres wrote: > >

Re: Django and Nginx through uwsgi is not working

2017-03-16 Thread Melvyn Sopacua
On Thursday 16 March 2017 05:25:32 valerio orfano wrote: > Here my configurations files. > > [uwsgi] > chdir = /home/elastic/workspace/ES_Brevetti > wsgi-file = ES_Brevetti/wsgi.py > master = true > processes = 5 > uid = nginx > gid = nginx > socket =

Re: Error running Django tutorial

2017-03-16 Thread Vijay Khemlani
Why is there a backslash in from django.conf.urls import polls\ ? On 3/16/17, Camilo Torres wrote: > Hi. > > You may have a strange, non-visible character in your file just before the > line giving error. > > -- > You received this message because you are subscribed to

Re: Error running Django tutorial

2017-03-16 Thread Camilo Torres
Hi. You may have a strange, non-visible character in your file just before the line giving 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

Re: Django and Nginx through uwsgi is not working

2017-03-16 Thread valerio orfano
Hi Tom if i dont create the file i get the error: unix:///tmp/uwsgi.sock failed (2: No such file or directory) On Thursday, March 16, 2017 at 1:47:12 PM UTC+1, Tom Evans wrote: > > On Thu, Mar 16, 2017 at 12:25 PM, valerio orfano > wrote: > > Hi All > > > > i ve created

Re: Django and Nginx through uwsgi is not working

2017-03-16 Thread valerio orfano
Ya it was a typo when writing On Thursday, March 16, 2017 at 1:30:21 PM UTC+1, Vijay Khemlani wrote: > > Not sure if a typo on your email, but your command says > > "chown nginx:nginx -R /sockect/uwsgi.sock" > > sockect ? > > On 3/16/17, valerio orfano wrote: > > Hi All

Re: superuser having all permissions makes perm checking messy

2017-03-16 Thread Jani Tiainen
Hi, You don't need to check for superuser explicitly Django does that when you check does user have a permission and returns true for all perm checks. So it's just simple check. Unless you meant something else, maybe giving a sample code would help understand your problem better. On

Re: Django and Nginx through uwsgi is not working

2017-03-16 Thread 'Tom Evans' via Django users
On Thu, Mar 16, 2017 at 12:25 PM, valerio orfano wrote: > Hi All > > i ve created a django application not using virtual environment. I ve > installed nginx and trying to integrate them via uwsgi application. > Here my configurations files. > > [uwsgi] > chdir =

Re: Django and Nginx through uwsgi is not working

2017-03-16 Thread Vijay Khemlani
Not sure if a typo on your email, but your command says "chown nginx:nginx -R /sockect/uwsgi.sock" sockect ? On 3/16/17, valerio orfano wrote: > Hi All > > i ve created a django application not using virtual environment. I ve > installed nginx and trying to integrate them

Django and Nginx through uwsgi is not working

2017-03-16 Thread valerio orfano
Hi All i ve created a django application not using virtual environment. I ve installed nginx and trying to integrate them via uwsgi application. Here my configurations files. [uwsgi] chdir = /home/elastic/workspace/ES_Brevetti wsgi-file = ES_Brevetti/wsgi.py master = true

Serializers and forms

2017-03-16 Thread Luvpreet Singh
What is the difference in saving model instance to database using a form and doing the same by using a serializer ? What is the basic need of serializers ? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and

superuser having all permissions makes perm checking messy

2017-03-16 Thread guettli
This is not a question, just a feeling. I want to know if you feel the same pain. Checking for permission in django is done in two steps: check1: check if user is superuser, then user is allowed. check2: check if user has the given permission. This OR is solvable. It's easy to code. It is