this is a django project; this project is consist of some major parts. API
app, which is the api that is developed
using django-rest-framework
and all javascript parts are using these APIs to read posts from database and list them.
After that there is the users
app; this app is for the customization of the django's user model and authentication.
Then we have the other app called posts
; which is the main app for the blogs (posts, comments, categories). this is
where views.py
and urls.py
are. it's responsible for controlling endpoints and rendering the appropriate HTML to
represent to the client. I also made the search by category and author using javascript.
first you need to create a virtual environment, cd to the directory where this file is and then run the following command:
Create and Activate a Virtual Environment:
- Linux/mac:
$ pip install virtualenv
$ virtualenv [YourVenvName]
$ source [YourVenvName]/bin/activate
- Windows:
pip install virtualenv
python -m venv [YourVenvName]
[YourVenvName]/Scripts/activate
install the required libraries and run the code:
$ pip install -r requirements.txt
$ python manage.py makemigrations
$ python manage.py migrate
$ python manage.py runserver
I'm more than happy to hear your feedbacks and collaborate with you guys!
if you had any problem contributing on the project, feel free to contact me:
- Amirhoseein Khalili