Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

topic/ISSUE-20 #21

Merged
merged 4 commits into from
Jan 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,23 @@ For detailed information on usage and third-party integrations check the [full d

## Requirements

To get started, you need to install [cookiecutter](https://github.com/cookiecutter/cookiecutter). I'd recommend doing so using [pip](https://pypi.org/project/cookiecutter/).
To get started, you need to install the dependencies
- [cookiecutter](https://github.com/cookiecutter/cookiecutter)
- [django](https://github.com/django/django).

You can install them via [pip](https://github.com/pypa/pip)

```bash
$ pip install cookiecutter==2.1.1 django==4.1.4
```

or you can use the requirements file

```bash
$ pip install -r requirements/requirements.txt
```

> **_NOTE:_** Django Rocket works with other versions of Cookiecutter and Django, but as it lacks extensive test coverage, for now it's better to stick to the mentioned versions.

## Usage

Expand All @@ -39,5 +55,3 @@ project_slug [soup_shop]: soup_shop
You should see your project directory. All it's left to doo is to fill to create a `.env` file. Make sure you enter a value for all the keys in the `.env.example` file.

Check out the [full documentation](https://ernestofgonzalez.github.io/djangorocket/) for comprehensive coverage of features and integrations.


1 change: 1 addition & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
'sphinx_copybutton',
'sphinx_issues'
]

Expand Down
25 changes: 22 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,33 @@ Django Rocket is an almost-ready-to-launch boilerplate framework powered by `Coo

It was initially built to allow me to launch my SaaS projects without having to copy-paste common code, so expect the design decisions and integrations to be targeted for this purpose.

Installation
Requirements
------------

You don't actually install Django Rocket, you install `cookiecutter`:
To get started, you need to install the dependencies

* `cookiecutter`_
* `django`_

.. _cookiecutter: https://github.com/cookiecutter/cookiecutter
.. _django: https://github.com/django/django

You can install them via `pip`_

.. _pip: https://github.com/pypa/pip

.. code-block:: sh

pip install cookiecutter
pip install cookiecutter==2.1.1 django==4.1.4

or you can use the requirements file

.. code-block:: sh

pip install -r requirements/requirements.txt

.. note::
Django Rocket works with other versions of Cookiecutter and Django, but it lacks extensive test coverage so there may be small errors. For now it's better to stick to the mentioned versions.

Usage
-----
Expand Down
38 changes: 38 additions & 0 deletions hooks/pre_gen_project.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
from django.core.management.utils import get_random_secret_key


def main():
with open(".env", "w") as file:
file.writelines(
s + "\n"
for s in [
"#Django",
'SECRET_KEY="{0}"'.format(get_random_secret_key()),
"DEBUG=True",
"SECURE_SSL_REDIRECT=False",
'ALLOWED_HOSTS=["*"]',
"CORS_ORIGIN_ALLOW_ALL=True",
"CORS_ORIGIN_WHITELIST=[]",
'INTERNAL_IPS=["127.0.0.1"]',
"",
"# Databases",
"DATABASE_URL=",
"",
"# Celery",
'CELERY_BROKER_URL="redis://localhost/"',
'CELERY_ACCEPT_CONTENT=["json"]',
"",
"# Stripe",
"STRIPE_PUBLISHABLE_KEY=",
"STRIPE_SECRET_KEY=",
"STRIPE_WEBHOOK_SECRET=",
"STRIPE_PRICE_ID=",
"",
"# Heroku ",
"PORT=8000",
]
)


if __name__ == "__main__":
main()
1 change: 1 addition & 0 deletions requirements/requirements-docs.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
sphinx==6.1.3
sphinx-copybutton==0.5.1
sphinx-issues==3.0.1
furo==2022.12.7
3 changes: 2 additions & 1 deletion requirements/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
cookiecutter==2.1.1
cookiecutter==2.1.1
django==4.1.4