Skip to content

Commit e2c6e2f

Browse files
committed
Release v2.0.3
1 parent 84d4efe commit e2c6e2f

29 files changed

+7921
-1
lines changed

.gitignore

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
*.pyc
2+
*.DS_Store
3+
*.egg*
4+
/dist/
5+
/.idea
6+
/docs/_build/
7+
/node_modules/
8+
build/
9+
env
10+
/staticfiles/
11+
12+
#src
13+
*.sqlite*
14+
15+
.env

CHANGELOG.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# Change Log
2+
3+
## [2.0.3] 2023-03-22
4+
### Changes
5+
6+
- Bump UI: [Django Theme Material Kit](https://github.com/app-generator/django-theme-material-kit) `v1.0.18`
7+
- DOCS Update (readme). New sections:
8+
- `How to customize the theme`
9+
- Render deployment
10+
- Configure the project to use `home/templates`
11+
- Added `custom-index` sample
12+
- `Fix Docker` Execution
13+
- `Update Settings`: ALLOWED_HOSTS, CSRF_TRUSTED_ORIGINS `sections`
14+
15+
## [2.0.2] 2022-06-06
16+
### Improvements
17+
18+
- Use generated version
19+
- Timestamp: `2022-06-06 13:47`
20+
- Build ID: `295d18b1-ccb5-49b1-bb79-8833ab377dd9`
21+
22+
## [2.0.1] 2022-06-06
23+
24+
- Tag latest `manual` coded version
25+
26+
## [2.0.0] 2022-01-17
27+
### Improvements
28+
29+
- Dependencies update (all packages)
30+
- Django==4.0.1
31+
- Settings update for Django 4.x
32+
- `New Parameter`: CSRF_TRUSTED_ORIGINS
33+
- [Origin header checking isn`t performed in older versions](https://docs.djangoproject.com/en/4.0/ref/settings/#csrf-trusted-origins)
34+
35+
## [1.0.7] 2021-12-08
36+
### Improvements (Minor)
37+
38+
- Gulp Scripts: Update the call of `gulp-sass`
39+
40+
## [1.0.6] 2021-09-15
41+
### Improvements
42+
43+
- Codebase update
44+
- `assets` & `templates` moved to `apps` folder
45+
- `apps/base` renamed to `apps/home`
46+
47+
## [1.0.5] 2021-09-10
48+
### Improvements, Bug fixing
49+
50+
- Dependencies update (all packages)
51+
- Django==3.2.6 (latest stable version)
52+
- Codebase:
53+
- Better Code formatting
54+
- Improved Files organization
55+
- Optimize imports
56+
- Docker Scripts Update
57+
- UI: Pixel Lite v4.0.0
58+
- Tooling: Added Gulp SCSS compilation scripts
59+
- Help can be found on README -> `Recompile CSS` section
60+
- Fixes:
61+
- Patch 500 Error when authenticated users access `admin` path (no slash at the end)
62+
- Patch [#16](https://github.com/app-generator/boilerplate-code-django-dashboard/issues/16): Minor issue in Docker
63+
64+
## [1.0.4] 2021-01-04
65+
### Bug fixing
66+
67+
- Read properly the `.env` variables. Impacted file(s):
68+
- Impacted file: **core/settings.py**
69+
70+
## [1.0.3] 2021-01-01
71+
### Bug fixing, Improvements
72+
73+
- 2021-01-01 - Improvements
74+
- Update login form label
75+
- Inject the current page name in view (segment variable)
76+
77+
- 2020-06-28 - Update the UI Kit
78+
- Quick UI KIt by Webpixels
79+
80+
- Patch #3 - Whitenoise Fix - Wrong positioning in 'core/settings.py'
81+
- WhiteNoiseMiddleware must be positioned right after SecurityMiddleware
82+
- Impacted file: **core/settings.py** / MIDDLEWARE section
83+
84+
## [1.0.2] 2020-06-18
85+
### Bug fixing, Improvements
86+
87+
- Patch #1 - Error when access `admin` path (no trailing slash)
88+
- Update Sample UI Kit - [Neumorphism UI](https://themesberg.com/product/ui-kits/neumorphism-ui) by Themesberg
89+
90+
## [1.0.1] 2020-05-30
91+
### Bug fixing, Improvements
92+
93+
- Add CHANGELOG.md to track all changes
94+
- Patch Error-404.html not used in all contexts
95+
- Rename error pages: error-40X become page-40X
96+
- Update LICENSE file - added more information regarding the app usage
97+
98+
## [1.0.0] 2020-02-07
99+
### Initial Release

Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM python:3.9
2+
3+
# set environment variables
4+
ENV PYTHONDONTWRITEBYTECODE 1
5+
ENV PYTHONUNBUFFERED 1
6+
7+
COPY requirements.txt .
8+
# install python dependencies
9+
RUN pip install --upgrade pip
10+
RUN pip install --no-cache-dir -r requirements.txt
11+
12+
COPY . .
13+
14+
# running migrations
15+
RUN python manage.py migrate
16+
17+
# gunicorn
18+
CMD ["gunicorn", "--config", "gunicorn-cfg.py", "core.wsgi"]

LICENSE.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# MIT License
2+
3+
Copyright (c) 2019 - present [AppSeed](http://appseed.us/)
4+
5+
<br />
6+
7+
## Licensing Information
8+
9+
<br />
10+
11+
| Item | - |
12+
| ---------------------------------- | --- |
13+
| License Type | MIT |
14+
| Use for print | **YES** |
15+
| Create single personal website/app | **YES** |
16+
| Create single website/app for client | **YES** |
17+
| Create multiple website/apps for clients | **YES** |
18+
| Create multiple SaaS applications | **YES** |
19+
| End-product paying users | **YES** |
20+
| Product sale | **YES** |
21+
| Remove footer credits | **YES** |
22+
| --- | --- |
23+
| Remove copyright mentions from source code | NO |
24+
| Production deployment assistance | NO |
25+
| Create HTML/CSS template for sale | NO |
26+
| Create Theme/Template for CMS for sale | NO |
27+
| Separate sale of our UI Elements | NO |
28+
29+
<br />
30+
31+
---
32+
For more information regarding licensing, please contact the AppSeed Service < *[email protected]* >

README.md

Lines changed: 192 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,192 @@
1-
# boilerplate-code-django
1+
# [Django Boilerplate](https://appseed.us/boilerplate-code/django-boilerplate/)
2+
3+
Reference codebase used by `AppSeed` in all Django [Apps](https://appseed.us/apps/django/) and [Dashboard](https://appseed.us/admin-dashboards/django/) starters - the product uses an amazing design crafted by `Creative-Tim`.
4+
5+
- 👉 [Django Boilerplate](https://appseed.us/boilerplate-code/django-boilerplate/) - `Product page`
6+
- 👉 [Django Boilerplate](https://django-material-kit.appseed-srv1.com/) - `LIVE Demo`
7+
- 👉 Free [Support](https://appseed.us/support/) via `Email` & `Discord`
8+
9+
<br />
10+
11+
> Features:
12+
13+
-`Up-to-date Dependencies`
14+
- ✅ Theme: [Django Theme Material Kit](https://github.com/app-generator/django-theme-material-kit), **designed by [Creative-Tim](https://www.creative-tim.com/product/material-kit?AFFILIATE=128200)**
15+
-**Authentication**: `Django.contrib.AUTH`, Registration
16+
- 🚀 `Deployment`
17+
- `CI/CD` flow via `Render`
18+
19+
<br />
20+
21+
![Material Kit - Starter generated by AppSeed.](https://user-images.githubusercontent.com/51070104/167396765-c88b7a95-155f-4236-8691-7b80fa2d9cd9.png)
22+
23+
<br />
24+
25+
## Start with `Docker`
26+
27+
> 👉 **Step 1** - Download the code from the GH repository (using `GIT`)
28+
29+
```bash
30+
$ git clone https://github.com/app-generator/boilerplate-code-django.git
31+
$ cd boilerplate-code-django
32+
```
33+
34+
<br />
35+
36+
> 👉 **Step 2** - Start the APP in `Docker`
37+
38+
```bash
39+
$ docker-compose up --build
40+
```
41+
42+
Visit `http://localhost:5085` in your browser. The app should be up & running.
43+
44+
<br />
45+
46+
## Manual Build
47+
48+
> 👉 Download the code
49+
50+
```bash
51+
$ git clone https://github.com/app-generator/boilerplate-code-django.git
52+
$ cd boilerplate-code-django
53+
```
54+
55+
<br />
56+
57+
> 👉 Install modules via `VENV`
58+
59+
```bash
60+
$ virtualenv env
61+
$ source env/bin/activate
62+
$ pip install -r requirements.txt
63+
```
64+
65+
<br />
66+
67+
> 👉 Set Up Database
68+
69+
```bash
70+
$ python manage.py makemigrations
71+
$ python manage.py migrate
72+
```
73+
74+
<br />
75+
76+
> 👉 Create the Superuser
77+
78+
```bash
79+
$ python manage.py createsuperuser
80+
```
81+
82+
<br />
83+
84+
> 👉 Start the app
85+
86+
```bash
87+
$ python manage.py runserver
88+
```
89+
90+
At this point, the app runs at `http://127.0.0.1:8000/`.
91+
92+
<br />
93+
94+
## Codebase structure
95+
96+
The project is coded using a simple and intuitive structure presented below:
97+
98+
```bash
99+
< PROJECT ROOT >
100+
|
101+
|-- core/
102+
| |-- settings.py # Project Configuration
103+
| |-- urls.py # Project Routing
104+
|
105+
|-- home/
106+
| |-- views.py # APP Views
107+
| |-- urls.py # APP Routing
108+
| |-- models.py # APP Models
109+
| |-- tests.py # Tests
110+
| |-- templates/ # Theme Customisation
111+
| |-- pages #
112+
| |-- custom-index.html # Custom Footer
113+
|
114+
|-- requirements.txt # Project Dependencies
115+
|
116+
|-- env.sample # ENV Configuration (default values)
117+
|-- manage.py # Start the app - Django default start script
118+
|
119+
|-- ************************************************************************
120+
```
121+
122+
<br />
123+
124+
## How to Customize
125+
126+
When a template file is loaded, `Django` scans all template directories starting from the ones defined by the user, and returns the first match or an error in case the template is not found.
127+
The theme used to style this starter provides the following files:
128+
129+
```bash
130+
# This exists in ENV: LIB/theme_material_kit
131+
< UI_LIBRARY_ROOT >
132+
|
133+
|-- templates/ # Root Templates Folder
134+
| |
135+
| |-- accounts/
136+
| | |-- sign-in.html # Sign IN Page
137+
| | |-- sign-up.html # Sign UP Page
138+
| |
139+
| |-- includes/
140+
| | |-- footer.html # Footer component
141+
| | |-- navigation.html # Navigation Bar
142+
| | |-- scripts.html # Scripts Component
143+
| |
144+
| |-- layouts/
145+
| | |-- base.html # Masterpage
146+
| |
147+
| |-- pages/
148+
| |-- index.html # Dashboard Page
149+
| |-- author.html # Profile Page
150+
| |-- *.html # All other pages
151+
|
152+
|-- ************************************************************************
153+
```
154+
155+
When the project requires customization, we need to copy the original file that needs an update (from the virtual environment) and place it in the template folder using the same path.
156+
157+
> For instance, if we want to **customize the index.html** these are the steps:
158+
159+
-`Step 1`: create the `templates` DIRECTORY inside the `home` app
160+
-`Step 2`: configure the project to use this new template directory
161+
- `core/settings.py` TEMPLATES section
162+
-`Step 3`: copy the `index.html` from the original location (inside your ENV) and save it to the `home/templates` DIR
163+
- Source PATH: `<YOUR_ENV>/LIB/theme_material_kit/template/pages/index.html`
164+
- Destination PATH: `<PROJECT_ROOT>home/templates/pages/index.html`
165+
166+
> To speed up all these steps, the **codebase is already configured** (`Steps 1, and 2`) and a `custom index` can be found at this location:
167+
168+
`home/templates/pages/custom-index.html`
169+
170+
By default, this file is unused because the `theme` expects `index.html` (without the `custom-` prefix).
171+
172+
In order to use it, simply rename it to `index.html`. Like this, the default version shipped in the library is ignored by Django.
173+
174+
In a similar way, all other files and components can be customized easily.
175+
176+
<br />
177+
178+
## Deploy on [Render](https://render.com/)
179+
180+
- Create a Blueprint instance
181+
- Go to https://dashboard.render.com/blueprints this link.
182+
- Click `New Blueprint Instance` button.
183+
- Connect your `repo` which you want to deploy.
184+
- Fill the `Service Group Name` and click on `Update Existing Resources` button.
185+
- After that your deployment will start automatically.
186+
187+
At this point, the product should be LIVE.
188+
189+
<br />
190+
191+
---
192+
[Django Boilerplate](https://appseed.us/boilerplate-code/django-boilerplate/) - **Django** Starter provided by **[AppSeed](https://appseed.us/)**

README_deploy.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# How to deploy on `Render`
2+
3+
> This document should contains all the steps to deploy the app on render without much effort, using PostgreSQL
4+
5+
https://render.com/docs/deploy-django
6+
7+
## ALL STEPS below
8+
9+
<br />
10+
11+
### 👉 Create `PostgreSQL` database on render
12+
- Go to https://dashboard.render.com/new/database this link.
13+
- Database name should be `berry`.
14+
- Keep the Database, User and Datadog API Key as it is.
15+
- If you want to change database name anything else then you have to change your `render.yaml` file database name too.
16+
17+
<br />
18+
19+
### 👉 Create a Blueprint instance
20+
- Go to https://dashboard.render.com/blueprints this link.
21+
- Click `New Blueprint Instance` button.
22+
- Connect your `repo` which you want to deploy.
23+
- Fill the `Service Group Name` and click on `Update Existing Resources` button.
24+
- After that your deployment will start automatically.

build.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
# exit on error
3+
set -o errexit
4+
5+
python -m pip install --upgrade pip
6+
7+
pip install -r requirements.txt
8+
9+
python manage.py collectstatic --no-input
10+
python manage.py migrate

core/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)