Giter Site home page Giter Site logo

epio_skel's Introduction

epio_skel - A skeleton Django project for ep.io

Getting started with ep.io is not a daunting task, but setting up a good project structure requires a thousand little tweaks to get "just right."

This skeleton project is my project base for working with ep.io. It provides:

  • A settings module which provides for epio-specific settings without getting in your way during development.
  • Caching via redis -- ep.io does not have memcached. Relies on sebleier's excellent django-redis-cache. You'll still need to enable per-site/per-view caching on your own if you desire it.
  • A sensible epio.ini.
  • A sensible .gitignore.
  • PYTHONPATH settings which conform to epio's suggested best-practices: the project dir is on PYTHONPATH, so you import things from app.foo, not project.app.foo.

How do I use this?

Download the project skeleton. If you've cloned the project, you'll probably want to remove the .git directory first.

Create a virtualenv for your project. You are using virtualenv, right?

Install some basic requirements using pip install -r requirements.txt. You are using pip, right?

You'll need to specify a value for SECRET_KEY in settings/base.py. By default, Django concocts a random 50-character alphanumeric string for this value.

You'll also probably want to add settings/local.py to your .gitignore. It isn't that way out of the box because I wanted to include an example local.py.

An aside on the settings module

The settings module separates settings into three files by default:

base.py

The base settings file. Settings that apply to all environments (epio, development, etc) should go here. All other settings files should import from base.py at the top of the file.

epio.py

Settings specific to ep.io. This settings file will only be loaded if there's an EPIO environment variable set -- which is taken care of by epio.ini. Put any epio-specific settings here.

local.py

If this file is present and the EPIO envvar is not set, it is imported. This is a good place to put development-related settings. Note that for this scheme to work, you must retain the import at the top of the file. The supplied example local.py includes some common settings you'll want to fill in for local work.

Here, have a handy-dandy l33t ASCII-art flowchart:

* Start Here! *
---------------         ---------------         -----------
| Is EPIO     | --no--> | Is local.py | --no--> | base.py |
| envvar set? |         | present?    |         -----------
---------------         ---------------               ^  
       |                       |                      |
      yes                     yes                     |
       |                       |                      |
       v                       v                      |
  -----------             ------------                |
  | epio.py |             | local.py |                |
  -----------             ------------                |
       |                       |                      |
       \-----------------------\---- imports * from --/

That should be it! Happy epio'ing.

epio_skel's People

Contributors

bfirsh avatar idan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

epio_skel's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.