Welcome to Django-Boto! Also known as Djaboto, this tool allows for fast prtotyping (as if Django was not quick enough already!?) - and easy usage, particualrly for beginners. This project started out as simple automation of our daily process when building Django sites, and may still have a vew rough edges as we clean it up and make it more generally usable by others. We are open to suggestions and comments for improvment - welcome to them in fact, so please add your two cents!
Installation is fairly simple and typical for python projects. We will attempt to write all docs for the very "new" beginners as well as the seasoned vets out there.
Ok. Lets get started! Perform the following commands in order:
- Create a virtual environment for your projects to use. It is safer, easier (once you get used to the differences from using your system python) and ultimately more portable as well.
- Activate the python environment you just made.
This should make your prompt change to have a preface of "(python)" to indicate you are using the new environment.
- Install Djaboto, like so:
pip install git+https://bitbucket.org/oddotterco/django-boto.git#egg=django-boto
This part may take a few moments as it downloads a few required components.
- Create your first project and install a few extras that your system may need. The first time that you run "soupstart" you will want to use the "-s" or "--checksystem" option. Including this in your command will tell it to add system level components as well, such as Python imaging Library's JPEG requiremets, MySQL server and etc. You do not (and probably wont want to) use this flag after the first time.
soupstart -s mysite
Once this command finishes (and you may want to go get some cocoa while you wait), you should have a site completely ready to run sitting in your django directory. Change directory to it and execute this command:
cd ~/django/mysite ./manage.py runserver 0.0.0.0:8000
..now browse to your local system at port 8000!
- Publish to AWS or Outercloud
- Create or install a Theme!
- Add content
To get an idea of the workflow and design concept targets, look at this Flowy export.
General resource can be found here.
IGNORE everything from here down, for the most part. Everything below here is old documentation but worth keeping around until the dust settles and we have time to re-integrate it all. Most of this will be migrated into soupup.py initially.
- To publish your site to AWS, create a free account at
- http://aws.amazon.com and then execute the following commands in your
- project directory:
- > python manage.py aws create
- > python manage.py aws apache
- Just answer the questions and it should create a free-tier server instance
- and upload your site!
- Do NOT forget to add the 'WSGIPythonHome' parameter in your Apache
- configuration like so:
- WSGIPythonHome /home/ubuntu/django/python
- At some point you may want to use more pages and data elements than
- SQLite can support. When that happens (or if you expect that from
- the beginning) just make sure you install something like MySQL and
- chage your settings.py accordingly.
- First, install MySQL by adding the 'mysql' option th this command's
- parameters. Next you may want to tighten security a bit better for
- production boxes. You can re-run it again later if you need to
- change some of the settings. Use this command to perform these actions:
- > sudo mysql_secure_installation
- Also, you may need the MySQL library in your virtualenv, so (or make
- sure that it is in your project requirements.txt file when you run revirt):
- > pip install MySQL-python
- And don't forget to create the database and user in MySQL. Example:
- > mysql -u root -p
- mysql> CREATE DATABASE django_db;
- mysql> GRANT ALL ON django_db.* TO 'djangouser'@'localhost' IDENTIFIED BY 'mypassword';
- mysql> quit
- Create a TODO list page and link to it
- Put this list IN that TODO list page
- Clean up the wiki and docs, add the old content in cleanly
- Create a tutorial page
- Create a resources page