You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

19 regels
573 B

  1. from django.db import models
  2. from django.contrib.auth.models import User
  3. class DateMixin(models.Model):
  4. created = models.DateTimeField(auto_now_add=True, verbose_name='created')
  5. modified = models.DateTimeField(auto_now=True, verbose_name='modified')
  6. class Meta:
  7. abstract = True
  8. class Site(DateMixin):
  9. user = models.ForeignKey(User, on_delete=models.CASCADE)
  10. name = models.CharField(max_length=255)
  11. password_length = models.IntegerField()
  12. password_type = models.CharField(max_length=255)
  13. counter = models.IntegerField(default=1)