This is a blog built with the Django Framework, Django Rest Framework, vanilla css, and vanilla javascript.
THE IMPLEMENTED FEATURES INCLUDE:
For the accounts app
- A logged in user is unable to access the log in page.
- Ability to log in and log out.
- Ability to sign in if the user does not have an account.
For the articles app
-
The number of articles on the index page is limited to five at a time. When the number of articles exceeds 5, a pagination pops up.
-
Ability for logged in users to like and unlike posts and comments asynchronously (No page refresh) using FETCH API.
-
Maximum number of displayed comments after loading the detail page is 10. If number of available comments exceed 10, a "Load more comments" button pops up which when clicked, displays the next batch of 10 comments, asynchronously.
-
Ability to create (using a rich text editor), delete, and edit posts by the admin user who made the post (only admins can create posts).
-
Ability to like comments by logged in users asynchronously. Also ability by the user who made a comment to edit or delete it.
Unimplemented features are:
-
Sending links to users to make them confirm their email used for registration and to reset forgotten password. This could not be implemented because I couldn't find a free email service to use. Gmail wouldn't let me.
-
Asyncronous submission of comments only works when the number of existing comments exceeds 10, otherwise there is a redirection to a white json page before submitted comment is displayed.
-
Inability to implement a threaded comment system. Went with single parent comments instead, which is not ideal for fostering conversations in a blog.
For the markdown you need to install cdeditor. You can do this by going to your project root directory and then in the terminal -
pip install django-ckeditor
in the settings.py, add
'article',
'account',
'rest_framework'
'ckeditor'
to installed apps.
Also, add in your settings.py
STATIC_URL = 'static/'
STATICFILES_DIRS = (os.path.join(BASE_DIR, 'assets'),)
MEDIA_ROOT = os.path.join(BASE_DIR, 'static/images')
MEDIA_URL = '/images/'








