Rationale

Django’s startproject doesn’t do enough. I’m a programmer, thus lazy, and try to reduce redundant work like repeating the same setup steps over and over. (DRY)

Just copying/cloning this generic project to a new site isn’t ideal either, since general changes don’t affect all dependent sites, but I got no idea how to do that.

Issues

I’m trying to keep this current and to implement what I learn from my actual projects and best practice advise.
But since I mostly do other things than starting new django projects, I’m always far behind.

How To

local:

Copy generic_django_project

Rename "django_project" (this would be the project root as created by django-admin.py startproject)

Replace all occurrences of lowercase "project_name" with your project name. This is also the webserver and database server username!
The "project_name" directory is the one that would be created by manage.py startapp.

server:

I suggest to use makeuser.sh to create system and database accounts. Otherwise:

create user and sudo-enable it (I suggest via a group like wheel, but you can also add the user to sudoers):

adduser project_name
adduser project_name wheel

create database user and database (schema)

mysql -u root -p
# at first setup only: we installed MySQL without user interaction, so there’s no root password. Set it!
use mysql;
update user set password=password('...') where user='root';
# create user and database for our project:
create user 'project_name'@'localhost' identified by '...';
create database project_name character set 'utf8';
grant all privileges on project_name.* to 'project_name'@'localhost';
flush privileges;
quit;

FeinCMS

If you use FeinCMS’ Page, consider first, which extensions you’ll need –
see the docs and the FAQ –
afterwards you would need to change the database table page_page by hand,
since the changes aren’t detected by South!