Skip to content

PyladiesSthlm/PyLadiesBYOBlog

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyLadiesBYOBlog

Build Your Own Django Blog

PyLadiesSF workshop hosted on May 12th, 2012
PyLadiesCZ workshop hosted on November 16th, 2012
PyLadiesHR workshop hosted on December 15/16th, 2012

Info about PyLadiesSF
Info about PyLadiesCZ
Info about PyLadies

This Django-based site is the very barest of bones for a blogging site. It uses Django's function-defined views as opposed to Django's Class-Based-Views.

For folks wanting to contribute: Anyone is welcome to contribute! Please be excessively clear in whatever code you're adding with hyper-aware documentation.

For ladies wanting to use this to build your own blog, here is a quick, barebones overview of what you will need:

  1. Download Git (this is not a GitHub account) found here

    Optional: it's nice to get in the hang of using proper tools for managing web applications and projects. Suffice it to say, it's highly recommended to use virtualenv, a tool that manages projects with their respective packages.

    On a Mac: $ sudo easy_install pip
    On Ubuntu: $ sudo apt-get pip
    On Fedora: $ sudo yum install pip
    On Windows: TODO

    For Everyone:

    $ pip install virtualenv
    $ pip install virtualenvwrapper
    $ export WORKON_HOME=~/Envs
    $ mkdir -p $WORKON_HOME
    $ source /usr/local/bin/virtualenvwrapper.sh
    $ mkvirtualenv {{ prj_name }}
    (prj_name)$ pip install django

    Skip step 2.

  2. Download and Install Django

  3. OPTIONAL If you want comments on your blog, I'd suggest using Disqus. A free account is required. We could build our own comment system pretty easily within the blog, but we would not have spam filters setup properly. To set up comments, follow the template portion of the slides (refer to notes of the second template slide, where you copy HTML files).

NOTE If you want to work through the workshop again yourself (which I highly suggest), please take a look at the slides to walk you through, and skip these next steps until #6: Deployment.

You can poke around at my code as you go along in this repository.

NOTE the following steps use my code, which is already a complete blog application.

**A complete blog: **

  1. Now, fork this repo: $ git clone [email protected]:econchick/PyLadiesBYOBlog.git

  2. Edit the settings.py file to your own project. You will need to make a random string of letters, numbers, and characters for SECRET_KEY. Do not share your settings publically.

  3. In PyLadiesBYOBlog directory from the command line, type: python manage.py runserver

  4. Navigate to localhost:8000/admin and throw up a few blog posts.

  5. Navigate to localhost:8000 to see your posts.

  6. Deployment: OPTIONAL If you want folks to see your blog, then I'd suggest deploying on Heroku or OpenShift (be wary, I had a difficult time deploying on OpenShift). You will need an account with either, but due to the small size of your application, it will be free to put up online.

    Heroku has a great how-to Deploy Django using their services.

ADDITIONAL RESOURCES

  1. The main Django Tutorial
  2. Learn Python the Hard Way: A great way to practice Python for brand new folks.
  3. Boston Python Workshop Tutorial This site goes into more detail regarding Python data structures.
  4. CodingBat Practice small Python exercises.
  5. More Simple Django Project Tutorials Where this blog application got its inspiration!

=======

TODO

  1. Get OpenShift to work.

  2. Adding Disqus comments (account required).

  3. Adding the ability to format text when blogging using a WYSIWYG editor (WYSIWYG = 'what you see is what you get').

  4. Ability to upload media (e.g. images) - may be just adding another application to the Project Site.

About

Build Your Own Django Blog

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published