Yet Another Django Blog
- Uses Postgresql for the db. DatabaseName is django_blog_db
- You should run these commands before firing up the blog:
python manage.py collectstatic
python manage.py syncdb
- Then you can start the server by giving runserver command:
python manage.py runserver
The static files (main.css, images) and templates are taken from PyLadiesBYOBlog
- Coding should obey PEP8 rules restrictly.
- All html forms must be validated using django form. See Django form and field validation for details.
GenericForeignKey's must be used. See Content Types Framework for details.- Caching should be encouraged. Redis must be used for cache backend. See redis-py for details.
- Users can use up-to-a-certain-size images in their blog posts. These images must be resized using PIL, by using celery tasks in the backend part. For image upload, see File Uploads ; HINT: a)celery decorator @task, check celery docs b)StackOverflow Q1
Every user must have a profile. Use UserProfile of Django1.3, See User authentication in Django for details.- Users:
can register by their e-mail address. That e-mail address should be verified via sending an authentication mail.can login via e-mailcan create/edit a Blog Post (Needs login)can see Blog Postscan comment on Blog Posts (Needs login)can comment on Comments (Needs login)can change their Profile infos (Needs login)can update their passwords (Needs login)can update their e-mails (Needs login)can disable their accounts (Needs login)
Skip the anonymous users for now.
- Use redirect shortcuts
- Use reverse
- Combine confirm and confirm_verification views. After confirmation, log in the user.
- Make all strings translatable
- Drop messages in login_page view, use field validation.