This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Generate configuration files for other parts of your Django stack.

As well as your django application, your stack might contain other components, such as:

  • nginx
  • apache
  • memcached
  • redis
  • varnish

Any or all of these will need some configuration to work with your application. Writing these configuration files by hand can be error prone and needs to be coordinated around changes to your software.

This django application will help you manage these files. You might want to pair this with django-json-settings, or something else that provides local settings, so you can easily configure your stack ona per-environment basis.

Workflow

Packaging template configuration files

During application development, template files for other production stack components are placed in the “stack” directory of your django project:

mysite/
    myapp/
        ...
    stack_templates/
        apache/
            apache.conf
        varnish/
            varnish.vcf

Building configuration files for the current environment

A management command is provided to generate configuration files based on the current settings for the project in the current environment.

If you are running inside a virtual environment then the files will be written to:

<sys.prefix>/etc

Otherwise you will need to provide a destination directory as an argument.

Creating production configuration files

Since files are placed in <sys.prefix>/etc when run in a virtual environment, you can symlink these directly into place if you wish:

For example, it produces the files:

<sys.prefix>/etc/apache/apache.conf
<sys.prefix>/etc/varnish/varnish.vcf

You can link them straight into your config:

ln -s <sys.prefix>/etc/apache/apache.conf /etc/apache2/sites-available/mysite.conf

Alternatively, it may be that these files may not be suitable for use in production yet - some settings may not be available to the django application and so it requires further manual changes. In this case, review these files, editing them as required, and placing them in the right location.

Running stackhelper

The following management commands are provided:

stack_generate

Usage: manage.py stack_generate [–force] [directory]

Generates new versions of configuration files in the specified directory, if specified. Otherwise to <sys.prefix>/etc if in a virtual environment.

Files will not be overwritten unless –force is specified.

stack_diff

Usage: manage.py stack_diff [directory]

Prints out differences if the generated files would be different. Returns 0 if the files are all identical, or 1 if the files should be regenerated.

Release History

Release History

0.3

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-stackhelper-0.3.zip (13.1 kB) Copy SHA256 Checksum SHA256 Source Apr 7, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting