Django Tutorials: Use Your Django Model

By: Dusty Arlia
Published on Monday, March 3, 2014, 07:01 PM
Last Updated on Friday, July 17, 2015 at 4:15 PM
Total Updates: 3

After you have created your model, you need to tell Django you're going to use it. To do that you have to edit your settings.py file and change the INSTALLED_APPS setting to add the name of the module that contains your models.py.

If you created your application using the manage.py startapp command, then the models for your application should be located in the your_app.models module. The INSTALLED_APPS setting in your_project/settings.py should have 'your_app' added it to it. Make sure to run the manage.py syncdb command when you add a new application to your INSTALLED_APPS setting.

Comments:

Ad:

Ad: