BSD · Django · FreeBSD · FreeBSD 10.0 · Python

Getting Started with Django on FreeBSD 10

Django can be installed using pip. Let’s install the dependencies for Django

pip – Python package manager
sqlite3 – Basic database backend for Django
py27-sqlite3 – Python2.7 library for sqlite3

pkg install python
pkg install py27-pip 
pkg install sqlite3
pkg install py27-sqlite3

Now that we have installed the dependencies, let’s install Django using the following command:

pip install django

We can check the version of Python, Sqlite3 and Django

python --version
sqlite --version
python -c "import django; print(django.get_version())"

We can now generate the project using the following command. This file will create a folder named myproject and will generate necessary files needed for the Django app to work. startproject myproject

The settings can be edited using the file named inside the project folder we just created. The default settings use sqlite as the database backend.
We can check the settings by run this command.

cd myproject
python migrate

The server can be started using the command

python runserver

The command above, starts Django listening on If we want Django to listen on specific port on all interfaces, we can use the following command

python runserver

One thought on “Getting Started with Django on FreeBSD 10

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s