Skip to content
The code that powers djangosnippets.org, it allows users to post and share useful "snippets" of code.
Python HTML JavaScript CSS Ruby
Find file
Latest commit 08a3071 Jan 5, 2016 @zerok zerok Cleanup of cab/tox.ini
Failed to load latest commit information.
cab Cleanup of cab/tox.ini Jan 5, 2016
djangosnippets
fixtures Update README with a setup guide. Fixes #26. Nov 23, 2013
requirements Typo. Jan 24, 2015
.coveragerc Initial port from djangosnippets repo. Oct 11, 2013
.env Added .env file to add the cab directory to the Python path. Sep 18, 2014
.gitignore Merge remote-tracking branch 'cab/master' Sep 18, 2014
.travis.yml Drop Python 2.6 testing. Jan 5, 2016
LICENSE Moving license and readme, adding a setup, general maintence, yadda May 14, 2010
Procfile Use gunicorn in production again. Oct 15, 2012
README.rst Update README.rst Nov 21, 2014
manage.py Default to development settings in manage.py and make the file execut… Oct 15, 2012
requirements.txt Workaround for local dependencies on heroku Sep 21, 2014
runtime.txt Updated Python to reset virtualenv. Sep 21, 2014
settings.py Removed on of the magic settings.py files as only one is needed for t… May 31, 2012

README.rst

djangosnippets.org

This code is used to power the snippet sharing site, djangosnippets.org

Development setup

$ cd requirements
$ pip install -r development.txt
$ cd ..
$ python manage.py syncdb --migrate

Now you can start the develoment server:

$ python manage.py runserver

Before you can actually use the site now you have to define at least one language. If you just want to use the ones from djangosnippets.org, they are included in the fixtures folder:

$ python manage.py loaddata fixtures/languages.json

Now you should be able to use the development version of djangosnippets on port 8000.

Styling contributor?

DjangoSnippets uses the Foundation framework as core of its visual style. To get this working on your local machine you need compass and bower to compile your stylesheets. Please never modify the generated .css files directly but use the .scss ones.

To keep the setup path as short as possible, simply run following commands in your terminal:

$ cd djangosnippets/static
$ bower install && compass watch

If you don't have either of these two installed, you can find detailed instructions on their respective websites.

Please make sure, that you commit only a compressed version of the CSS file as this is what will be deployed.

Production setup

The production setup is right now tailored to Heroku and therefore mostly automatic. The difference between these two setups is configured in the djangosnippets.settings.production module and the requirements.txt.

Something went wrong with that request. Please try again.