CreateView autoset field

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

CreateView autoset field

Ferdinand Rohlfing
How can a create a field with a automatically input?

Like setting the date automatically to datetime.now()?

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/9e247e58-fd3b-416e-9deb-f93ee6deed83%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: CreateView autoset field

samuel muiruri
on the models for example info = models.CharField(max_length=100, default='West Indiana')

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/cb412eca-448d-446a-88d1-9a0641e6bfa4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: CreateView autoset field

Ferdinand Rohlfing
Thanks for the answer, it's working like I want it to work...
Nice

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/565c773c-4c09-4b98-a4e0-76bac19bab73%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: CreateView autoset field

DYAA CHBIB
I did the same, but it does not displayed in the field ! Any advice?
Thanks

2018-04-14 16:02 GMT+02:00 'Ferdinand Rohlfing' via Django users <[hidden email]>:
Thanks for the answer, it's working like I want it to work...
Nice

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/565c773c-4c09-4b98-a4e0-76bac19bab73%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/CAFVSD1q7CBvFc8wPfEMRyjad0MOmkN1e7Ph4GBmY_48xCrFtcA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: CreateView autoset field

samuel muiruri
did you make the migration, also note it's the default if a new item is created with the field blank.

On Sat, Apr 14, 2018 at 9:52 PM, DYAA CHBIB <[hidden email]> wrote:
I did the same, but it does not displayed in the field ! Any advice?
Thanks

2018-04-14 16:02 GMT+02:00 'Ferdinand Rohlfing' via Django users <[hidden email]>:
Thanks for the answer, it's working like I want it to work...
Nice

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/565c773c-4c09-4b98-a4e0-76bac19bab73%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/0QrMLT33NB4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
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/CAFVSD1q7CBvFc8wPfEMRyjad0MOmkN1e7Ph4GBmY_48xCrFtcA%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.



--
Best Regards,
Samuel Muiruri.
Student in Machine Learning & a veteran web developer.

--
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 [hidden email].
To post to this group, send email to [hidden email].
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/CAJZFZXo-Gn5HGqSOZdao-kehU_e7rfxH2%2BvZiO_8ciLv3W2J9w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.