Re: Unable to set up celery in supervisord

2016-07-21 Thread George Silva
If you are getting variables from the environment, supervisor that special environment directive. The variables need to specified in the supervisor conf file, such as: command=/home/ankush/jremind/env/bin/celery --app=remind.celery:app worker --loglevel=INFO

Unable to set up celery in supervisord

2016-07-21 Thread Ankush Thakur
​I'm trying to set up celery as a supervisord job (for my Django project) and getting an error. Most likely it's because of wrong import paths (or some other environment setting), but I have no idea what. Please help! Here's my directory structure ('>' means down one level): /home/ankush/jremind

Re: Django 1.8.13 saving new user gets error NOT NULL constraint failed: auth_user.last_login

2016-07-21 Thread bobhaugen
Hah! You are right! My fault. On Thursday, July 21, 2016 at 11:55:29 AM UTC-5, Simon Charette wrote: > > If you upgraded from Django 1.7 you should make sure to run all auth > migrations. > > If you're using a custom user model make sure to makemigrations for its > app and proceed to migrate

Re: Django 1.8.13 saving new user gets error NOT NULL constraint failed: auth_user.last_login

2016-07-21 Thread Simon Charette
If you upgraded from Django 1.7 you should make sure to run all auth migrations. If you're using a custom user model make sure to makemigrations for its app and proceed to migrate it. Simon Le jeudi 21 juillet 2016 11:46:37 UTC-4, bobhaugen a écrit : > > NOT NULL constraint failed:

Django 1.8.13 saving new user gets error NOT NULL constraint failed: auth_user.last_login

2016-07-21 Thread bobhaugen
> > NOT NULL constraint failed: auth_user.last_login > > > This is a new user. Why should it have a last_login value? I coded around it by giving the new user a fictitious last_login value, but still... -- You received this message because you are subscribed to the Google Groups "Django

Question has mediated relation to the Django.

2016-07-21 Thread Seti Volkylany
How get a total count pages in PDF file, created with using ReportLab, without third-party apps and hardcode (or violation DRY)? -- 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,

Re: Django Email Model

2016-07-21 Thread ludovic coues
https://docs.djangoproject.com/en/1.9/topics/db/examples/many_to_many/ Each student can subscribe to more than one newsletter Each newsletter have many of students. 2016-07-21 15:20 GMT+02:00 Ant : > Being a Django "newcomer" I am hoping someone can help us with this

Re: How make testing for a generated PDF file?

2016-07-21 Thread Avraham Serour
input -> function == expected output On Thu, Jul 21, 2016 at 4:37 PM, Seti Volkylany wrote: > > > -- > 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,

How make testing for a generated PDF file?

2016-07-21 Thread Seti Volkylany
-- 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 django-users@googlegroups.com.

Re: Generic Foreign Key

2016-07-21 Thread 'David Turner' via Django users
Okay thanks for the clarification On 21 July 2016 at 14:13, ludovic coues wrote: > I was thinking of the case of one model which can have a foreign key > to one of two models. > Like a title model that can have a foreign key to a page model or an > article model. > >

Django Email Model

2016-07-21 Thread Ant
Being a Django "newcomer" I am hoping someone can help us with this simple problem. We have a model for students containing names and email addresses. We want them to subscribe to various newsletters. Is it better to have a separate model for newsletters and how would we produce the list for

Re: Generic Foreign Key

2016-07-21 Thread ludovic coues
I was thinking of the case of one model which can have a foreign key to one of two models. Like a title model that can have a foreign key to a page model or an article model. 2016-07-21 13:15 GMT+02:00 'David Turner' via Django users : > Hi > > Thanks for this. > So

Can i use groups permissions with custom user model?

2016-07-21 Thread Max M
Hello! For example, i extend User: class ExtUserManager(BaseUserManager): def create_user(self, email, password=None): """ Creates and saves a User with the given email, date of birth and password. """ if not email: raise ValueError('Users

Can i use group permissions with custom User model?

2016-07-21 Thread Max M
Hello everyone! For example, i have an extended User model: class ExtUserManager(BaseUserManager): def create_user(self, email, password=None): """ Creates and saves a User with the given email, date of birth and password. """ if not email:

Re: Is it possible to share a DB between Django and another application

2016-07-21 Thread Fred Stluka
Albert, Yes, any other app , written in Python or any other language, should be able to access your relational DB concurrently with your Django app, if it has the right credentials.  This is true for PostgreSQL, MySQL, Oracle, DB2, or any other RDBMS you might

Re: Generic Foreign Key

2016-07-21 Thread 'David Turner' via Django users
Hi Thanks for this. So basically if I am using the county Foreign key in a few different models I am fine. I am not sure what you meant by this "as long as no models can link to notes or counties and not both, simple foreign key are fine." On 21 July 2016 at 11:13, ludovic coues

Re: Generic Foreign Key

2016-07-21 Thread ludovic coues
Generic Foreign Key solve a very specific problem. Foreign key to arbitrary models. Like a tagging system, with the ability to set a tag to user, article, comment, media in a blog. For your use, as long as no models can link to notes or counties and not both, simple foreign key are fine. And even

Generic Foreign Key

2016-07-21 Thread 'dtdave' via Django users
I have two models notes and counties which are used across multiple models. At the moment the realtionship is done using a foreign key. I am getting conflicting advice on whether to use a Generic Foreign Key. Could someone please enlighen me as to the best practice? Many thanks in advance --