Djangorecipe

Latest version: v2.2.1

Safety actively analyzes 640974 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 9

2.0

----------------

- Removed project generation. Previously, djangorecipe would generate a
directory for you from a template, but Django's own template is more than
good enough now. Especially: it generates a subdirectory for your project
now. Just run ``bin/django startproject <projectname>``.

See django's documentation for `startproject
<https://docs.djangoproject.com/en/1.8/ref/django-admin/django-admin-startproject>`_.

You can also look at `cookiecutter <https://cookiecutter.readthedocs.org/>`_.

This also means the ``projectegg`` option is now deprecated, it isn't needed
anymore.

- We aim at django 1.7 and 1.8 now. Django 1.4 still works, (except that that
one doesn't have a good startproject command).

- Gunicorn doesn't come with the django manage.py integration, so ``bin/django
run_gunicorn`` doesn't work anymore. If you add ``script-entrypoints =
gunicorn`` to the configuration, we generate a ``bin/django_env_gunicorn``
script that is identical to ``bin/gunicorn``, only with the environment
correctly set. **Note: renamed in 2.1 to ``scripts-with-settings``**.

This way, you can use the wsgi.py script in your project (copy it from the
django docs if needed) with ``bin/django_env_gunicorn yourproject/wsgi.py``
just like suggested everywhere. This way you can adjust your wsgi file to
your liking and run it with gunicorn.

For other wsgi runners (or programs you want to use with the correct
environment set), you can add a full entry point to ``script-entrypoints``,
like ``script-entrypoints = gunicorn=gunicorn.app.wsgiapp:run`` would be the
full line for gunicorn. Look up the correct entrypoint in the relevant
package's ``setup.py``.

Django's 1.8 ``wsgi.py`` file looks like this, see https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/::

import os

from django.core.wsgi import get_wsgi_application

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "yourproject.settings")

application = get_wsgi_application()


- The ``wsgilog`` option has been deprecated, the old apache mod_wsgi script
hasn't been used for a long time.

- Removed old pth option, previously used for pinax. Pinax uses proper python
packages since a long time, so it isn't needed anymore.

1.11

-----------------

- The ``dotted-settings-path`` options was only used in management script. Now
it is also used for the generated wsgi file and the test scripts.

1.10

-----------------

- Added ``dotted-settings-path`` option. Useful when you want to specify a
custom settings path to be used by the ``manage.main()`` command.

- Renamed ``deploy_script_extra`` (with underscores) to
``deploy-script-extra`` (with dashes) for consistency with the other
options. If the underscore version is found, an exception is raised.

1.9

----------------

- ``bin/test`` now passes along command line arguments to the underlying
management command. Previously, only the equivalent of ``manage.py test
list_of_apps`` would be done. Now command line arguments are passed as-is
after the list of apps.

- Added ``deploy_script_extra`` option. It is appended to the wsgi script.
Useful for instance for a cloud hoster where you need to wrap your wsgi
application object in a custom call.

1.8

----------------

- Supporting buildout's relative-paths setting now.

1.7

----------------

- Add option to change the wsgi script name. Thanks hedleyroos (Fixes pull 74)

Page 2 of 9

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.