django-admin.py ne fonctionne pas

2014-03-17 Thread Pierre Capdevila
Bonjour Je désiré créer un projet Django. J'écris donc "django-admin.py startproject mon_site" dans la console DOS. Mais cela ne fonctionne pas. La console DOS affiche le texte de help de la commande django-admin.py , comme si j'avais écris simplement "django-admin.p". L'argument [startprojec

django-admin.py ne fonctionne pas

2014-03-17 Thread Pierre Capdevila
Bonjour à tous Je désire créer un projet Django avec le nom "mon_projet". J'écris donc dans la console DOS : "django-admin.py startproject mon_projet" Mais cela ne fonctionne pas. La console DOS affiche le texte de help de la commande django-admin, comme si j'avais écris "django-admin.py"

problem in setting up gunicorn and django

2014-03-17 Thread Robin Lery
I am trying to set up gunicorn for Django by following this blog. I created the *gunicorn_start* script and gave it permission: *$ sudo chown -R hello:users /webapps/hello_django* *$ sudo chmod -R g+w

Re: Is there a good reason why Django querysets can't be intersected?

2014-03-17 Thread Ram Rachum
Wonderful! Followup question: Is there any reason why ~ isn't supported? (It's supported on Q, but not QuerySet.) On Mon, Mar 17, 2014 at 3:17 AM, James Bennett wrote: > QuerySets have supported the '&' operator (as measured by implementing the > __and__() method) for as long as they've been in

Re: django-admin.py ne fonctionne pas

2014-03-17 Thread Pierre Capdevila
J'ai trouvé ! La réponse est ici . -- 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, se

Re: problem in setting up gunicorn and django

2014-03-17 Thread Shawn Milochik
It's much easier to just add gunicorn to your installed apps, and then do "./manage.py run_gunicorn" instead of "./manage.py runserver." It's pretty much takes the same options, except you'll want to add "-b" before your IP and port, like " -b 127.0.0.1:8000." -- You received this message because

CSRF problem (403 FORBIDDEN)

2014-03-17 Thread Gkpetrak
Hello, I'm developing an app using django and Openlayers javascript code. When I'm trying to post something via openlayers javascript code, it raises a 403 FORBIDDEN ERROR. I don't use a form in my html file, the post applied by openlayers code. It runs successfully, only if I remove the 'dja

Re: CSRF problem (403 FORBIDDEN)

2014-03-17 Thread Sergiy Khohlov
I'm proposing to update your views and templates for supporting csrf Many thanks, Serge +380 636150445 skype: skhohlov On Mon, Mar 17, 2014 at 5:05 PM, Gkpetrak wrote: > Hello, > > I'm developing an app using django and Openlayers javascript code. When I'm > trying to post something via o

Re: CSRF problem (403 FORBIDDEN)

2014-03-17 Thread Andreas Kuhne
2014-03-17 22:15 GMT+07:00 Sergiy Khohlov : > I'm proposing to update your views and templates for supporting csrf > Many thanks, > > Serge > > > +380 636150445 > skype: skhohlov > > > On Mon, Mar 17, 2014 at 5:05 PM, Gkpetrak wrote: > > Hello, > > > > I'm developing an app using django and O

Possible bug in Django 1.7a2 Migrations -- cannot create foreign key to proxy model

2014-03-17 Thread br0wnbay
Hi Everyone, I know I was able to do this before in Django 1.6, but I don't seem to be able to create a foreign key pointing to a proxy model. I've created a couple of StackoverFlow posts, but haven't had much help. http://stackoverflow.com/questions/22445046/possible-bug-in-django-1-7a2-migra

Re: Extended profile not being saved django-allauth

2014-03-17 Thread Fabio Caritas Barrionuevo da Luz
Voyager, Have you tried putting related_name in the Foreign Key? > class UserProfile(models.Model): > # This line is required. Links UserProfile to a User model instance. > user = models.ForeignKey(User, unique=True, > *related_name='userprofile'*) > > -- You received this messag

Django makemigrate not recognizing difference between settings.AUTH_USER_MODEL and auth.User

2014-03-17 Thread Siddhartha R T
I recently upgraded my Django version to 1.6.2, and I ran into the following problem: I was extending the auth.AbstractUser class, and I did the following: #node/models.py class Person(AbstractUser): dept = models.ManyToManyField(Department) #settings.py AUTH_USER_MODEL

Re: Extended profile not being saved django-allauth

2014-03-17 Thread voger
Hi, thanks for the reply. I didn't know about the related_name. I tried it, did a syncdb witch didn't do anything but still the extra fields don't save. On 03/17/2014 06:25 PM, Fabio Caritas Barrionuevo da Luz wrote: Voyager, Have you tried putting related_name in the Foreign Key? class U

Re: Is there a better way to do this?

2014-03-17 Thread C. Kirby
I would do it with a recursive ForeignKey class Employee(models.Model): employee = models.OneToOneField(User) supervisor = models.ForeignKey('self', blank=True, null=True) This keeps the information in one table and pretty clean looking. Allows all employees to have a supervisor, but they

Re: Is there a better way to do this?

2014-03-17 Thread Gene Coetzee
Thank you C. Kirby. This is great, and will work very well for what I am trying to accomplish. Thanks again. On Monday, March 17, 2014 2:01:19 PM UTC-4, C. Kirby wrote: > > I would do it with a recursive ForeignKey > > class Employee(models.Model): > employee = models.OneToOneField(User) >

Sync local Database with remote REST API

2014-03-17 Thread Leonard
Hello everybody, I'm having an hard time to figuring this out. I'm designing a django project based on data retrieved from a remote public REST API that will: - Retrieve data from a REST API - Saving the data in my models (my local db) - Analyze and process the local data asynchronousl

Re: Extended profile not being saved django-allauth

2014-03-17 Thread voger
Hi, I tried this in the django shell after I changed the line to user = models.OneToOneField(User, related_name='userprofile') but I get this error. >>> import userprofile.models >>> from django.contrib.auth.models import User >>> u = User.objects.get(username='test1') >>> print u test1 >>> u.

Django querysets and postgresql views

2014-03-17 Thread Cherrymae Tulfo
can Django query data from a postgresql view? I have trouble intersecting querysets in Django. . so i'm thinking, can Django retrieve data from a postgresql view? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and