Category: Django

Django Rest Framework API Microservice

Django Rest Framework API Microservice

I recently completed a small project for Zenstores. They simplify the shipping process for ecommerce sites. Their online service lets online businesses use multiple shipping companies for deliveries. Each shipping companies offers a different own...

Investment Tracking System – Django/Python

Investment Tracking System – Django/Python

My client, a start up with a lot of experience in their field, had identified an important gap in the market. Large sums of money were being invested, with very long payback periods, without...

Linux package management: apt-get, aptitude, synaptic, wajig

Linux package management: apt-get, aptitude, synaptic, wajig

When you set up your Linux system, you typically grab an image, burn it to DVD, boot the machine off the DVD and follow the instructions. The image will contain the most recent (stable)...

Django Migrations

Django Migrations

Django has a great system for maintaining your database structure, for keeping your RDMS (typically MySQL, PostgreSQL or SQLite) in line with your Django-defined Models, and within your version control system. I recently hit...

Django – a very simple unit test

Django – a very simple unit test

Test Driven Development (TDD) is a methodology for developing programs where you first write the test, and then write just enough code to make your program pass all tests TDD makes it far less...

Using PostgreSQL with Django

Using PostgreSQL with Django

Here is how go set up Django to work with PostgreSQL Install necessary libraries, etc sudo apt-get install libpq-dev sudo apt-get install python-dev sudo apt-get install postgresql-contrib Create a new database and user sudo...

Installing PostgreSQL

Installing PostgreSQL

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...

Serving static files in Django

Serving static files in Django

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,...

Basic Django templates

Basic Django templates

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...

Your second Django project

Your second Django project

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...