If you could provide the whole error message it would help us identify
where your error is.
On Tuesday, November 22, 2016 at 3:16:51 AM UTC+2, adonis simo wrote:
>
> Hi django users,
> I am new to django and i am using django 1.10, i follow up all the
> tutorial in the documentation and now i have build an blog application with
> models like :
> Article , Commentaire(comment in english) and Tag. It's working but now i
> want to add an relation between User (the one who is connected and creating
> the article)
> and the Article but i dont know how to do this . I find on google and try
> what i see but nothing ran ,
> this is my code
> Saisissez le code ici.
>
> from django.contrib.auth.models import User
>
>
> class Article(models.Model):
> titre = models.CharField(max_length=254)
> description = models.TextField()
> contenu = models.TextField()
> date_publication = models.DateField()
> image = models.ImageField(upload_to='blog/static/blog/images/')
> publie = models.BooleanField(default=False) # par defaut un article n'est
> pas publier
> tag = models.ManyToManyField(Tag)
> auteur = models.ForeignKey('auth.User', verbose_name='auteur',
> default=1)# here is the relationshp creation
>
>
> ..
> And when i run
> python manager.py migrate
>
> it give me a long error message with at the end of it :
> TypeError: int() argument must be a string, a bytes-like object or a
> number, not 'datetime.datetime'
> Saisissez le code ici...
> Please help i dont know how to do !!!
>
>
>
>
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/46a43731-a0ed-4528-b895-a6b44973a14e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.