Re: Django oauth2 password encrypt

2015-04-30 Thread James Schneider
What is the view code that you are calling to actually create the user? I suspect you are simply doing something like: user.password = That will store the password in plain text in the DB, but Django is expecting it to be hashed, so it never matches. You should be using either the

Question on auto-generating username while using django registration

2015-04-30 Thread emeka2106
Hi there - I’m in the process of building a site with django, and I noticed that username is a requirement for the django registration app. I’m wondering if it’s possible to auto generate the username *after* the user make entries in the other fields (i.e. name, city, email, password)? OR

Re: RemovedInDjango19Warning: Model class %s doesn't declare an explicit app_label and either isn't in an application in INSTALLED_APPS ..

2015-04-30 Thread Bumyong Choi
I attached a sample app here. You need to install django-haystack prior to running the app. haystack lets you define "Haystack Signal Processor". and in this signal processor, it attempts to load one of the models that belong to an app that is listed in INSTALLED_APPS after haystack. I would

The best way to mock querysets

2015-04-30 Thread Edgar Gabaldi
Who practices TDD (XP like) says that the tests need to run quickly. For this, we have to mock all external resources of the method that i want to test. In the case of queryset, i think so strange. Eg: https://gist.github.com/edgabaldi/ffdffa60f2add650f052 Am i doing it wrong? Do i have better

Re: What's the better way to get settings.DEBUG in a view?

2015-04-30 Thread Fellipe Henrique
Thanks... works now! T.·.F.·.A.·. S+F *Fellipe Henrique P. Soares* e-mail: > echo "lkrrovknFmsgor4ius" | perl -pe \ 's/(.)/chr(ord($1)-2*3)/ge' *Blog: http://fhbash.wordpress.com/ * *GitHub: https://github.com/fellipeh * *Twitter:

What's the better way to get settings.DEBUG in a view?

2015-04-30 Thread Nelson Varela
from django.conf import settings -- 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

What's the better way to get settings.DEBUG in a view?

2015-04-30 Thread Fellipe Henrique
Hi, I have one view, and I want to get de DEBUG value.. if I try these: import settings if settings.DEBUG: or: from settings import DEBUG if DEBUG: show me these error: File "views.py", line 19, in import settings File "settings.py", line 178, in from .settings_local import *

Re: “Migrate” command for manage.py not recognised when using Django 1.8

2015-04-30 Thread Tim Graham
What does `manage.py --version` say? On Thursday, April 30, 2015 at 12:30:17 PM UTC-4, Kaya Luken wrote: > > Hi Markus, > > I don't have South installed as I am using Django 1.8, and have never used > a previous version. > > For the record INSTALLED_APPS == ['django.contrib.admin', >

Re: “Migrate” command for manage.py not recognised when using Django 1.8

2015-04-30 Thread Kaya Luken
Hi Markus, I don't have South installed as I am using Django 1.8, and have never used a previous version. For the record INSTALLED_APPS == ['django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages',

Re: How to find a view in a complex web application

2015-04-30 Thread Derek
Hi Thomas I do not I understand your question; I made a suggestion previously for what fields you might need in this 'metadata' model, and you can add or change as needed. I do not know what your project looks like, so I cannot comment on what the rest of your database should contain. Derek

Re: “Migrate” command for manage.py not recognised when using Django 1.8

2015-04-30 Thread Markus Holtermann
Hey Kaya, I suspect you have South installed and in your INSTALLED_APPS. This is not supported. South only supports Django <=1.6 -- Django >=1.7 has built-in migration support. Please see https://docs.djangoproject.com/en/dev/topics/migrations/#upgrading-from-south for a migration guide from

“Migrate” command for manage.py not recognised when using Django 1.8

2015-04-30 Thread Kaya Luken
Using "path/to/mySite/manage.py migrate" I get Unknown command: 'migrate'Type 'manage.py help' for usage. Listed commands are: changepassword cleanup compilemessages createcachetable createsuperuser dbshell diffsettings dumpdata flush inspectdb loaddata makemessages

Re: How to find a view in a complex web application

2015-04-30 Thread guettli
Hi Derek, yes, your idea looks good. Next question would be: How to lay out the database structure (models)? Regards, Thomas Am Dienstag, 28. April 2015 16:04:35 UTC+2 schrieb Derek: > > A quick "brain storm"... > > One idea could be to keep all the metadata for your views - their full >

Re: How to find a view in a complex web application

2015-04-30 Thread guettli
Am Dienstag, 28. April 2015 16:49:18 UTC+2 schrieb Andrew Farrell: > > If you are asking this question as a developer who wants to know what view > to use to affect a page when you know the url, I recommend you install The > Silver Searcher , which lets you run > >

Re: Connection timeouts on high load

2015-04-30 Thread Tom Evans
On Thu, Apr 30, 2015 at 10:00 AM, sephii wrote: > Hello, > > I have an application made with Django 1.7 and the Django Rest > Framework and I'm in the phase of load testing it. My setup is made of > 3 servers: > > - Nginx + gunicorn > - Gunicorn > - Postgresql +

Django oauth2 encrypt password

2015-04-30 Thread Shekar Tippur
Hello, I am following instructions under https://django-oauth-toolkit.readthedocs.org/en/latest/rest-framework/getting_started.html I am having trouble with creating a user with encrypted password. I am able to create a user with the call curl -H "Authorization: Bearer

django oauth2 create user with encrypted password

2015-04-30 Thread Shekar Tippur
Hello, I am trying to create user using django-oauth-toolkit module. I am follwing instructions under https://django-oauth-toolkit.readthedocs.org/en/latest/rest-framework/getting_started.html I am able to create a user using basic curl curl -H "Authorization: Bearer

Django oauth2 password encrypt

2015-04-30 Thread Shekar Tippur
Hello, I am following instructions under https://django-oauth-toolkit.readthedocs.org/en/latest/rest-framework/getting_started.html I am having trouble with creating a user with encrypted password. I am able to create a user with the call curl -H "Authorization: Bearer

Connection timeouts on high load

2015-04-30 Thread sephii
Hello, I have an application made with Django 1.7 and the Django Rest Framework and I'm in the phase of load testing it. My setup is made of 3 servers: - Nginx + gunicorn - Gunicorn - Postgresql + Memcached Nginx is configured as a loadbalancer so I can add more gunicorn instances if needed. In