- First steps
- Installers
- Plugins
Django manage
August 16, 2017
Prerequisite
- You must have a gorilla.com user.
- You must have got installed Docker, GorillaJS and Django manage plugin.
Installation
$ gorilla plugin add django_manage
To uninstall:
$ gorilla plugin remove django_manage
How to use it
The plugin has an objective: make easier the django-admin and manage the pip.3 packages you use in your project. To use it you will have to be a part of the project.
Manage.py
With the “manage” command you can use any django-admin command without needing to access to the Docker’s container, for example:
Create a superuser:
$ gorilla manage createsuperuser
Make a database copy and save it on the local folder:
$ gorilla manage dumpdata > db.json
Init a database session shell:
$ gorilla manage dbshell
Start the python3 interpreter:
$ gorilla manage shell
Pip3
With the pip command you can manage the pip3 packages using any command you see in the documents, for example:
Install a package:
$ gorilla pip install [package name]
Uninstall a package:
$ gorilla pip uninstall [package name]
Have a list of all the installed packages:
$ gorilla pip list
Save the installed packages on the requirements.txt file:
$ gorilla pip freeze > src/requirements.txt
GorillaJS will be responsible for saving the changes you have done on the container in order that they will be available for the next time your project will be started.
The NodeJS installer
The NodeJS template that comes as a default in GorillaJS uses the Express.js framework to start a server and return a response. This is optional, and once the application is running we can eliminate this server and use the application in any other way.
FAQ’s
Why do you need to free the port 80? Can you make your own installers? Can you use GorillaJS in a remote server?