Metadata-Version: 2.1
Name: django-start-tool
Version: 0.3
Summary: Full-featured django project start tool.
Home-page: https://github.com/solarless/django-start-tool/
Author: Georgy Gnezdilov
License: MIT
Platform: UNKNOWN
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Requires-Dist: Jinja2 (>=3.0.3)
Requires-Dist: MarkupSafe (>=2.0.1)
Provides-Extra: test
Requires-Dist: pytest ; extra == 'test'

=================
django-start-tool
=================

.. image:: https://img.shields.io/pypi/v/django-start-tool.svg
    :target: https://pypi.org/project/django-start-tool
    :alt: PyPI

.. image:: https://img.shields.io/pypi/l/django-start-tool.svg
    :target: https://pypi.org/project/django-start-tool
    :alt: PyPI - License

Introduction
------------

**django-start-tool** is a full-featured replacement for
``django-admin startproject``, which provides cli for creating the same
django project structure.

Usage
-----

A cli arguments are the same as startproject_ arguments excluding for a few 
changes.

.. _startproject: https://docs.djangoproject.com/en/4.0/ref/django-admin/#startproject

``--template``
~~~~~~~~~~~~~~

Changes:

- Creating from archive only supports the **zip** archive.

- Creating from remote source only supports the **GitHub** repositories.

----

``--files``
~~~~~~~~~~~

This parameter is a replacement for ``--extension`` and ``--name`` parameters.

It takes space-separated glob patterns, like ``*.env *.rst Procfile`` etc.

----

``--extra``
~~~~~~~~~~~

This parameter takes space-separated key value pairs, which will be available 
in Jinja2 template from ``extra`` object.

.. code-block:: console

    $ django-start \
    > -t https://github.com/user/repository/archive/main.zip \
    > -f '*.env' \
    > -e 'db_name=mydb db_password=secret!'

``.env``:

.. code-block:: shell

    DB_NAME='{{ extra.db_name }}'
    DB_PASSWORD='{{ extra.db_password }}'

    # Will be rendered to
    DB_NAME='mydb'
    DB_PASSWORD='secret!'


