- Latex support.
- Markdown support.
- Multiple file upload via zip folder. Contents get stored in
PROJECT_DIR/media/<post_title>/
- Customized search engine powered by elasticsearch.
- Automatic title image resizing.
- Disqus support.
- Draft option for posts which are not completed.
- Fuzzy search powered by elasticsearch.
- Separate SECRET_KEY for each user.
- Settings for
https
, applicable only if your website useshttps
.
- Auto-completion using jQuery autocomplete and elasticsearch completion suggester.
- Personal commenting engine.
-
Postgresql should be installed.
-
Go to project directory. Run pip install -r requirements.txt to install python requirememtns.
-
User running this project must have rights to read from a file and write to a file within the project directory.
Run the following commands in psql console:-
CREATE DATABASE django_blog;
CREATE USER django_blog WITH PASSWORD '\<set some password here\>';
GRANT ALL PRIVILEGES ON DATABASE django_blog TO django_blog;
You have to set four environment variables.
DB_NAME='django_blog'
DB_USER='django_blog'
DB_PASSWORD='<Whatever password you had entered above>'
ELASTICSEARCH_ENABLED = True
BLOG_SECRET_KEY = <Generate a secret key for your server>
Go to https://www.elastic.co/downloads/elasticsearch
Download elasticsearch and follow instructions given on that page to run it.
Sometimes, your system may lag when you run elasticsearch. This is because default memory allocated to elasticsearch is 2GB. So, if you are facing this problem, open config/jvm.options and set -Xms and -Xmx values to 512m. If still it lags, lower down the values to 256m. Make sure that Xms and Xmx values are same.
If you want to turn off the search feature due to some reason, then set ELASTICSEARCH_ENABLED=False
If you are facing some problem, then open an issue and post traceback there.
There should be no error in above steps.
1. Go to project directory (where manage.py is located)
2. In terminal, type python manage.py makemigrations
3. If some error is shown in step 2, delete all files except __init__.py in migrations folder of every app.
4. If still error persists, open an issue and post traceback.
5. Now run python manage.py migrate
6. If some error occurs in above step, open an issue and post traceback.
7. Finally, run python manage.py runserver
8. Visit 127.0.0.1/8000 and enjoy......
If you want to know about optional arguments, refer to django documentation.
There are some extra things which needs to be done in order to manage the blog.
1. Create a super user by running python manage.py createsuperuser.
2. Go to localhost:8000/admin.
3. Supply required credentials.
4. Now you can manage the contents of blog.
Note: If you try to access aboutme/ page without filling any entry in About Me section in localhost:8000/admin/, it will show an error. So, make sure that before accessing that page, you fill something about yourself in /admin/ form.
- Follow software engineering principles to enhance the code.
- Enhance the front end.
- Documentation of existing code.
Following points should be kept in mind while submitting a PR.
- Coding guidelines for languages must be followed.
- Code must be documented properly, and format of docstrings must be in standard format for that language.
- PR title must be descriptive. It is advised to create an issue before submitting a PR and then refer that issue while making the PR.
Click here for demo.