Re: Slow query even for small number of rows

2015-10-03 Thread James Schneider
Need more information. What do you consider slow? How many rows are there total in the table? How many rows are you retrieving? It looks like your serializers pull in a lot of cross-table data, so I'm guessing there are numerous queries for each request. Have you examined the SQL queries being

Slow query even for small number of rows

2015-10-03 Thread Yik Surn Chong
Hi guys, I wonder why my query to view the list of scholarships takes quite long to load even though the number of rows is small. Would be great if someone could help me out here. Thanks. Here's my view. > class DualSerializerViewSet(viewsets.ReadOnlyModelViewSet): > queryset =

Re: Hi

2015-10-03 Thread Andrew Farrell
If you already have python 3.5 installed globally, then you can do ``` $ which python3.5 /usr/bin/python3.5 $ virtualenv -p /usr/bin/python3.5 ~/trying35 ``` to create a virtualenv with python3.5 in it. If you use the conda package manager, you can do ```

Re: Hi

2015-10-03 Thread James Bennett
To maintain different virtualenvs with different Python versions, I use pyenv: https://github.com/yyuu/pyenv On Sat, Oct 3, 2015 at 7:41 PM, Cristiana Costa wrote: > How can I install the Python 3.5 just in my virtualenv? > > -- > You received this message because you

Hi

2015-10-03 Thread Cristiana Costa
How can I install the Python 3.5 just in my virtualenv? -- 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

[ANNOUNCE] Django bugfix release issued: 1.8.5

2015-10-03 Thread Tim Graham
Details are available on the Django project weblog: https://www.djangoproject.com/weblog/2015/oct/03/bugfix-release-issued/ -- 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

custom managers and migrations

2015-10-03 Thread Dan Tagg
Hi, I'm using django 1.8.4. 1. I have added a field "deleted" to a couple of models so that when the delete button is pressed, to all intents and purposes the record will have been deleted, although it should still be accessible through the Admin site. 2. To make this happen in a way that can't

Re: Method call at end of Django session

2015-10-03 Thread Andreas Kuhne
Hi again, What I would do is create a django management command (see https://docs.djangoproject.com/en/1.8/howto/custom-management-commands/) and then use cron to call it a regular intervals (5-10 minute intervals for example). Another way to do it would be to use celery, which is a delayed job

Re: garantir acesso a usuários somente para seus dados

2015-10-03 Thread Carlos Andre
And i have a soluction, this mensage was after. Thanks! Em 03/10/2015 12:55, "Helio Meira Lins" escreveu: > Carlos Andre, > try to get help in the Brazilian Django group [1], and remember to inform > what you've tried. > > [1]

Re: Using Django and R in a production environment?

2015-10-03 Thread Chanat Praserthdam
Hi Derek, Did you find the solution to your problem? I ran to a similar issue. I am wondering if RServe will work for me. On Tuesday, April 30, 2013 at 12:40:01 PM UTC-7, Derek wrote: > > Thanks Nick; RStudio looks like a really good tool for development work. > > The impression I get though,

Re: garantir acesso a usuários somente para seus dados

2015-10-03 Thread Helio Meira Lins
Carlos Andre, try to get help in the Brazilian Django group [1], and remember to inform what you've tried. [1] https://groups.google.com/forum/#!forum/django-brasil On Sunday, September 27, 2015 at 10:15:36 PM UTC-3, Carlos Andre wrote: > > Hi, im with a question, want permission to user in

Re: Why should we use Django Rest Framework?

2015-10-03 Thread Scot Hacker
Just a quick tip: Sometimes you need a little JSON endpoint for some feature of your site or project, and a full REST framework like DRF is completely overkill. Django makes this incredibly easy, out of the box: from django.http import JsonResponse def some_view(request): my_dict =

Re: Method call at end of Django session

2015-10-03 Thread Amarjeet Kapoor
On Saturday, 3 October 2015 03:58:19 UTC+5:30, Vijay Khemlani wrote: > > Also it is most likely inconsistent if the user has the same webpage > opened on two different tabs > > Could you please elaborate related to which thing, you are telling this and how would it lead to inconsistent? --

Re: Method call at end of Django session

2015-10-03 Thread Amarjeet Kapoor
On Saturday, 3 October 2015 02:25:46 UTC+5:30, Andréas Kühne wrote: > > Hi, > > I don't think you can reliably do that. Django never knows when the user > closes his browser window. Because a session is stateless (there is only a > connection to the server when it responds to a request).

Re: Converting implicit m2m through table to explicit through model with Django 1.7 migrations

2015-10-03 Thread Carsten Fuchs
Am 2015-10-02 um 23:28 schrieb John Lucas: Thanks for the replies. Carsten - that link is broken for me unfortunately. Sorry, this seems to be a problem with gmane. The same thread at Google groups is here: https://groups.google.com/d/msg/django-users/K0X8P3s3DOw/cH5PDxYjLtYJ Best regards,

Re: Corrupted Migration?

2015-10-03 Thread James Schneider
> > @James: Sorry, I misspoke! [field] actually corresponds to a old field in >> state X. Before adding the new fields in state Y, the migration is trying >> to remove some old fields in state X but isn't finding them. I think this >> means that I'm unable to re-run that migration since it's