Django syncdb not updating

When you do this, the easiest option - without external software - is to re-create your entire database and run for your database.

Then we create and save a Category, before printing out all the categories again.

This second Note The example we provide above is only a very basic taster on database related activities you can perform in the Django shell.

One of the stand-out features of Django is that it provides a built in, web-based administrative interface that allows us to browse and edit data stored within our models and corresponding database tables.

Like everything else, we need to configure the admin interface for use before we can access it. You should then see a login box, prompting you for a username and password.

For this tutorial, we’ll stick with the bare-bones admin interface, but you can check out the official Django documentation on the admin interface for more information if you’re interested.

It’s highly likely that during the course of development, you’ll come to a point where you will need to modify a Django model.We don’t cover South here - but the official South documentation provides a handy tutorial if you’re interested.If you don’t want to use South, we discuss a technique in Section 5.8 to speed up the updating process.The only other value we need to set is the Note While using an SQLite engine for this tutorial is fine, it may not perhaps be the best option when it comes to deploying your application.Instead, it may be better to use a more robust and scalable database engine.Enter the superuser username and password you created when setting up your database, and you should then see a webpage similar to that shown in Figure 2. Try deleting the category as we’ll be populating the database with a population script next. Spend a few minutes creating, modifying and deleting both categories and pages.

Tags: , ,