how to create migrations in django
//to create migration files
python manage.py makemigrations
//to migrate migration files
python manage.py migrate
how to create migrations in django
//to create migration files
python manage.py makemigrations
//to migrate migration files
python manage.py migrate
python3 manage.py migrate
class Genre(models.Model):
"""Model representing a book genre."""
name = models.CharField(max_length=200, help_text='Enter a book genre (e.g. Science Fiction)')
def __str__(self):
"""String for representing the Model object."""
return self.name
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us