-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
https://github.com/cyberdelia/heroku-geo-buildpack.git | ||
https://github.com/heroku/heroku-buildpack-python.git |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
*.py[cod] | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Packages | ||
*.egg | ||
*.egg-info | ||
dist | ||
build | ||
eggs | ||
parts | ||
bin | ||
var | ||
sdist | ||
develop-eggs | ||
.installed.cfg | ||
lib | ||
lib64 | ||
__pycache__ | ||
/**/logs/*.log | ||
/**/logs/*.log.* | ||
|
||
# Installer logs | ||
pip-log.txt | ||
|
||
# Unit test / coverage reports | ||
.coverage | ||
.tox | ||
nosetests.xml | ||
|
||
# Translations | ||
*.mo | ||
|
||
# Mr Developer | ||
.mr.developer.cfg | ||
.project | ||
.pydevproject | ||
|
||
default.db | ||
*.db-journal | ||
.idea/workspace.xml | ||
.idea/misc.xml | ||
.scrapy | ||
|
||
dev_override.py |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
web: python manage.py collectstatic --noinput; newrelic-admin run-program gunicorn -c gunicorn.py.ini wsgi:application | ||
# scheduler: python manage.py celery worker -B -E --maxtasksperchild=1000 -- This can be used once we have a bigger | ||
# need for more workers and concurrent schedulers. Remove the '-B' from worker when this is ready as we can only ever | ||
# have one scheduler or we'll have concurrency issues. | ||
worker: python /app/.heroku/python/bin/celery -A untitled_api worker -B -E --maxtasksperchild=1000 --loglevel=debug |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
django-skel | ||
=========== | ||
|
||
A modern Django (1.5) project skeleton. | ||
|
||
![A fancy Django project skeleton](https://github.com/rdegges/django-skel/raw/master/docs/source/_static/skel.jpg) | ||
|
||
|
||
Meta | ||
==== | ||
|
||
* author: Randall Degges | ||
* email: [email protected] | ||
* status: maintained, in development | ||
* notes: Have feedback? Please send me an email. This project is still in its | ||
infancy, and will be changing rapidly. | ||
|
||
|
||
Purpose | ||
======= | ||
|
||
For background, see: http://rdegges.com/deploying-django | ||
|
||
Essentially--deploying Django projects is hard. There are lots of things you | ||
need to take into consideration. Being a Django user for years, I believe I've | ||
found some extremely useful patterns to help manage all sorts of Django sites | ||
(from the very smallest apps, to the largest). | ||
|
||
This project is meant to be a boilerplate project for starting development. It | ||
is heavily opinionated in terms of services and tools--but I think the tradeoff | ||
is worthwhile. | ||
|
||
|
||
Docs | ||
==== | ||
|
||
The full project documentation is hosted at RTFD: http://django-skel.rtfd.org/. | ||
They are continuously updated to reflect changes and information about the | ||
project, so be sure to read them before using this boilerplate. | ||
|
||
|
||
Install | ||
======= | ||
|
||
django-skel currently supports Django 1.5. To create a new django-skel base | ||
project, run the following command (this assumes you have Django 1.5 installed | ||
already): | ||
|
||
$ django-admin.py startproject --template=https://github.com/rdegges/django-skel/zipball/master woot | ||
$ heroku config:add DJANGO_SETTINGS_MODULE=myproject.settings.prod | ||
|
||
|
||
Where ``woot`` is the name of the project you'd like to create. | ||
|
||
This is possible because Django 1.5's ``startproject`` command allows you to | ||
fetch a project template over HTTP (which is what we're doing here). | ||
|
||
While not strictly required, it is also recommended to do | ||
|
||
$ heroku config:add SECRET_KEY=putsomethingfairlycomplexhere | ||
|
||
The production settings pull SECRET_KEY from environment but fallbacks | ||
to a value which is generated mainly for development environment. | ||
|
||
This setup allows you to easily keep your site in a public repo if you so | ||
wish without causing opening a route to attack your Django passwords. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import os | ||
import pytest | ||
|
||
# region DJ Settings | ||
#http://pytest-django.readthedocs.org/en/latest/configuring_django.html#using-django-configurations | ||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "untitled_api.settings.dev_testing") | ||
# endregion | ||
|
||
# region Plugins | ||
#this line is required in order to use the db_with_migrations fixture | ||
#http://pytest.org/latest/plugins.html#requiring-loading-plugins-in-a-test-module-or-conftest-file | ||
pytest_plugins = "untitled_api.libs.django_utils.testing.utils" | ||
# endregion | ||
|
||
# region test type command line options | ||
#configure which tests run when: http://pytest.org/latest/example/simple | ||
# .html#control-skipping-of-tests-according-to-command-line-option | ||
def pytest_addoption(parser): | ||
parser.addoption("--test-type", default='unit', help="run specific test type (unit, integration, etc.)") | ||
|
||
|
||
def pytest_runtest_setup(item): | ||
test_type_specified = item.config.getoption("--test-type") | ||
test_type_found = os.path.basename(item.fspath.dirname).lower() | ||
if test_type_found != test_type_specified: | ||
pytest.skip("Test type: {0} was specified but test type was: {1}".format(test_type_specified, test_type_found)) | ||
|
||
# endregion |