diff --git a/README.md b/README.md index a4105f97..b770f53b 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ git clone git@github.com:vitorfs/colossus.git Ideally, create a [virtualenv](https://docs.python-guide.org/dev/virtualenvs/) and install the projects dependencies: ```commandline -pip install -r requirements/development.txt +pip install -r requirements-dev.txt ``` Create a local database: @@ -82,7 +82,7 @@ message broker compatible with Celery. The jQuery library is more of a Bootstrap dependency. There is very little JavaScript code in the project. For the most part the code base is just plain Django and HTML templates. -Complete list of Python dependencies can be found in the requirements files. +Complete list of Python dependencies can be found in `requirements.txt` and `requirements-dev.txt`. ## Documentation diff --git a/colossus/apps/subscribers/views.py b/colossus/apps/subscribers/views.py index b85c9945..0d428021 100644 --- a/colossus/apps/subscribers/views.py +++ b/colossus/apps/subscribers/views.py @@ -15,7 +15,7 @@ ) import requests -from ratelimit.decorators import ratelimit +from django_ratelimit.decorators import ratelimit from colossus.apps.campaigns.models import Campaign, Email, Link from colossus.apps.core.models import Token diff --git a/colossus/settings.py b/colossus/settings.py index 147ec516..0a1357ea 100644 --- a/colossus/settings.py +++ b/colossus/settings.py @@ -31,6 +31,7 @@ 'debug_toolbar', 'crispy_forms', + 'crispy_bootstrap4', 'colossus.apps.accounts', 'colossus.apps.campaigns', @@ -39,6 +40,8 @@ 'colossus.apps.lists', 'colossus.apps.notifications', 'colossus.apps.subscribers', + + ] SITE_ID = 1 @@ -52,6 +55,8 @@ default=config('DATABASE_URL', default='sqlite:///%s' % os.path.join(BASE_DIR, 'db.sqlite3')) ) } +DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' + INTERNAL_IPS = [ '127.0.0.1', diff --git a/docs/quickstart.rst b/docs/quickstart.rst index 5d550789..e5434fa5 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -13,7 +13,7 @@ Ideally, create a `virtualenv `_ :: - pip install -r requirements/development.txt + pip install -r requirements-dev.txt Create a local database: diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 00000000..5af79587 --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,12 @@ +-r requirements.txt +coverage +factory-boy +flake8 +ipython +isort +mypy +Sphinx +pyenchant +sphinxcontrib-spelling +sphinx-rtd-theme +tox diff --git a/requirements.txt b/requirements.txt index b36a6cc0..6ecd9040 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,17 @@ --r requirements/production.txt - -whitenoise==4.1.2 +beautifulsoup4 +celery +dj-database-url +django +django-crispy-forms +django-debug-toolbar +django-ratelimit +crispy_bootstrap4 +geoip2 +html2text +gunicorn +psycopg2-binary +python-decouple +pytz +raven +requests +whitenoise diff --git a/requirements/base.txt b/requirements/base.txt deleted file mode 100644 index 0be58c99..00000000 --- a/requirements/base.txt +++ /dev/null @@ -1,13 +0,0 @@ -beautifulsoup4==4.7.1 -celery==4.2.1 -dj-database-url==0.5.0 -Django==2.1.5 -django-crispy-forms==1.7.2 -django-debug-toolbar==1.11 -django-ratelimit==2.0.0 -geoip2==2.9.0 -html2text==2018.1.9 -psycopg2-binary==2.7.6.1 -python-decouple==3.1 -pytz==2018.9 -requests==2.21.0 diff --git a/requirements/development.txt b/requirements/development.txt deleted file mode 100644 index afdfe9eb..00000000 --- a/requirements/development.txt +++ /dev/null @@ -1,3 +0,0 @@ --r tests.txt - -ipython==7.2.0 diff --git a/requirements/docs.txt b/requirements/docs.txt deleted file mode 100644 index 508e0a21..00000000 --- a/requirements/docs.txt +++ /dev/null @@ -1,4 +0,0 @@ -Sphinx==1.8.3 -pyenchant==2.0.0 -sphinxcontrib-spelling==4.2.0 -sphinx-rtd-theme==0.4.2 diff --git a/requirements/production.txt b/requirements/production.txt deleted file mode 100644 index 2f39ec24..00000000 --- a/requirements/production.txt +++ /dev/null @@ -1,4 +0,0 @@ --r base.txt - -gunicorn==19.9.0 -raven==6.10.0 diff --git a/requirements/tests.txt b/requirements/tests.txt deleted file mode 100644 index b64f5594..00000000 --- a/requirements/tests.txt +++ /dev/null @@ -1,8 +0,0 @@ --r base.txt - -coverage==4.5.2 -factory-boy==2.11.1 -flake8==3.6.0 -isort==4.3.4 -tox==3.7.0 -mypy==0.650 diff --git a/tox.ini b/tox.ini index 713267be..0d49ce3d 100644 --- a/tox.ini +++ b/tox.ini @@ -11,7 +11,7 @@ envlist = basepython = python3 [testenv:py3] -deps = -r{toxinidir}/requirements/tests.txt +deps = -r{toxinidir}/requirements-dev.txt commands = coverage run manage.py test --settings=colossus.settings [testenv:flake8] @@ -29,6 +29,6 @@ commands = mypy colossus [testenv:docs] usedevelop = false whitelist_externals = make -deps = -r{toxinidir}/requirements/docs.txt +deps = -r{toxinidir}/requirements-dev.txt changedir = docs commands = make spelling