Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Just a project to build my personal site.

Install

This project is made to be build with buildout system in a virtualenv environment.

So first you have to install virtualenv on your system, then you will need some Devel libraries on your system to compile some modules thereafter with buildout.

To start, clone the project where you want then enter it and initialize the environment :

virtualenv --no-site-packages --setuptools .
source bin/activate

Then for a quick test install :

make install

If success, you will have to synchronize database :

make sync

And for production you also have to do this :

make assets

Buildout environment configs and Django settings

If you use the development.cfg or production.cfg config files with buildout, you will have to create the appropriate settings.

With development.cfg you should do a settings_development.py file like this :

from project.settings import *

INTERNAL_IPS = () # Fill this to your machine IP (the client, not your server) enable django-debug-toolbar

# Database access, only required if you don't want to use the sqlite3 database, else remove it
DATABASES = {
    'default': {
        'NAME': 'sveetchnet',
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'USER': 'django',
        'PASSWORD': 'django',
    }
}

With production.cfg you should do a settings_production.py file like this :

from project.settings import *

DEBUG = TEMPLATE_DEBUG = False

ASSETS_DEBUG = False
ASSETS_ROOT = STATIC_ROOT
ASSETS_AUTO_BUILD = False

# Fast-cgi options
FCGI_OPTIONS = {
    'method': 'threaded',
    'daemonize': 'false',
}

# SMTP Settings to send Applications emails
EMAIL_HOST = 'localhost'
EMAIL_PORT = 25
EMAIL_SUBJECT_PREFIX = '[sveetch.net] '

# Database access
DATABASES = {
    'default': {
        'HOST': 'localhost',
        'NAME': 'sveetchnet',
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'USER': 'login',
        'PASSWORD': 'password',
    }
}

You should fit your database access and SMTP host and if you target to publish the site with Apache2+fcgid there is a etc/apache.cfg ready to use for your virtual host.

Devel libraries

This is the devel libraries needed to compile some Python libraries, note that the package name can differ for your distribution.

For psycopg2 (a Postgresl driver for Python)

  • libpq
  • python

For Pillow

  • libjpeg
  • zlib
  • libfreetype

Without buildout

There is also a requirements.txt file than you can use with virtualenv + pip. This document will only treat about the buildout way. Take care that this file will not be allways synchronized with current dependancies, if really needed you can do it yourself from the versions.cfg file.

Usage

With the buildout install, you won't never use the common managed.py script to launch Django instance but django-instance script that was installed in you bin/ directory during the buildout process.

So to launch the Django development server with defaut settings, you will do (from the project directory) :

django-instance runserver 0.0.0.0:8001

About

Just a project to build my personal site

Resources

Releases

No releases published

Packages

No packages published