Package: django-vb-admin
django-vb-adminCreates custom Django project layout. Compatible withDjango 2.2.8and
requiresPython 3.7.x. By default, project usesPostgreSQL,
this means you need to install :) macOS users can install viabrew install postgresInstallationLet’s create PostgreSQL database first:$createdb-EUTF8-Ttemplate0my_project_dev# create your database$createdb-EUTF8-Ttemplate0--lc-collate=tr_TR.UTF-8--lc-ctype=tr_TR.UTF-8my_project_dev# or create your database with Turkish locale supportNow, install package:$pipinstalldjango-vb-adminThis package heavily depends ondjango-vb-baseapp.
All the rake tasks are related todjango-vb-baseapp. You don’t need to do
anything,django-vb-admininstalls required packages automatically.UsageAfter installation, you’ll have a command:django-vb-admin$django-vb-admin-h

usage:django-vb-admin[-h][-tTARGET][-v{0,1}][--version][{startproject}]CreatenewDjangoproject

positionalarguments:{startproject}Nameofcommand(s)optionalarguments:-h,--helpshowthishelpmessageandexit-tTARGET,--targetTARGETTargetpath-v{0,1},--verbosity{0,1}Verbosemode--versionshowprogram'sversionnumberandexitLet’s create project:$mkdir/path/to/my-django-project/
$cd/path/to/my-django-project
$django-vb-adminstartproject# create structure to current working directory# or$django-vb-adminstartproject--target="/path/to/folder"# create structure to given pathWhen creation completed, you can create your virtual environment and set your
environment variables:exportDJANGO_SECRET=$(head-c75/dev/random|base64|tr-dc'a-zA-Z0-9'|head-c50)exportDATABASE_URL="postgres://localhost:5432/my_project_dev"then;$pipinstall-rrequirements/development.pipDirectory 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.X.X.X.css
│├──images
││└──.gitkeep
│└──js
│├──.gitkeep
│├──application.js
│└──fontawesome.X.X.X.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.txtNow you can initgit:$cd/path/to/my-django-project/
$gitinitPackagesCommon packages:requirements/base.pipDjango==2.2.8Pillow==6.2.1
django-extensions==2.2.5
python-slugify==4.0.0
psycopg2-binary==2.8.4
dj-database-url==0.5.0
django-vb-baseapp
vb-consoleDevelopment packages:requirements/development.pip-rbase.pipipython==7.10.0ipdb==0.12.3
prompt-toolkit==2.0.10bpython==0.18ptpython==2.0.6Werkzeug==0.16.0
django-debug-toolbar==2.1coverage==4.5.4isort==4.3.21black==19.10b0flake8==3.7.9
flake8-bandit==2.1.2
flake8-blind-except==0.1.1
flake8-bugbear==19.8.0
flake8-builtins==1.4.1
flake8-polyfill==1.0.2
flake8-print==3.1.4
flake8-quotes==2.1.1
flake8-string-format==0.2.3pylint==2.4.4Note: Package order is important here. Due toprompt-toolkitdependency
onipdbandptpython, we need to install specific version:prompt-toolkit==2.0.10in the given order. Packages are test on Python 3.8.0 environment and had
issues withipdb,ipythonand other repls.Heroku related packages:requirements/heroku.pip-rbase.pipgunicorn==20.0.4whitenoise==4.1.4boto3==1.10.33
django-storages==1.8Built-in support forAWS-S3 Storage. You need to create/get your:S3_ACCESS_KEY_IDS3_SECRET_ACCESS_KEYand set those variables on Heroku. Please checkconfig/settings/heroku.pyfor more details. Basic Heroku setup:$herokulogin
$herokuapps:create
$herokuaddons:createheroku-postgresql:hobby-dev
$herokuconfig:setDJANGO_ENV="heroku"$herokuconfig:setDJANGO_SECRET='YOUR_GENERATED_RANDOM_SECRET'$herokuconfig:setS3_ACCESS_KEY_ID='YOUR_S3_ACCESS_KEY_ID'$herokuconfig:setS3_SECRET_ACCESS_KEY='YOUR_S3_SECRET_ACCESS_KEY'$herokuconfig:setS3_BUCKET_NAME='YOUR_S3_BUCKET_NAME'$herokuconfig:setWEB_CONCURRENCY=3$gitpushherokumaster
$herokurunpythonmanage.pymigrate
$herokurunpythonmanage.pycreatesuperuserIf 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-rbase.pipuWSGI==2.0.18RakefileIf you have Ruby installed on your system (if you are on macOS you’ll have it by default)
you can easily automate your basic operations. Runrake -Tfor listing
available tasks:$rake-T

rakedb:migrate[database]# Run migration for given database (default: 'default')rakedb:roll_back[name_of_application,name_of_migration]# Roll-back (name of application, name of migration)rakedb:shell# run database shell ..rakedb:show[name_of_application]# Show migrations for an application (default: 'all')rakedb:update[name_of_application,name_of_migration,is_empty]# Update migration (name of application, name of migration?, is empty?)rakedefault# Default task: runserver_plus (Werkzeug)rakelocale:compile# Compile locale dictionaryrakelocale:update# Update locale dictionaryrakenew:application[name_of_application]# Create new Django applicationrakenew:model[name_of_application,name_of_model,type_of_model]# Create new Model for given application: django,basemodel,softdeleterakerunserver:default# Run: runserver (Django's default server)rakerunserver:default_ipdb# Run: runserver (Django's default server) + ipdb debug supportrakerunserver:plus# Run: runserver_plus (Werkzeug)rakerunserver:plus_ipdb# Run: runserver_plus (Werkzeug) + ipdb debug supportrakeshell[repl]# Run shell+ avail: ptpython,ipython,bpython default: ptpythonraketest:browse_coverage[port]# Browse test coverageraketest:coverage[cli_args]# Show test coverage (default: '--show-missing --ignore-errors --skip-covered')raketest:run[name_of_application,verbose]# Run tests for given applicationRake tasks are the wrapper for Django’s management commands. Mostly related
todjango-vb-baseappapplication. Please checkouthttps://github.com/vbyazilim/django-vb-baseappfor more detail and examples.django-vb-baseapphas lot of features :)LicenseThis project is licensed under MITContributer(s)Uğur "vigo" Özyılmazel- Creator, maintainerContributeAll PR’s are welcome!fork(https://github.com/vbyazilim/django-vb-admin/fork)Create yourbranch(git checkout -b my-features)commityours (git commit -am 'Add awesome feature')pushyourbranch(git push origin my-features)Than create a newPull Request!Change Log2019-12-08Drop Python 3.8.0 supportFix repls and debug related issuesBump version2019-12-05Upgrade packages, now using Django 2.2.8Python 3.8.0 supportAdd new rake tasksFixdevelopment.pippackage installation orderBump version2019-10-20Add current git tag and python version information indicator to django-admin indexAdddjango-vb-baseappas package dependencyUpgrade python packagesAddtemplates/base.htmlusingBulma.io0.8.0Bump version: 1.0.132019-09-19Add Codacy integrationAdd setup completed message2019-08-12Addtemplates/base.htmlusingBulma.io0.7.5Addtemplates/admin/for base admin site.Addstatic/js/application.jsAdd global locale pathBump version: 1.0.4Bump version: 1.0.5 (Fix README file)2019-08-07Add--versionoption, version bump to 1.0.3Bump version: 1.0.2Add Rake tasksFix MAFIFEST.in fileInitial Beta relase: 1.0.0