mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-09 14:34:53 +03:00
Removing ignored files
This commit is contained in:
parent
d7a65c143e
commit
e7689b852d
|
@ -2,6 +2,7 @@
|
||||||
"project_name": "My Awesome Project",
|
"project_name": "My Awesome Project",
|
||||||
"project_slug": "{{ cookiecutter.project_name.lower()|replace(' ', '_')|replace('-', '_') }}",
|
"project_slug": "{{ cookiecutter.project_name.lower()|replace(' ', '_')|replace('-', '_') }}",
|
||||||
"venv_name": "{{cookiecutter.project_slug}}_venv",
|
"venv_name": "{{cookiecutter.project_slug}}_venv",
|
||||||
|
"database_user_password":"pass",
|
||||||
"description": "Behold My Awesome Project!",
|
"description": "Behold My Awesome Project!",
|
||||||
"author_name": "Mohand Ahmad",
|
"author_name": "Mohand Ahmad",
|
||||||
"domain_name": "example.com",
|
"domain_name": "example.com",
|
||||||
|
|
27
{{cookiecutter.project_slug}}/create_db.sh
Executable file
27
{{cookiecutter.project_slug}}/create_db.sh
Executable file
|
@ -0,0 +1,27 @@
|
||||||
|
echo 'Creating Database {{cookiecutter.project_slug}}:'
|
||||||
|
sudo -u postgres psql --command 'CREATE DATABASE {{cookiecutter.project_slug}};'
|
||||||
|
|
||||||
|
echo
|
||||||
|
|
||||||
|
echo 'Creating DB user {{cookiecutter.project_slug}}_user with password {{cookiecutter.database_user_password}}'
|
||||||
|
sudo -u postgres psql --command 'CREATE USER {{cookiecutter.project_slug}}_user WITH PASSWORD '\'{{cookiecutter.database_user_password}}\';
|
||||||
|
|
||||||
|
echo
|
||||||
|
|
||||||
|
echo 'Altering role to utf8'
|
||||||
|
sudo -u postgres psql --command 'ALTER ROLE {{cookiecutter.project_slug}}_user SET client_encoding TO '\'utf8\';
|
||||||
|
|
||||||
|
echo
|
||||||
|
|
||||||
|
echo 'setting default_transaction_isolation TO read committed'
|
||||||
|
sudo -u postgres psql --command 'ALTER ROLE {{cookiecutter.project_slug}}_user SET default_transaction_isolation TO '\'read\ committed\';
|
||||||
|
|
||||||
|
echo
|
||||||
|
|
||||||
|
echo 'setting timezone to {{cookiecutter.timezone}}'
|
||||||
|
sudo -u postgres psql --command 'ALTER ROLE {{cookiecutter.project_slug}}_user SET timezone TO '\'{{cookiecutter.timezone}}\';
|
||||||
|
|
||||||
|
echo
|
||||||
|
|
||||||
|
echo 'Granting all privileges on Database {{cookiecutter.project_slug}} to {{cookiecutter.project_slug}}_user;'
|
||||||
|
sudo -u postgres psql --command 'GRANT ALL PRIVILEGES ON DATABASE {{cookiecutter.project_slug}} TO {{cookiecutter.project_slug}}_user;'
|
Loading…
Reference in New Issue
Block a user