Metadata-Version: 2.1
Name: django-start-tool
Version: 0.1
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)

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

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 the several 
changes.

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

-t --template
~~~~~~~~~~~~~

Changes:

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

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

----

-f --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!' \
    > config .

``.env``:

.. code-block:: sh

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

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

License
-------

This package is distributed under the MIT license.


