-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
84d4efe
commit e2c6e2f
Showing
29 changed files
with
7,921 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
*.pyc | ||
*.DS_Store | ||
*.egg* | ||
/dist/ | ||
/.idea | ||
/docs/_build/ | ||
/node_modules/ | ||
build/ | ||
env | ||
/staticfiles/ | ||
|
||
#src | ||
*.sqlite* | ||
|
||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
# Change Log | ||
|
||
## [2.0.3] 2023-03-22 | ||
### Changes | ||
|
||
- Bump UI: [Django Theme Material Kit](https://github.com/app-generator/django-theme-material-kit) `v1.0.18` | ||
- DOCS Update (readme). New sections: | ||
- `How to customize the theme` | ||
- Render deployment | ||
- Configure the project to use `home/templates` | ||
- Added `custom-index` sample | ||
- `Fix Docker` Execution | ||
- `Update Settings`: ALLOWED_HOSTS, CSRF_TRUSTED_ORIGINS `sections` | ||
|
||
## [2.0.2] 2022-06-06 | ||
### Improvements | ||
|
||
- Use generated version | ||
- Timestamp: `2022-06-06 13:47` | ||
- Build ID: `295d18b1-ccb5-49b1-bb79-8833ab377dd9` | ||
|
||
## [2.0.1] 2022-06-06 | ||
|
||
- Tag latest `manual` coded version | ||
|
||
## [2.0.0] 2022-01-17 | ||
### Improvements | ||
|
||
- Dependencies update (all packages) | ||
- Django==4.0.1 | ||
- Settings update for Django 4.x | ||
- `New Parameter`: CSRF_TRUSTED_ORIGINS | ||
- [Origin header checking isn`t performed in older versions](https://docs.djangoproject.com/en/4.0/ref/settings/#csrf-trusted-origins) | ||
|
||
## [1.0.7] 2021-12-08 | ||
### Improvements (Minor) | ||
|
||
- Gulp Scripts: Update the call of `gulp-sass` | ||
|
||
## [1.0.6] 2021-09-15 | ||
### Improvements | ||
|
||
- Codebase update | ||
- `assets` & `templates` moved to `apps` folder | ||
- `apps/base` renamed to `apps/home` | ||
|
||
## [1.0.5] 2021-09-10 | ||
### Improvements, Bug fixing | ||
|
||
- Dependencies update (all packages) | ||
- Django==3.2.6 (latest stable version) | ||
- Codebase: | ||
- Better Code formatting | ||
- Improved Files organization | ||
- Optimize imports | ||
- Docker Scripts Update | ||
- UI: Pixel Lite v4.0.0 | ||
- Tooling: Added Gulp SCSS compilation scripts | ||
- Help can be found on README -> `Recompile CSS` section | ||
- Fixes: | ||
- Patch 500 Error when authenticated users access `admin` path (no slash at the end) | ||
- Patch [#16](https://github.com/app-generator/boilerplate-code-django-dashboard/issues/16): Minor issue in Docker | ||
|
||
## [1.0.4] 2021-01-04 | ||
### Bug fixing | ||
|
||
- Read properly the `.env` variables. Impacted file(s): | ||
- Impacted file: **core/settings.py** | ||
|
||
## [1.0.3] 2021-01-01 | ||
### Bug fixing, Improvements | ||
|
||
- 2021-01-01 - Improvements | ||
- Update login form label | ||
- Inject the current page name in view (segment variable) | ||
|
||
- 2020-06-28 - Update the UI Kit | ||
- Quick UI KIt by Webpixels | ||
|
||
- Patch #3 - Whitenoise Fix - Wrong positioning in 'core/settings.py' | ||
- WhiteNoiseMiddleware must be positioned right after SecurityMiddleware | ||
- Impacted file: **core/settings.py** / MIDDLEWARE section | ||
|
||
## [1.0.2] 2020-06-18 | ||
### Bug fixing, Improvements | ||
|
||
- Patch #1 - Error when access `admin` path (no trailing slash) | ||
- Update Sample UI Kit - [Neumorphism UI](https://themesberg.com/product/ui-kits/neumorphism-ui) by Themesberg | ||
|
||
## [1.0.1] 2020-05-30 | ||
### Bug fixing, Improvements | ||
|
||
- Add CHANGELOG.md to track all changes | ||
- Patch Error-404.html not used in all contexts | ||
- Rename error pages: error-40X become page-40X | ||
- Update LICENSE file - added more information regarding the app usage | ||
|
||
## [1.0.0] 2020-02-07 | ||
### Initial Release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM python:3.9 | ||
|
||
# set environment variables | ||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
ENV PYTHONUNBUFFERED 1 | ||
|
||
COPY requirements.txt . | ||
# install python dependencies | ||
RUN pip install --upgrade pip | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
COPY . . | ||
|
||
# running migrations | ||
RUN python manage.py migrate | ||
|
||
# gunicorn | ||
CMD ["gunicorn", "--config", "gunicorn-cfg.py", "core.wsgi"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# MIT License | ||
|
||
Copyright (c) 2019 - present [AppSeed](http://appseed.us/) | ||
|
||
<br /> | ||
|
||
## Licensing Information | ||
|
||
<br /> | ||
|
||
| Item | - | | ||
| ---------------------------------- | --- | | ||
| License Type | MIT | | ||
| Use for print | **YES** | | ||
| Create single personal website/app | **YES** | | ||
| Create single website/app for client | **YES** | | ||
| Create multiple website/apps for clients | **YES** | | ||
| Create multiple SaaS applications | **YES** | | ||
| End-product paying users | **YES** | | ||
| Product sale | **YES** | | ||
| Remove footer credits | **YES** | | ||
| --- | --- | | ||
| Remove copyright mentions from source code | NO | | ||
| Production deployment assistance | NO | | ||
| Create HTML/CSS template for sale | NO | | ||
| Create Theme/Template for CMS for sale | NO | | ||
| Separate sale of our UI Elements | NO | | ||
|
||
<br /> | ||
|
||
--- | ||
For more information regarding licensing, please contact the AppSeed Service < *[email protected]* > |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,192 @@ | ||
# boilerplate-code-django | ||
# [Django Boilerplate](https://appseed.us/boilerplate-code/django-boilerplate/) | ||
|
||
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`. | ||
|
||
- 👉 [Django Boilerplate](https://appseed.us/boilerplate-code/django-boilerplate/) - `Product page` | ||
- 👉 [Django Boilerplate](https://django-material-kit.appseed-srv1.com/) - `LIVE Demo` | ||
- 👉 Free [Support](https://appseed.us/support/) via `Email` & `Discord` | ||
|
||
<br /> | ||
|
||
> Features: | ||
- ✅ `Up-to-date Dependencies` | ||
- ✅ 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)** | ||
- ✅ **Authentication**: `Django.contrib.AUTH`, Registration | ||
- 🚀 `Deployment` | ||
- `CI/CD` flow via `Render` | ||
|
||
<br /> | ||
|
||
![Material Kit - Starter generated by AppSeed.](https://user-images.githubusercontent.com/51070104/167396765-c88b7a95-155f-4236-8691-7b80fa2d9cd9.png) | ||
|
||
<br /> | ||
|
||
## Start with `Docker` | ||
|
||
> 👉 **Step 1** - Download the code from the GH repository (using `GIT`) | ||
```bash | ||
$ git clone https://github.com/app-generator/boilerplate-code-django.git | ||
$ cd boilerplate-code-django | ||
``` | ||
|
||
<br /> | ||
|
||
> 👉 **Step 2** - Start the APP in `Docker` | ||
```bash | ||
$ docker-compose up --build | ||
``` | ||
|
||
Visit `http://localhost:5085` in your browser. The app should be up & running. | ||
|
||
<br /> | ||
|
||
## Manual Build | ||
|
||
> 👉 Download the code | ||
```bash | ||
$ git clone https://github.com/app-generator/boilerplate-code-django.git | ||
$ cd boilerplate-code-django | ||
``` | ||
|
||
<br /> | ||
|
||
> 👉 Install modules via `VENV` | ||
```bash | ||
$ virtualenv env | ||
$ source env/bin/activate | ||
$ pip install -r requirements.txt | ||
``` | ||
|
||
<br /> | ||
|
||
> 👉 Set Up Database | ||
```bash | ||
$ python manage.py makemigrations | ||
$ python manage.py migrate | ||
``` | ||
|
||
<br /> | ||
|
||
> 👉 Create the Superuser | ||
```bash | ||
$ python manage.py createsuperuser | ||
``` | ||
|
||
<br /> | ||
|
||
> 👉 Start the app | ||
```bash | ||
$ python manage.py runserver | ||
``` | ||
|
||
At this point, the app runs at `http://127.0.0.1:8000/`. | ||
|
||
<br /> | ||
|
||
## Codebase structure | ||
|
||
The project is coded using a simple and intuitive structure presented below: | ||
|
||
```bash | ||
< PROJECT ROOT > | ||
| | ||
|-- core/ | ||
| |-- settings.py # Project Configuration | ||
| |-- urls.py # Project Routing | ||
| | ||
|-- home/ | ||
| |-- views.py # APP Views | ||
| |-- urls.py # APP Routing | ||
| |-- models.py # APP Models | ||
| |-- tests.py # Tests | ||
| |-- templates/ # Theme Customisation | ||
| |-- pages # | ||
| |-- custom-index.html # Custom Footer | ||
| | ||
|-- requirements.txt # Project Dependencies | ||
| | ||
|-- env.sample # ENV Configuration (default values) | ||
|-- manage.py # Start the app - Django default start script | ||
| | ||
|-- ************************************************************************ | ||
``` | ||
|
||
<br /> | ||
|
||
## How to Customize | ||
|
||
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. | ||
The theme used to style this starter provides the following files: | ||
|
||
```bash | ||
# This exists in ENV: LIB/theme_material_kit | ||
< UI_LIBRARY_ROOT > | ||
| | ||
|-- templates/ # Root Templates Folder | ||
| | | ||
| |-- accounts/ | ||
| | |-- sign-in.html # Sign IN Page | ||
| | |-- sign-up.html # Sign UP Page | ||
| | | ||
| |-- includes/ | ||
| | |-- footer.html # Footer component | ||
| | |-- navigation.html # Navigation Bar | ||
| | |-- scripts.html # Scripts Component | ||
| | | ||
| |-- layouts/ | ||
| | |-- base.html # Masterpage | ||
| | | ||
| |-- pages/ | ||
| |-- index.html # Dashboard Page | ||
| |-- author.html # Profile Page | ||
| |-- *.html # All other pages | ||
| | ||
|-- ************************************************************************ | ||
``` | ||
|
||
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. | ||
|
||
> For instance, if we want to **customize the index.html** these are the steps: | ||
- ✅ `Step 1`: create the `templates` DIRECTORY inside the `home` app | ||
- ✅ `Step 2`: configure the project to use this new template directory | ||
- `core/settings.py` TEMPLATES section | ||
- ✅ `Step 3`: copy the `index.html` from the original location (inside your ENV) and save it to the `home/templates` DIR | ||
- Source PATH: `<YOUR_ENV>/LIB/theme_material_kit/template/pages/index.html` | ||
- Destination PATH: `<PROJECT_ROOT>home/templates/pages/index.html` | ||
|
||
> 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: | ||
`home/templates/pages/custom-index.html` | ||
|
||
By default, this file is unused because the `theme` expects `index.html` (without the `custom-` prefix). | ||
|
||
In order to use it, simply rename it to `index.html`. Like this, the default version shipped in the library is ignored by Django. | ||
|
||
In a similar way, all other files and components can be customized easily. | ||
|
||
<br /> | ||
|
||
## Deploy on [Render](https://render.com/) | ||
|
||
- Create a Blueprint instance | ||
- Go to https://dashboard.render.com/blueprints this link. | ||
- Click `New Blueprint Instance` button. | ||
- Connect your `repo` which you want to deploy. | ||
- Fill the `Service Group Name` and click on `Update Existing Resources` button. | ||
- After that your deployment will start automatically. | ||
|
||
At this point, the product should be LIVE. | ||
|
||
<br /> | ||
|
||
--- | ||
[Django Boilerplate](https://appseed.us/boilerplate-code/django-boilerplate/) - **Django** Starter provided by **[AppSeed](https://appseed.us/)** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# How to deploy on `Render` | ||
|
||
> This document should contains all the steps to deploy the app on render without much effort, using PostgreSQL | ||
https://render.com/docs/deploy-django | ||
|
||
## ALL STEPS below | ||
|
||
<br /> | ||
|
||
### 👉 Create `PostgreSQL` database on render | ||
- Go to https://dashboard.render.com/new/database this link. | ||
- Database name should be `berry`. | ||
- Keep the Database, User and Datadog API Key as it is. | ||
- If you want to change database name anything else then you have to change your `render.yaml` file database name too. | ||
|
||
<br /> | ||
|
||
### 👉 Create a Blueprint instance | ||
- Go to https://dashboard.render.com/blueprints this link. | ||
- Click `New Blueprint Instance` button. | ||
- Connect your `repo` which you want to deploy. | ||
- Fill the `Service Group Name` and click on `Update Existing Resources` button. | ||
- After that your deployment will start automatically. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env bash | ||
# exit on error | ||
set -o errexit | ||
|
||
python -m pip install --upgrade pip | ||
|
||
pip install -r requirements.txt | ||
|
||
python manage.py collectstatic --no-input | ||
python manage.py migrate |
Empty file.
Oops, something went wrong.