Skip to content

Commit 5b6e942

Browse files
committed
Release v1.0.69 - UPD Rocket Django
1 parent d4e55d5 commit 5b6e942

File tree

3 files changed

+163
-87
lines changed

3 files changed

+163
-87
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Change Log
22

3-
## [UNRELEASED]
3+
## [1.0.69] 2024-05-15
44
### Changes
55

6+
- [Rocket Django](https://docs.appseed.us/products/rocket/django/)
67
- [Access Local Services in Docker](https://docs.appseed.us/technologies/docker/access-local-services/)
78
- [Debugging Flask](https://docs.appseed.us/technologies/flask/debugging/) `Guide for Developers`
89

README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,36 @@ to the service via diferrent funnels (`Email`, `Newletter`) and [Discord](https:
4141
- `PRO`: **24/7** fast support 🚀, [PRO accounts](https://appseed.us/terms/) ONLY
4242

4343
![Web Apps & Dashboards generated by AppSeed.](https://user-images.githubusercontent.com/51070104/204031133-d8825143-c061-4e44-b2b5-2a5ce36c0db1.png)
44+
45+
<br/>
46+
47+
## [Rocket Django](https://appseed.us/product/rocket/django/) `Tailwind`
48+
49+
The Django boilerplate has all you need to build your SaaS, Analytics tool, or any other type of Web App. From idea to production in 5 minutes.
50+
51+
> **Features**: `Django``Tailwind``API` (DRF) • `Celery Beat``DataTables``Charts``Docker``CI/CD`.
52+
53+
<br />
54+
55+
| [Free Version](https://appseed.us/product/rocket/django/) | [PRO Version](https://appseed.us/product/rocket-pro/django/) | [Custom Development](https://appseed.us/custom-development/) |
56+
| --------------------------------------| --------------------------------------| --------------------------------------|
57+
|**Django 4.2.9** | **Everything in Free**, plus: | **Everything in PRO**, plus: |
58+
| ✓ Best Practices |**OAuth** `GitHub` |**1mo Custom Development** |
59+
|**TailwindCSS**/`Flowbite` |**Enhanced** [Charts](https://rocket-django-pro.onrender.com/charts/) |**Team**: PM, Developer, Tester |
60+
| ✓ Extended User Model |**Enhanced** [DataTables](https://rocket-django-pro.onrender.com/tables/) | ✅ Weekly Sprints |
61+
|`Simple` [Charts](https://rocket-django.onrender.com/charts/) |**[Media Files Manager](https://rocket-django-pro.onrender.com/file-manager/)** | ✅ Technical SPECS |
62+
|`Simple` [DataTables](https://rocket-django.onrender.com/tables/) |**Multi-Language** (i18n) Support | ✅ Documentation |
63+
|[API](https://rocket-django.onrender.com/api/product/) via `DRF` |**Sentry** `Error Reporting` |**30 days Delivery Warranty** |
64+
|[Celery Beat](https://rocket-django.onrender.com/tasks/) |**PRO Support** - [Email & Discord](https://appseed.us/support/) | - |
65+
|`Docker` |`Unlimited Projects` | - |
66+
|`CI/CD` Flow via Render |`Private REPO Access` | - |
67+
|`Free Support` (GitHub Issues) |`Lifetime Updates` | - |
68+
| - | - | - |
69+
| ------------------------------------| ------------------------------------| ------------------------------------|
70+
| 🚀 [LIVE Demo](https://rocket-django.onrender.com/) | 🚀 [LIVE Demo](https://rocket-django-pro.onrender.com/) | 🛒 `Order`: **[$3,999](https://appseed.gumroad.com/l/rocket-package)** (GUMROAD) |
71+
72+
<br />
73+
74+
![Free Django Dashboard and Admin Template - Rocket Django.](https://github-production-user-asset-6210df.s3.amazonaws.com/51070104/272299949-6f4a8fd7-7cce-472a-9566-9519db338c7d.gif)
75+
76+
<br />

docs/products/rocket/django.mdx

Lines changed: 128 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -3,80 +3,181 @@ title : Rocket Django - Open-Source Starter
33
sidebar_label: Rocket Django
44
---
55

6-
# Rocket Django
6+
# [Rocket Django](https://appseed.us/product/rocket/django/)
77

88
<SubHeading>Open-source Django Starter styled with Tailwind and Flowbite.</SubHeading>
99

10-
This open-source starter incorporates a few modern technologies provided out-of-the-box, at a production-ready level.
11-
[Rocket Django](https://github.com/app-generator/rocket-django) is actively versioned by AppSeed.
10+
Open-source Django Starter that incorporates a few modern technologies provided out-of-the-box, at a production-ready level.
11+
[Rocket Django](https://appseed.us/product/rocket/django) comes with API (via DRF), Charts, server-side DataTable, Celery for async tasks processing, and Docker support.
1212

1313
- 👉 [Rocket Django](https://rocket-django.onrender.com/) - `LIVE Demo`
14-
- 👉 [Rocket Django](https://github.com/app-generator/rocket-django) - `Source Code`
14+
- 👉 [Rocket Django](https://appseed.us/product/rocket/django/) - `Product Page`
1515

16-
![Rocket Django - Open-source Django Starter styled with Tailwind and Flowbite](https://github-production-user-asset-6210df.s3.amazonaws.com/51070104/276511947-84207026-b13d-4eff-bdf6-04a7b1a10c6c.jpg)
16+
![Rocket Django - Open-source Django Starter styled with Tailwind and Flowbite](https://github-production-user-asset-6210df.s3.amazonaws.com/51070104/272299949-6f4a8fd7-7cce-472a-9566-9519db338c7d.gif)
1717

18-
## ✅ Product Features
18+
<br />
19+
20+
## Features
1921

2022
The codebase is shipped with basic features that are usually implemented in most of the projects:
2123

2224
- Up-to-date Dependencies
2325
- Tailwind/Flowbite Integration via WebPack
2426
- `Extended User Model`
25-
- [API](https://rocket-django.onrender.com/api/product/) via `DRF`
27+
- API via `DRF`
2628
- [Charts](https://rocket-django.onrender.com/charts/)
27-
- [DataTables](https://rocket-django.onrender.com/tables/) (native Django)
28-
- `Celery Beat`
29+
- [DataTables](https://rocket-django.onrender.com/tables/)
30+
- `Celery` (async processing)
2931
- Docker
3032

31-
## ✅ Manual Build
33+
<br />
34+
35+
## System Requirements
36+
37+
- [Python3](https://www.python.org) - the programming language used to code the app
38+
- [GIT](https://git-scm.com) - used to clone the source code from the Github repository
39+
- [NodeJS](https://nodejs.org/) v18.20.0 or above (for Tailwind set up)
40+
- [Docker](https://www.docker.com/) - a popular virtualization software
41+
42+
<br />
3243

33-
> Download code
44+
## Download Sources
45+
46+
The product can be downloaded from the [official page](https://appseed.us/product/rocket/django/) or GitHub using GIT:
3447

3548
```bash
3649
$ git clone https://github.com/app-generator/rocket-django.git
3750
$ cd rocket-django
3851
```
39-
40-
> Install Node Modules
4152

53+
Once the sources are available in the local filesystem, we can start the project using `Docker` or `manual build`.
54+
55+
<br />
56+
57+
## Start with `Docker`
58+
59+
```bash
60+
# Optional (kill all existing containers)
61+
$ docker container kill $(docker ps -q) ; docker container rm $(docker ps -a -q) ; docker network prune -f
62+
# Start the APP
63+
$ docker-compose up --build
4264
```
43-
$ npm i
44-
$ npm run build
65+
66+
Visit `http://localhost:5085` in your browser. The app should be up & running. The starter comes with two default users:
67+
68+
- Ordinary user: `test` / `[email protected]` / `Pass12__` (the password)
69+
- Django SuperUser (admin): `admin` / `[email protected]` / `Pass12__` (the password)
70+
71+
Once authenticated with the above credentials, the sidebar shows different items.
72+
73+
<br />
74+
75+
## Manual Build
76+
77+
> 👉 Create `.env` from `env.sample`
78+
79+
```env
80+
DEBUG=False
81+
82+
SECRET_KEY=<STRONG_KEY_HERE>
4583
```
4684

47-
> Install **Django** modules via `VENV`
85+
> 👉 Install **Django** modules via `VENV`
4886
4987
```bash
5088
$ virtualenv env
5189
$ source env/bin/activate
5290
$ pip install -r requirements.txt
5391
```
5492

55-
> Install **Tailwind/Flowbite** (separate terminal)
93+
> 👉 Install **Tailwind/Flowbite** (another terminal)
94+
95+
Tested with **Node** `v18.20.0` (use at least this version or above)
5696

5797
```bash
5898
$ npm install
59-
$ npm run dev
99+
$ npm run dev
100+
$ npx tailwindcss -i ./static/assets/style.css -o ./static/dist/css/output.css --watch # DEVELOPMENT (LIVE reload)
101+
$ npx tailwindcss -i ./static/assets/style.css -o ./static/dist/css/output.css # PRODUCTION
60102
```
61103

62-
> Migrate DB
104+
> 👉 Migrate DB
63105
64-
```
106+
```bash
65107
$ python manage.py makemigrations
66108
$ python manage.py migrate
67109
```
68110

69-
> Create Superuser & Start the APP
111+
> 👉 `Create Superuser` & Start the [Rocket Django](https://appseed.us/product/rocket/django/) Starter
70112
71-
```
113+
```bash
72114
$ python manage.py createsuperuser # create the admin
73115
$ python manage.py runserver # start the project
74116
```
75117

76-
At this point, we should be able to access **Rocket Django** in the browser.
118+
At this point, we can start using the starter.
119+
120+
<br />
121+
122+
## Use MySql
77123

124+
By default, the starter uses SQLite for persistence. In order to use MySql, here are the steps:
78125

79-
## ✅ Codebase
126+
- Start the MySql Server
127+
- Create a new DataBase
128+
- Create a new user with full privileges over the database
129+
- Install the MySql Python Driver (used by Django to connect)
130+
- `$ pip install mysqlclient`
131+
- Edit the `.env` with the SQL Driver Information & DB Credentials
132+
133+
```env
134+
135+
DB_ENGINE=mysql
136+
DB_HOST=localhost
137+
DB_NAME=<DB_NAME_HERE>
138+
DB_USERNAME=<DB_USER_HERE>
139+
DB_PASS=<DB_PASS_HERE>
140+
DB_PORT=3306
141+
142+
```
143+
144+
Once the above settings are done, run the migration & create tables:
145+
146+
```bash
147+
$ python manage.py makemigrations
148+
$ python manage.py migrate
149+
```
150+
151+
<br />
152+
153+
## Production Build
154+
155+
To use the starter in production mode, here are the steps:
156+
157+
- Set **DEBUG=False** in `.env`
158+
- Execute `collectstatic` command
159+
- `$ python manage.py collectstatic --no-input`
160+
161+
As a model, feel free to take a look at [build.sh](./build.sh), the file executed by the CI/CD flow for Render:
162+
163+
<br />
164+
165+
## **Deploy on Render**
166+
167+
- Create a Blueprint instance
168+
- Go to https://dashboard.render.com/blueprints this link.
169+
- Click `New Blueprint Instance` button.
170+
- Connect the `repo` that you want to deploy.
171+
- Fill the `Service Group Name` and click on the `Update Existing Resources` button.
172+
- Edit the Environment and [specify the PYTHON_VERSION](https://render.com/docs/python-version)
173+
- Version `3.11.5` was used for **[this deployment](https://rocket-django.onrender.com/)**
174+
- After that, your deployment will start automatically.
175+
176+
At this point, the product should be LIVE.
177+
178+
<br />
179+
180+
## Codebase
80181

81182
```bash
82183
< PROJECT ROOT >
@@ -116,69 +217,10 @@ At this point, we should be able to access **Rocket Django** in the browser.
116217
|-- requirements.txt # dependencies
117218
|-- .env # ENV File
118219
|
119-
|-- *************************************************
120-
```
121-
122-
123-
## ✅ Extended User Profile
124-
125-
Authenticated user are able to save their information and an IMAGE avatar.
126-
The fields that manage the user information can be found in [apps/users/models.py](https://github.com/app-generator/rocket-django/blob/main/apps/users/models.py)
127-
128-
```python
129-
ROLE_CHOICES = (
130-
('admin' , 'Admin'),
131-
('user' , 'User'),
132-
)
133-
class Profile(models.Model):
134-
user = models.OneToOneField(User, on_delete=models.CASCADE)
135-
role = models.CharField(max_length=20, choices=ROLE_CHOICES, default='user')
136-
full_name = models.CharField(max_length=255, null=True, blank=True)
137-
country = models.CharField(max_length=255, null=True, blank=True)
138-
city = models.CharField(max_length=255, null=True, blank=True)
139-
zip_code = models.CharField(max_length=255, null=True, blank=True)
140-
address = models.CharField(max_length=255, null=True, blank=True)
141-
phone = models.CharField(max_length=255, null=True, blank=True)
142-
avatar = models.ImageField(upload_to='avatar', null=True, blank=True)
143-
144-
def __str__(self):
145-
return self.user.username
146-
```
147-
148-
Here is the correspondent UI (requires authentication)
149-
150-
![Rocket Django - Extended User Profile.](https://github-production-user-asset-6210df.s3.amazonaws.com/51070104/276511951-8eaf56b6-a77a-44a1-afba-1db4e6d584bb.jpg)
151-
152-
153-
## ✅ API Via DRF
154-
155-
The [Products](https://github.com/app-generator/rocket-django/blob/main/apps/common/models.py) model is managed in two different ways: via API (powered by DRF) and a simple, intuitive DataTable view.
156-
157-
```python
158-
class Product(models.Model):
159-
id = models.AutoField(primary_key=True)
160-
name = models.CharField(max_length = 100)
161-
info = models.CharField(max_length = 100, default = '')
162-
price = models.IntegerField(blank=True, null=True)
163-
164-
def __str__(self):
165-
return self.name
166-
```
167-
168-
The authenticated users are able to submit products using the DRF UI:
169-
170-
![Rocket Django - API via DRF.](https://github-production-user-asset-6210df.s3.amazonaws.com/51070104/276511957-e3eb8f75-316a-4c01-a3fe-0cbe6287c0da.jpg)
171-
172-
173-
## ✅ DataTables
174-
175-
`Products` information can be easily managed using the DataTable layout styled with Tailwind & Flowbite. Supported features:
176-
177-
- Create/Update/Delete
178-
- Pagination
179-
- Search
220+
|-- *************************************************
221+
```
180222

181-
![Rocket Django - DataTables over the Product Table.](https://github-production-user-asset-6210df.s3.amazonaws.com/51070104/276511955-5e279cab-6ee4-49a2-b584-b93b6c2a0f18.jpg)
223+
<br />
182224

183225
## ✅ Resources
184226

0 commit comments

Comments
 (0)