Category: Software development
PostgreSQL seems to be the most popular DBMS (database management system) with Django developers, although MySQL is also used a lot To install PostgreSQL, I used Linux Mint’s Software Manager (search for “postgresql”) I also...
From https://docs.djangoproject.com/en/dev/howto/static-files/: For a production site you probably want to configure the server to serve static files directly, without going through Django. For a test site, you can use the following approach In settings.py,...
Instead of using Python to create all the HTML, Django can load and render templates In settings.py specify the location of the templates, e.g. TEMPLATE_DIRS = [ os.path.join(BASE_DIR, ‘templates’), ] Create the folder within...
If you’ve followed the steps in the previous blog posts, you should have your first basic Django project up and running. You’ll also have various bits and pieces already installed, ready for your next...
Unless you get your model/database structure spot on first time, you’ll want to change it. Here is how to keep the database in line with your Django models Make a change to your model....
The admin panel lets you manage your models (i.e. the Django data in the database). It is not really meant for use in the production system, but it is very useful during development and...
In Django, a “model” is a Python class which turns database entities into objects. You create the class, and then use it to build the database tables and to add/edit/delete database entities. Here is a...
After PostgreSQL, MySQL is probably the most popular DBMS (database management system) used with Django. Here is how I set it up Install MySQL, etc Use the Software Manager to install mysql-server (write down...
Pre-requisites: easy_install, pip, virtualenv – getting ready for Django Installing Django Hello World project in <dev root>/Projects/HelloWorldDjango Switch to <dev root>/Projects django-admin.py startproject HelloWordDjango (create the basic project files) cd HelloWorldDjango Check if it works...
I like running Django within a virtual environment (for installation instructions see easy_install, pip, virtualenv – getting ready for Django) I use the following folder structure: <dev root> — envs (short for “environments”) —– Project...