Creates custom Django project.
Project description
django-vb-admin
Creates custom Django project layout. Compatible with Django 2.2.4
and
requires Python 3.7.3
or higher version. By default, project uses PostgreSQL,
this means you need to install :) macOS users can install via brew install postgres
Installation
$ createdb -E UTF8 -T template0 my_project_dev # create your database
$ createdb -E UTF8 -T template0 --lc-collate=tr_TR.UTF-8 --lc-ctype=tr_TR.UTF-8 my_project_dev # create your database with locale support
$ pip install django-vb-admin
Usage
After installation, you’ll have a command: django-vb-admin
$ django-vb-admin -h
$ mkdir /path/to/my-django-project/
$ cd /path/to/my-django-project
$ django-vb-admin startproject # create structure to current working directory
# or
$ django-vb-admin startproject --target="/path/to/folder" # create structure to given path
When creation completed, you can create your virtual environment and set your environment variables:
export DJANGO_SECRET=$(head -c 75 /dev/random | base64 | tr -dc 'a-zA-Z0-9' | head -c 50)
export DATABASE_URL="postgres://localhost:5432/my_project_dev"
then;
$ pip install -r requirements/development.pip
Directory structure:
.
├── applications
├── config
│ ├── settings
│ │ ├── __init__.py
│ │ ├── base.py
│ │ ├── development.example.py
│ │ ├── heroku.py
│ │ ├── production.py
│ │ └── test.example.py
│ ├── __init__.py
│ ├── urls.py
│ └── wsgi.py
├── locale
│ └── tr
│ └── LC_MESSAGES
│ ├── django.mo
│ └── django.po
├── requirements
│ ├── base.pip
│ ├── development.pip
│ ├── heroku.pip
│ └── production.pip
├── static
│ ├── css
│ │ ├── application.css
│ │ └── bulma.min.0.7.5.css
│ ├── images
│ │ └── .gitkeep
│ └── js
│ ├── .gitkeep
│ ├── application.js
│ └── fontawesome.5.3.1.all.js
├── templates
│ ├── admin
│ │ └── base_site.html
│ ├── custom_errors
│ │ ├── 400.html
│ │ ├── 403.html
│ │ ├── 404.html
│ │ └── 500.html
│ └── base.html
├── .bandit
├── .flake8
├── .gitignore
├── .isort.cfg
├── .pylintrc
├── .python-version
├── .ruby-version
├── .tm_properties
├── Procfile
├── manage.py
├── pyproject.toml
├── requirements.txt
└── runtime.txt
Now you can init git
:
$ cd /path/to/my-django-project/
$ git init
Packages
Common packages: requirements/base.pip
Django==2.2.4
django-vb-baseapp==1.0.0
Pillow==6.1.0
django-extensions==2.2.1
python-slugify==3.0.3
psycopg2-binary==2.8.3
dj-database-url==0.5.0
django-vb-baseapp
makes the magic! Please check out at https://github.com/vbyazilim/django-vb-baseapp
Development packages: requirements/development.pip
-r base.pip
ipython==7.7.0
bpython==0.18
ptpython==2.0.4
Werkzeug==0.15.5
django-debug-toolbar==2.0
coverage==4.5.4
isort==4.3.21
black==19.3b0
flake8==3.7.8
flake8-bandit==2.1.1
flake8-blind-except==0.1.1
flake8-bugbear==19.3.0
flake8-builtins==1.4.1
flake8-polyfill==1.0.2
flake8-print==3.1.0
flake8-quotes==2.1.0
flake8-string-format==0.2.3
pylint==2.3.1
Heroku related packages: requirements/heroku.pip
-r base.pip
gunicorn==19.9.0
whitenoise==4.1.3
boto3==1.9.202
django-storages==1.7.1
Built-in support for AWS-S3 Storage. You need to create/get your:
S3_ACCESS_KEY_ID
S3_SECRET_ACCESS_KEY
and set those variables on Heroku. Please check config/settings/heroku.py
for more details. Basic Heroku setup:
$ heroku login
$ heroku apps:create
$ heroku addons:create heroku-postgresql:hobby-dev
$ heroku config:set DJANGO_ENV="heroku"
$ heroku config:set DJANGO_SECRET='YOUR_GENERATED_RANDOM_SECRET'
$ heroku config:set S3_ACCESS_KEY_ID='YOUR_S3_ACCESS_KEY_ID'
$ heroku config:set S3_SECRET_ACCESS_KEY='YOUR_S3_SECRET_ACCESS_KEY'
$ heroku config:set S3_BUCKET_NAME='YOUR_S3_BUCKET_NAME'
$ heroku config:set WEB_CONCURRENCY=3
$ git push heroku master
$ heroku run python manage.py migrate
$ heroku run python manage.py createsuperuser
If you want to use email reporter for Django errors, you need to set couple more environment variables on Heroku side too.
Linux/Production packages: requirements/production.pip
-r base.pip
uWSGI==2.0.18
License
This project is licensed under MIT
Contributer(s)
- Uğur "vigo" Özyılmazel - Creator, maintainer
Contribute
All PR’s are welcome!
fork
(https://github.com/vbyazilim/django-vb-admin/fork)- Create your
branch
(git checkout -b my-features
) commit
yours (git commit -am 'added killer options'
)push
yourbranch
(git push origin my-features
)- Than create a new Pull Request!
Change Log
2019-09-19
- Add Codacy integration
- Add setup completed message
2019-08-12
- Add
templates/base.html
using Bulma.io 0.7.5 - Add
templates/admin/
for base admin site. - Add
static/js/application.js
- Add global locale path
- Version bump: 1.0.4
- Version bump: 1.0.5 (Fix README file)
2019-08-07
- Add
--version
option, version bump to 1.0.3 - Version bump: 1.0.2
- Add Rake tasks
- Fix MAFIFEST.in file
- Initial Beta relase: 1.0.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django_vb_admin-1.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 739dfc15bf56d34c163d23bb6834f8dd6468e3a6f4c2508c6f379b7013553d5b |
|
MD5 | 728e791f8cb7d9bee07eeec1bba23c4c |
|
BLAKE2b-256 | b620d65f04452a1199165b5030a5d7e656ec77352bc30600e79d449a22186e3c |