creating models but its not showing in db

11 views
Skip to first unread message

Kazi Atik

unread,
Jan 31, 2017, 11:08:34 AM1/31/17
to Django users
Hi i am creating  a table in my model but its not showing in my sqlite.db files i also run migrate command and makemigration
Here is my code



from django.db import models
from django.contrib.auth.models import User

class Others (models.Model):
education = models.TextField()
aim = models.TextField()
award = models.TextField()

please help me out this


"Александр Христюхин (roboslone)"

unread,
Jan 31, 2017, 11:11:02 AM1/31/17
to django...@googlegroups.com
Did you run makemigrations first and then migrate?
Also, do you have any instances of your model?

--
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 django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
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/24b80b57-45bc-41ac-ad12-935340139ead%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

rajanmandanka

unread,
Jan 31, 2017, 11:17:11 AM1/31/17
to Django users
please confirm whether you register your app in INSTALL_APP in settings.py file.

python manage.py makemigrations <app_name>
python manage.py migrate <app_name>
Reply all
Reply to author
Forward
0 new messages