mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-30 05:24:01 +03:00
commit
7a55252a8c
|
@ -23,25 +23,25 @@ Run these commands to deploy the project to Heroku:
|
|||
heroku addons:create mailgun:starter
|
||||
|
||||
heroku config:set PYTHONHASHSEED=random
|
||||
|
||||
|
||||
heroku config:set WEB_CONCURRENCY=4
|
||||
|
||||
|
||||
heroku config:set DJANGO_DEBUG=False
|
||||
heroku config:set DJANGO_SETTINGS_MODULE=config.settings.production
|
||||
heroku config:set DJANGO_SECRET_KEY="$(openssl rand -base64 64)"
|
||||
|
||||
# Generating a 32 character-long random string without any of the visually similiar characters "IOl01":
|
||||
|
||||
# Generating a 32 character-long random string without any of the visually similar characters "IOl01":
|
||||
heroku config:set DJANGO_ADMIN_URL="$(openssl rand -base64 4096 | tr -dc 'A-HJ-NP-Za-km-z2-9' | head -c 32)/"
|
||||
|
||||
|
||||
# Set this to your Heroku app url, e.g. 'bionic-beaver-28392.herokuapp.com'
|
||||
heroku config:set DJANGO_ALLOWED_HOSTS=
|
||||
|
||||
|
||||
# Assign with AWS_ACCESS_KEY_ID
|
||||
heroku config:set DJANGO_AWS_ACCESS_KEY_ID=
|
||||
|
||||
|
||||
# Assign with AWS_SECRET_ACCESS_KEY
|
||||
heroku config:set DJANGO_AWS_SECRET_ACCESS_KEY=
|
||||
|
||||
|
||||
# Assign with AWS_STORAGE_BUCKET_NAME
|
||||
heroku config:set DJANGO_AWS_STORAGE_BUCKET_NAME=
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ Once you've been through this one-off config, future deployments are much simple
|
|||
Getting your code and dependencies installed on PythonAnywhere
|
||||
--------------------------------------------------------------
|
||||
|
||||
Make sure your project is fully commited and pushed up to Bitbucket or Github or wherever it may be. Then, log into your PythonAnywhere account, open up a **Bash** console, clone your repo, and create a virtualenv:
|
||||
Make sure your project is fully committed and pushed up to Bitbucket or Github or wherever it may be. Then, log into your PythonAnywhere account, open up a **Bash** console, clone your repo, and create a virtualenv:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
|
@ -153,7 +153,7 @@ Back on the Web tab, hit **Reload**, and your app should be live!
|
|||
|
||||
|
||||
**NOTE:** *you may see security warnings until you set up your SSL certificates. If you
|
||||
want to supress them temporarily, set DJANGO_SECURE_SSL_REDIRECT to blank. Follow
|
||||
want to suppress them temporarily, set DJANGO_SECURE_SSL_REDIRECT to blank. Follow
|
||||
the instructions here to get SSL set up: https://help.pythonanywhere.com/pages/SSLOwnDomains/*
|
||||
|
||||
|
||||
|
|
|
@ -19,9 +19,9 @@ You will get a readout of the `users` app that has already been set up with test
|
|||
|
||||
If you set up your project to `develop locally with docker`_, run the following command: ::
|
||||
|
||||
$ docker-compose -f local.yml run django pytest
|
||||
$ docker-compose -f local.yml run django pytest
|
||||
|
||||
Targetting particular apps for testing in ``docker`` follows a similar pattern as previously shown above.
|
||||
Targeting particular apps for testing in ``docker`` follows a similar pattern as previously shown above.
|
||||
|
||||
Coverage
|
||||
--------
|
||||
|
@ -36,9 +36,9 @@ Once the tests are complete, in order to see the code coverage, run the followin
|
|||
|
||||
.. note::
|
||||
|
||||
At the root of the project folder, you will find the `pytest.ini` file. You can use this to customize_ the ``pytest`` to your liking.
|
||||
At the root of the project folder, you will find the `pytest.ini` file. You can use this to customize_ the ``pytest`` to your liking.
|
||||
|
||||
There is also the `.coveragerc`. This is the configuration file for the ``coverage`` tool. You can find out more about `configuring`_ ``coverage``.
|
||||
There is also the `.coveragerc`. This is the configuration file for the ``coverage`` tool. You can find out more about `configuring`_ ``coverage``.
|
||||
|
||||
.. seealso::
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ This repository comes with already prepared "Run/Debug Configurations" for docke
|
|||
|
||||
.. image:: images/2.png
|
||||
|
||||
But as you can see, at the beggining there is something wrong with them. They have red X on django icon, and they cannot be used, without configuring remote python interpteter. To do that, you have to go to *Settings > Build, Execution, Deployment* first.
|
||||
But as you can see, at the beginning there is something wrong with them. They have red X on django icon, and they cannot be used, without configuring remote python interpteter. To do that, you have to go to *Settings > Build, Execution, Deployment* first.
|
||||
|
||||
|
||||
Next, you have to add new remote python interpreter, based on already tested deployment settings. Go to *Settings > Project > Project Interpreter*. Click on the cog icon, and click *Add Remote*.
|
||||
|
|
Loading…
Reference in New Issue
Block a user