Skip to content

Commit f39917b

Browse files
committed
Initial commit
0 parents  commit f39917b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+1581
-0
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.gitignore

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.nox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
*.py,cover
50+
.hypothesis/
51+
.pytest_cache/
52+
cover/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
.pybuilder/
76+
target/
77+
78+
# Jupyter Notebook
79+
.ipynb_checkpoints
80+
81+
# IPython
82+
profile_default/
83+
ipython_config.py
84+
85+
# pyenv
86+
# For a library or package, you might want to ignore these files since the code is
87+
# intended to run in multiple environments; otherwise, check them in:
88+
# .python-version
89+
90+
# pipenv
91+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94+
# install all needed dependencies.
95+
#Pipfile.lock
96+
97+
# poetry
98+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99+
# This is especially recommended for binary packages to ensure reproducibility, and is more
100+
# commonly ignored for libraries.
101+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102+
#poetry.lock
103+
104+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
105+
__pypackages__/
106+
107+
# Celery stuff
108+
celerybeat-schedule
109+
celerybeat.pid
110+
111+
# SageMath parsed files
112+
*.sage.py
113+
114+
# Environments
115+
.env
116+
.venv
117+
env/
118+
venv/
119+
ENV/
120+
env.bak/
121+
venv.bak/
122+
123+
# Spyder project settings
124+
.spyderproject
125+
.spyproject
126+
127+
# Rope project settings
128+
.ropeproject
129+
130+
# mkdocs documentation
131+
/site
132+
133+
# mypy
134+
.mypy_cache/
135+
.dmypy.json
136+
dmypy.json
137+
138+
# Pyre type checker
139+
.pyre/
140+
141+
# pytype static type analyzer
142+
.pytype/
143+
144+
# Cython debug symbols
145+
cython_debug/
146+
147+
# PyCharm
148+
# JetBrains specific template is maintainted in a separate JetBrains.gitignore that can
149+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
150+
# and can be added to the global gitignore or merged into this file. For a more nuclear
151+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
152+
#.idea/

.pylintrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[MASTER]
2+
disable=
3+
C0114, # missing-module-docstring
4+
C0115, # missing-function-docstring
5+
C0116, # missing-class-docstring

.vscode/settings.json

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
{
2+
"cSpell.words": [
3+
"allauth",
4+
"ANYMAIL",
5+
"authtoken",
6+
"autocrop",
7+
"Codechef",
8+
"collectstatic",
9+
"colorspace",
10+
"corsheaders",
11+
"createsuperuser",
12+
"gmailapi",
13+
"mailauth",
14+
"MAILJET",
15+
"makemigrations",
16+
"mptt",
17+
"runserver",
18+
"sendgrid",
19+
"simplejwt",
20+
"smedia",
21+
"socialaccount",
22+
"virtualenv",
23+
"WAGTAILUSERS",
24+
"xsendfile"
25+
],
26+
"python.linting.pylintEnabled": true,
27+
"python.linting.enabled": true,
28+
"better-comments.tags": [
29+
{
30+
"tag": "!",
31+
"color": "#FF2D00",
32+
"strikethrough": false,
33+
"underline": false,
34+
"backgroundColor": "transparent",
35+
"bold": false,
36+
"italic": false
37+
},
38+
{
39+
"tag": "?",
40+
"color": "#3498DB",
41+
"strikethrough": false,
42+
"underline": false,
43+
"backgroundColor": "transparent",
44+
"bold": false,
45+
"italic": false
46+
},
47+
{
48+
"tag": "//",
49+
"color": "#474747",
50+
"strikethrough": true,
51+
"underline": false,
52+
"backgroundColor": "transparent",
53+
"bold": false,
54+
"italic": false
55+
},
56+
{
57+
"tag": "-",
58+
"color": "#E60965",
59+
"strikethrough": false,
60+
"underline": false,
61+
"backgroundColor": "transparent",
62+
"bold": false,
63+
"italic": false
64+
},
65+
{
66+
"tag": "*",
67+
"color": "#14C38E",
68+
"strikethrough": false,
69+
"underline": false,
70+
"backgroundColor": "transparent",
71+
"bold": false,
72+
"italic": false
73+
}
74+
]
75+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Prashant Nigam
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Procfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: gunicorn config.wsgi

README.md

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# Simple Django Rest Starter [🔗](https://brickhub.dev/bricks/simple_django_starter/0.1.0+2)
2+
3+
<div align="center">
4+
<img width="650" height="250" style="background:white;" src="https://soshace.com/wp-content/uploads/2021/01/879-png-3.png" alt="Django logo">
5+
</div>
6+
7+
This is ready to deploy Django Starter Template for backend development which set up all the basic requirements and api routes for a Django project.
8+
9+
[![Powered by Mason](https://img.shields.io/endpoint?url=https%3A%2F%2Ftinyurl.com%2Fmason-badge)](https://github.com/felangel/mason) ![Python](https://img.shields.io/badge/python-3670A0?style=for-the-badge&logo=python&logoColor=ffdd54) ![Django](https://img.shields.io/badge/django-%23092E20.svg?style=for-the-badge&logo=django&logoColor=white) ![Heroku](https://img.shields.io/badge/heroku-%23430098.svg?style=for-the-badge&logo=heroku&logoColor=white)
10+
11+
## 🚀 Features
12+
13+
- Django 4.0 & Python 3.8
14+
- Ready to deploy on Heroku
15+
- SendGrid SMTP support
16+
- Django Rest Framework
17+
- Django Allauth
18+
- Custom Email Based Authentication
19+
- Custom Admin Interface
20+
- CORS Support
21+
22+
## Usage 🚀
23+
24+
```
25+
mason make simple_django_rest_starter
26+
```
27+
28+
## Variables ✨
29+
30+
| variable | description | default | type |
31+
| ------------------ | ---------------------------- | ------- | --------- |
32+
| `name` | project name | Simple Project | `string` |
33+
| `email` | email address | [email protected] | `string` |
34+
| `password` | email password | Null | `string` |
35+
36+
37+
## Prerequisites 💬
38+
39+
System Requirements:
40+
- Python 3.8+
41+
- Django 4.0+
42+
- SendGrid API Key
43+
44+
## API Documentation 📚
45+
46+
47+
## Virtual Environment ⚡️
48+
49+
### Windows
50+
51+
- Using Virtualenv: `pip install virtualenv`
52+
```bash
53+
virtualenv venv
54+
cd venv/Scripts
55+
activate
56+
```
57+
58+
### Linux & MacOS
59+
- Using Virtualenv: `pip install virtualenv`
60+
```bash
61+
virtualenv venv
62+
source venv/bin/activate
63+
```
64+
65+
## Installation 📦
66+
67+
### Install requirements
68+
69+
pip install -r requirements.txt
70+
71+
### Migrations
72+
73+
python manage.py makemigrations
74+
python manage.py migrate
75+
76+
### Static files
77+
78+
python manage.py collectstatic
79+
80+
### Create superuser
81+
82+
python manage.py createsuperuser
83+
84+
### SMTP email
85+
86+
EMAIL_BACKEND = "sendgrid_backend.SendgridBackend"
87+
FROM_EMAIL = os.environ['SEND_VERIFY_EMAIL']
88+
DEFAULT_FROM_EMAIL = os.environ['SEND_VERIFY_EMAIL']
89+
SENDGRID_ECHO_TO_STDOUT = True
90+
SENDGRID_API_KEY = os.environ['SEND_GRID_API_KEY']
91+
SENDGRID_SANDBOX_MODE_IN_DEBUG = False
92+
93+
## Deployment 🚀
94+
95+
### Heroku
96+
97+
heroku login
98+
heroku config:set DISABLE_COLLECTSTATIC=1 --app <your-app-name>
99+
100+
## Run Locally 🏃
101+
102+
python manage.py runserver
103+
104+
## Issues 🐛
105+
106+
Here is a list of all the issues I have faced while developing this project. At the end of the development, I fixed all the problems, but I am still working on the issues I have not fixed yet. Some problems arise again, so we can have that issue as soon as possible while working on the projects.
107+
108+
### 1. CircularDependencyError (Filer Package)
109+
Solution: https://github.com/django-cms/django-filer/issues/1296

accounts/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)