Last active
February 21, 2019 13:58
-
-
Save melardev/78a3cf066abe27594555bd62061acda7 to your computer and use it in GitHub Desktop.
Model used in CreateView tutorial
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ModelDummyUser(models.Model): | |
first_name = models.CharField(max_length=100) | |
last_name = models.CharField(max_length=100, null=False) | |
age = models.IntegerField(validators=[MinValueValidator(3), MaxValueValidator(100)]) | |
created_at = models.DateTimeField(auto_now_add=True, editable=False) | |
def get_absolute_url(self): | |
return reverse('demos-ui-createview') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment