Source Code for Geonaut.co.uk
This is the source code for my personal portolio site, written in Python. It is relatively simple and lightweight, and makes use of the Django framework and Wagtail CMS for managing content.
The site also uses:
- Bootstrap v3
- Formspree as a lightweight SMTP relay (contact page)
- JavaScript incl. JQuery (blog)
- Taggit for tags (blog)
- Django Bootstrap Pagination (blog)
Quickstart for Mac
Requirements: Python 2.7, Pip, Virtualenv
- Using terminal, create a folder somewhere (eg
mkdir mysite
) - Move into that folder
- Create a virtualenv folder (e.g.
virtualenv venv
) - Download / clone this repo to a folder inside
mysite
(e.g.git clone https://github.com/geonaut/geonaut-portfolio.git geonaut
) - Activate the venv (
source venv/bin/activate
) - Change into the project directory (
cd geonaut
) - Install the requirements (
pip install -r requirements.txt
) - Switch to your IDE. Add the geonaut folder, to see the files.
- Copy geonaut/geonaut/settings/local.py.sample to /settings/local.py
- Uncomment the
DATABASES = ...
snippet (the SQLite one) inbase.py
- Option 1: To use a pre-populated database
- Copy the quickstart/db.sqlite3 to the folder above /quickstart
- Copy the quickstart/media folder to the folder above /quickstart
- The username is
admin
and password ispassword
- Option 2: To create your own empty database
- Create the database with
python manage.py migrate
- Create a superuser with
python manage.py createsuperuser
- The site will be empty, except for the static homepage
- Create the database with
- Run the development server (
python manage.py runserver
from whichever folder manage.py is in) - Access the site at http://127.0.0.1:800 and http://127.0.0.1/admin
If/when you decide to make your site live, you will need to do various other things, such as:
- Make your own secret key (change / add random characters)
- Move to PostgreSQL
- Move to a production webserver (Nginx / Gunicorn)
- Delete the default superuser, and create your own
To Do List
- Dynamically fetch categories to create filter switches
- Find a more reliable way to display PDFs
- Sort script blocking on above-fold content
- Add a sitemap
- Update to Python 3