HTTPS SSH

{% comment %}

Requirements status

Getting started

Below you'll find the steps to create a Django project from scratch, using the Maykin Media starting template. The <project_root> is typically placed in your home directory or /srv/sites/. It can be named anything but typical examples are corporate, website or more specific like acme-website:

$ mkdir <project_root>
$ cd <project_root>

Create the virtual environment that holds your copy of Python and relevant libraries:

$ virtualenv env or virtualenv --python=/usr/bin/python3.4 env
$ source env/bin/activate
$ pip install django

Start a new Django project, named <project_name>, using the template. It can be usefull to use a <project_name> that serves as namespace in your code, like maykinmedia:

$ django-admin startproject --template=https://bitbucket.org/maykinmedia/default-project/get/master.zip --extension=py,rst,rb,html,gitignore,json,ini,js,sh,cfg,properties,yml <project_name> .

You'll need pip-compile to generate the pinned versions of the requirements:

$ pip install pip setuptools --upgrade (optionally)
$ pip install pip-tools
$ cd requirements
$ pip-compile base.in
$ cd ..

Modify the README.rst to be suitable for this project.

Once the project is ready, create a repository online and commit the files to the repository:

$ git init
$ git remote add origin git@bitbucket.org:maykinmedia/<repo>.git
$ git add --all
$ git commit -m "Initial project layout."
$ git push origin master

You'll now have a starting point for your new project. Continue to the installation instructions below and start at step 3.

To start the project, you can continue to the Installation section, bullet 3.

Default apps

You can add boilerplate apps from the default-apps repository. Simply add the app (folder name) to the project by using:

$ git archive --remote=git@bitbucket.org:maykinmedia/default-apps.git develop <app> | tar -x -C src/<project_name>

Additions

If you want to configure your Django settings module automatically:

$ echo "export DJANGO_SETTINGS_MODULE='<project_name>.conf.dev'" >> env/bin/activate
$ echo "export DJANGO_SETTINGS_MODULE=''" >> env/bin/deactivate

In case you are using virtualenvwrapper you can create the virtual environment in this way:

$ mkvirtualenvwrapper <project_name>
$ echo "export DJANGO_SETTINGS_MODULE='<project_name>.conf.dev'" >> $WORKON_HOME/<project_name>/bin/postactivate
$ workon <project_name>  # Reload virtualenv.

NOTE: The section above will not be included in your project's README. Below you'll see the actual project README template.

{% endcomment %}

{{ project_name }}

Version:0.1.0
Source:https://bitbucket.org/maykinmedia/{{ project_name|lower }}
Keywords:<keywords>

Build status Requirements status

<oneliner describing the project>

Developed by Maykin Media B.V. for <client>

Introduction

<describe the project in a few paragraphs and briefly mention the features>

Documentation

See INSTALL.rst for installation instructions, available settings and commands.

References