example of dj initial project
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



Example of the falstart-utility result to create a basic project in Django

falstart example

$ falstart falstart-example
> Django version ['1.9.5'] 1.10.2
> Debian version (for vagrant box) ['jessie64']
> Python version ['3.5.1'] 3.5.2
> Vagrant box IP-addr ['']
> Do you nead a POSTGRES? [Y/n]
> Do you nead a CELERY? [y/N] y
> Do you nead a REDIS? [y/N] y
> Do you nead a SENTRY? [y/N] y
> Database name ['falstartexample_db']
> Database user ['falstartexample_user']
> Database pass ['VJJxu87Ki']
[falstart] > make dir: "/home/maks/temp/falstart-example"
[falstart] > render "Vagrantfile.j2" > "Vagrantfile"
[falstart] > render "Makefile.j2" > "Makefile"
[falstart] > run: "chmod +x Makefile"
[falstart] > make dir: "provision"
[falstart] > make dir: "provision"
[falstart] > render "provision_fabfile.j2" > "provision/fabric_provisioner.py"
[falstart] > render "requirements.j2" > "requirements.txt"
[falstart] > render "requirements.j2" > "requirements-remote.txt"
[falstart] > render "lintrc.j2" > ".lintrc"
[falstart] > render "coveragerc.j2" > ".coveragerc"
[falstart] > make dir: "falstartexample"
[falstart] > render "py_codes/settings_local.j2" > "falstartexample/settings_local.py.example"
[falstart] > make dir: "falstartexample"
[falstart] > render "py_codes/celery.j2" > "falstartexample/celery.py"
[falstart] > copy: "/home/maks/s50/falstart/falstart/templates/vagrant_templates" > "provision/templates"
[falstart] > run: "vagrant up"
Bringing machine 'falstartexample_vagrant' up with 'virtualbox' provider...
==> falstartexample_vagrant: Checking if box 'debian/jessie64' is up to date...
==> falstartexample_vagrant: A newer version of the box 'debian/jessie64' is available! You currently
==> falstartexample_vagrant: have version '8.4.0'. The latest is version '8.6.1'. Run
==> falstartexample_vagrant: `vagrant box update` to update.
==> falstartexample_vagrant: Clearing any previously set forwarded ports...
==> falstartexample_vagrant: Fixed port collision for 22 => 2222. Now on port 2200.
==> falstartexample_vagrant: Clearing any previously set network interfaces...
==> falstartexample_vagrant: Preparing network interfaces based on configuration...
    falstartexample_vagrant: Adapter 1: nat
    falstartexample_vagrant: Adapter 2: hostonly
==> falstartexample_vagrant: Forwarding ports...
    falstartexample_vagrant: 22 (guest) => 2200 (host) (adapter 1)
==> falstartexample_vagrant: Running 'pre-boot' VM customizations...
==> falstartexample_vagrant: Booting VM...
==> falstartexample_vagrant: Waiting for machine to boot. This may take a few minutes...
    falstartexample_vagrant: SSH address:
    falstartexample_vagrant: SSH username: vagrant
    falstartexample_vagrant: SSH auth method: private key
==> falstartexample_vagrant: Machine booted and ready!
==> falstartexample_vagrant: Checking for guest additions in VM...
    falstartexample_vagrant: No guest additions were detected on the base box for this VM! Guest
    falstartexample_vagrant: additions are required for forwarded ports, shared folders, host only
    falstartexample_vagrant: networking, and more. If SSH fails on this machine, please install
    falstartexample_vagrant: the guest additions and repackage the box to continue.
    falstartexample_vagrant: This is not an error message; everything may continue to work properly,
    falstartexample_vagrant: in which case you may ignore this message.
==> falstartexample_vagrant: Setting hostname...
==> falstartexample_vagrant: Configuring and enabling network interfaces...
==> falstartexample_vagrant: Exporting NFS shared folders...
==> falstartexample_vagrant: Preparing to edit /etc/exports. Administrator privileges will be required...
[sudo] пароль для maks:
● nfs-server.service - NFS server and services
   Loaded: loaded (/lib/systemd/system/nfs-server.service; enabled; vendor preset: enabled)
   Active: active (exited) since Вс 2016-10-09 14:40:14 MSK; 4min 16s ago
  Process: 1081 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS (code=exited, status=0/SUCCESS)
  Process: 1073 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
 Main PID: 1081 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/nfs-server.service

окт 09 14:40:13 zlm systemd[1]: Starting NFS server and services...
окт 09 14:40:14 zlm systemd[1]: Started NFS server and services.
==> falstartexample_vagrant: Mounting NFS shared folders...
==> falstartexample_vagrant: Running provisioner: fabric...
[] Executing task 'common'
[] put: <file obj> -> /etc/environment
[] sudo: localedef ru_RU.UTF-8 -i ru_RU -fUTF-8
[] sudo: touch /usr/locale_8913242974480500368
[] sudo: apt-get -y update
[] sudo: apt-get -y install libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev git redis-server
[] sudo: touch /usr/apt_packages_-3330926058430280198
[] sudo: apt-get -y install python-dev python-pip python-virtualenv build-essential libncurses5-dev libncursesw5-dev libreadline6-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libxml2-dev libxslt1-dev
[] run: wget -O python.tgz https://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz
[] run: tar -xf python.tgz
[] run: mv Python-3.5.2 python
[] run: ./configure --prefix=/usr/local/python-3.5.2
[] run: make
[] sudo: make altinstall
[] sudo: rm /tmp/* -rf
[] sudo: ln -sf /usr/local/python-3.5.2/bin/* /usr/local/bin/
[] sudo: touch /usr/python_packages_-535002765752534493
[] Executing task 'database'
[] sudo: apt-get -y install postgresql postgresql-server-dev-all python-psycopg2
[] run: sudo -u postgres psql -c "CREATE USER falstartexample_user;"
[] run: sudo -u postgres psql -c "ALTER USER falstartexample_user WITH PASSWORD 'VJJxu87Ki';"
[] run: sudo -u postgres psql -c "ALTER USER falstartexample_user CREATEDB;"
[] run: sudo -u postgres psql -c "CREATE DATABASE falstartexample;"
[] run: sudo -u postgres psql -c "GRANT ALL PRIVILEGES ON DATABASE falstartexample TO falstartexample_user;"
[] sudo: touch /usr/database_-8337542331712744645
[] Executing task 'nginx'
[] sudo: apt-get -y install nginx
[] sudo: touch /usr/nginx_install_1687306290436383039
[] put: <file obj> -> /etc/nginx/sites-available/falstartexample
[] sudo: ln -sf /etc/nginx/sites-available/falstartexample /etc/nginx/sites-enabled/falstartexample
[] sudo: service nginx restart
[] Executing task 'app'
[] run: pyvenv-3.5 /home/vagrant/venv
[] run: /home/vagrant/venv/bin/pip install -U pip wheel
[] run: mkdir -p wheels
[] run: /home/vagrant/venv/bin/pip wheel -w wheels/ -r requirements-remote.txt --pre
[] run: make wheel_install
[] run: /home/vagrant/venv/bin/django-admin startproject falstartexample .
[] run: cd falstartexample && cp settings_local.py.example settings_local.py
[] Executing task 'localserver'
[] run: /home/vagrant/venv/bin/python manage.py migrate --noinput
[] run: /home/vagrant/venv/bin/python manage.py collectstatic --noinput
[] run: echo "from django.contrib.auth import get_user_model
User = get_user_model()
User.objects.create_superuser(**{'username': 'root', 'password': '123123', 'email': 'root@e.co'})
" | /home/vagrant/venv/bin/python manage.py shell
[] run: mkdir var -p
[] run: make start
[] run: make runcelery_multi

Disconnecting from done.

==> falstartexample_vagrant: Machine 'falstartexample_vagrant' has a post `vagrant up` message. This is a message
==> falstartexample_vagrant: from the creator of the Vagrantfile, and not from Vagrant itself:
==> falstartexample_vagrant:
==> falstartexample_vagrant: falstartexample dev server successfuly started.
==> falstartexample_vagrant:     Connect to host with:
==> falstartexample_vagrant:
==> falstartexample_vagrant:     or over ssh with `vagrant ssh`
==> falstartexample_vagrant:
==> falstartexample_vagrant:     Admin user credentials:
==> falstartexample_vagrant:       login: root
==> falstartexample_vagrant:       password: 123123
==> falstartexample_vagrant:
[falstart] > make dir: "provision"
[falstart] > render "provision_fabfile.j2" > "provision/fabric_provisioner.py"
[falstart] > render "gitignore.j2" > ".gitignore"
[falstart] > Update .gitignore
[falstart] > run: "git add . && git commit -m ":rocket: falstart init commit""
[master 0b93d53] :rocket: falstart init commit
 39 files changed, 690 insertions(+), 4 deletions(-)
 create mode 100644 .coveragerc
 create mode 100644 .falstart.json
 create mode 100644 .lintrc
 create mode 100755 Makefile
 create mode 100644 Vagrantfile
 create mode 100644 falstartexample/__init__.py
 create mode 100644 falstartexample/celery.py
 create mode 100644 falstartexample/settings.py
 create mode 100644 falstartexample/settings_local.py.example
 create mode 100644 falstartexample/urls.py
 create mode 100644 falstartexample/wsgi.py
 create mode 100755 manage.py
 create mode 100644 provision/fabric_provisioner.py
 create mode 100644 provision/templates/environment.j2
 create mode 100644 provision/templates/locale.gen.j2
 create mode 100644 provision/templates/nginx-host.j2
 create mode 100644 requirements-remote.txt
 create mode 100644 requirements.txt
 create mode 100644 wheels/Django-1.10.2-py2.py3-none-any.whl
 create mode 100644 wheels/amqp-1.4.9-py2.py3-none-any.whl
 create mode 100644 wheels/anyjson-0.3.3-py3-none-any.whl
 create mode 100644 wheels/billiard-
 create mode 100644 wheels/celery-3.1.23-py2.py3-none-any.whl
 create mode 100644 wheels/contextlib2-0.5.4-py2.py3-none-any.whl
 create mode 100644 wheels/coverage-4.2-cp35-cp35m-linux_x86_64.whl
 create mode 100644 wheels/coverage_badge-0.1.2-py3-none-any.whl
 create mode 100644 wheels/django_rainbowtests-0.5.1-py3-none-any.whl
 create mode 100644 wheels/gunicorn-19.4.5-py2.py3-none-any.whl
 create mode 100644 wheels/kombu-3.0.37-py2.py3-none-any.whl
 create mode 100644 wheels/mccabe-0.4.0-py2.py3-none-any.whl
 create mode 100644 wheels/pep257-0.7.0-py2.py3-none-any.whl
 create mode 100644 wheels/pep8-1.7.0-py2.py3-none-any.whl
 create mode 100644 wheels/psycopg2-2.6.1-cp35-cp35m-linux_x86_64.whl
 create mode 100644 wheels/pyflakes-1.0.0-py2.py3-none-any.whl
 create mode 100644 wheels/pylama-7.0.7-py2.py3-none-any.whl
 create mode 100644 wheels/pytz-2016.7-py2.py3-none-any.whl
 create mode 100644 wheels/raven-5.26.0-py2.py3-none-any.whl
 create mode 100644 wheels/redis-2.10.5-py2.py3-none-any.whl