BCS Create Django Admin

To create and administration site for you models you must first establish a super user by issuing the following command in the project directory. [codesyntax lang=”bash”] python3 manage.py createsuperuser [/codesyntax] The results of issuing the command is as follows. Superuser created successfully is the desired result. Modify the admin.py in your application directory to reflect […]

BCS Create Django Application

Return to the project location in terminal and issue the following command. [codesyntax lang=”python”] django-admin startapp blog [/codesyntax] In the terminal application change directories to current application sub directory. Modify models.py to define the tables in question. All the associated field descriptions can be reviewed by clicking here. After the tables have been defined use […]

BCS Create Django Site with MySQL Backend

For those times when Django site need to support MySQL this tutorial may be helpful. The first task is to create the Django project. Go to the command prompt and issue the following command. [codesyntax lang=”bash”] django-admin startproject mysite [/codesyntax] The result may be observed in the following screen shot. Next we should allow the […]

BCS Django Twitter Bootstrap

Django and the Twitter Bootstrap offers the ultimate environment for web development for multiple devices. Create the project. [codesyntax lang=”bash”] django-admin startproject yourAppName [/codesyntax] Allow the appropriate access by updating the following in settings.py file. [codesyntax lang=”bash”] ALLOWED_HOSTS = [‘’, ‘localhost’, ‘archbrooks.us’] [/codesyntax] Now configure the desired database.  Special imports are required for MySQL. [codesyntax […]

BCS Django Using MySQL Backend

To use a MySQL database with Django change the settings file to depict the following. [codesyntax lang=”php”] DATABASES = { ‘default’: { ‘ENGINE’: ‘django.db.backends.mysql’, ‘NAME’: ‘DB_NAME’, ‘USER’: ‘DB_USER’, ‘PASSWORD’: ‘DB_PASSWORD’, ‘HOST’: ‘localhost’, # Or an IP Address that your DB is hosted on ‘PORT’: ‘3306’, } } [/codesyntax] Mr. Arch Brooks, Software Engineer, Brooks Computing […]

BCS Django Tutorial 01

Python version 3.5.x does not employ the normal MySQL databases.  Eclipse Neon 4.6 supports PyDev plugin for Python and Django.  I recommend using Eclipse for project creations.  When I authored this article initially Python 3.5.x and Eclipse Neon 4.6 were not available.  The screenshot below show the types of project supported by Eclipse. To create […]