Edit me on GitHub

Installation

Install using pip, e.g., (within a virtual environment).

$ pip install substanced

Warning

During Substance D’s alpha period, it may be necessary to use a checkout of Substance D as well as checkouts of the most recent versions of the libraries upon which Substance D depends.

Demonstration application

See the application running at http://demo.substanced.net for a demonstration of the Substance D management interface.

You can deploy the demonstration application locally by performing the following steps.

  1. Create a new directory somewhere and cd to it:

    $ virtualenv -p python2.7 hack-on-substanced
    $ cd hack-on-substanced
    
  2. Install Substance D either from PyPI or from a git checkout:

    $ bin/pip install substanced
    

    OR:

    $ bin/pip install -e git+https://github.com/Pylons/substanced#egg=substanced
    

    Alternatively create a writeable fork on GitHub and check that out.

  3. Check that the python-magic library has been installed:

    $ bin/python -c "from substanced.file import magic; assert magic is not None, 'python-magic not installed'"
    

    If you then see “python-magic not installed” then you will need to take additional steps to install the python-magic library. See Installing python-magic.

  4. Move back to the parent directory:

    $ cd ..
    
  5. Now you should be able to create new Substance D projects by using pcreate. The following pcreate command uses the scaffold substanced to create a new project named myproj:

    $ hack-on-substanced/bin/pcreate -s substanced myproj
    
  6. Now you can make a virtual environment for your project and move into it:

    $ virtualenv -p python2.7 myproj
    $ cd myproj
    
  7. Install that project using pip install -e into the virtual environment:

    $ bin/pip install -e .
    
  8. Run the resulting project via bin/pserve development.ini. The development server listens to requests sent to http://0.0.0.0:6543 by default. Open this URL in a web browser.

  9. The initial Administrator password is randomly generated automatically. Use the following command to find the login information:

    $ grep initial_password *.ini
    development.ini:substanced.initial_password = hNyrGI5nnl
    production.ini:substanced.initial_password = hNyrGI5nnl
    

Create a project from a scaffold in Substance D

After creating a development checkout, you can create a new project from the default substanced scaffold by using pcreate.

$ cd ../env
$ bin/pcreate -s substanced myproj

Then install that project using pip install -e . into the virtual environment.

$ cd myproj
$ ../bin/pip install -e .

Run the resulting project.

$ ../bin/pserve development.ini

Then start hacking on your new project.

Hacking on Substance D

See Hacking on Substance D, or look in your checked out local git repository for HACKING.txt, for information and guidelines to develop your application, including testing and internationalization.