1. Odd Otter Co
  2. Untitled project
  3. django-djaboto

Wiki

Clone wiki

django-djaboto / Home

Welcome

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!

Installing

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.
virtualenv ~/django/python
  • Activate the python environment you just made.
source ~/django/python/bin/activate

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!

Whats next!?

TBD

  • Publish to AWS or Outercloud
  • Create or install a Theme!
  • Add content

Resources

To get an idea of the workflow and design concept targets, look at this Flowy export.

General resource can be found here.

Old stuff

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.

  1. To publish your site to AWS, create a free account at
  2. http://aws.amazon.com and then execute the following commands in your
  3. project directory:
  4. > python manage.py aws create
  5. > python manage.py aws apache
  6. Just answer the questions and it should create a free-tier server instance
  7. and upload your site!
  8. Do NOT forget to add the 'WSGIPythonHome' parameter in your Apache
  9. configuration like so:
  10. WSGIPythonHome /home/ubuntu/django/python

Production Options

  1. At some point you may want to use more pages and data elements than
  2. SQLite can support. When that happens (or if you expect that from
  3. the beginning) just make sure you install something like MySQL and
  4. chage your settings.py accordingly.
  5. First, install MySQL by adding the 'mysql' option th this command's
  6. parameters. Next you may want to tighten security a bit better for
  7. production boxes. You can re-run it again later if you need to
  8. change some of the settings. Use this command to perform these actions:
  9. > sudo mysql_secure_installation
  10. Also, you may need the MySQL library in your virtualenv, so (or make
  11. sure that it is in your project requirements.txt file when you run revirt):
  12. > pip install MySQL-python
  13. And don't forget to create the database and user in MySQL. Example:
  14. > mysql -u root -p
  15. mysql> CREATE DATABASE django_db;
  16. mysql> GRANT ALL ON django_db.* TO 'djangouser'@'localhost' IDENTIFIED BY 'mypassword';
  17. mysql> quit

TODO

  1. Create a TODO list page and link to it
  2. Put this list IN that TODO list page
  3. Clean up the wiki and docs, add the old content in cleanly
  4. Create a tutorial page
  5. Create a resources page

Updated