https://github.com/flacode/my_diary
Using Django Rest Framework to create a diary API.
https://github.com/flacode/my_diary
Last synced: about 1 year ago
JSON representation
Using Django Rest Framework to create a diary API.
- Host: GitHub
- URL: https://github.com/flacode/my_diary
- Owner: flacode
- Created: 2018-08-06T13:39:34.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T02:31:31.000Z (over 3 years ago)
- Last Synced: 2025-01-26T18:46:06.202Z (over 1 year ago)
- Language: Python
- Size: 77.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MyDiary
[](https://codeclimate.com/github/flacode/my_diary/maintainability)
[](https://travis-ci.org/flacode/my_diary)
[](https://coveralls.io/github/flacode/my_diary?branch=develop)
> MyDiary is an online journal where users can pen down their thoughts and feelings.
My Diary is an API developed using the Django Rest Framework.
## Supported features.
pass
## Technologies used.
- Django Rest Framework.
- Postgres database.
## Getting started.
### Prerequisites
1. Install requirements, run
```sh
pip install -r requirements.txt
```
2. Database configuration.
- Download and install postgres from [here](https://www.postgresql.org/download/)
- Create database in terminal
```sh
$ psql postgres;
$ CREATE DATABASE database_name;
```
3. Set the required environment variables.
- Add a configuration file called `config.txt` where you will set the enviromnent variables.
```export SECRET_KEY='secret key'
export DATABASE_URL='postgres://USER:PASSWORD@HOST:PORT/NAME'
export EMAIL_HOST='email host'
export EMAIL_PORT=465
export EMAIL_HOST_USER='email host user'
export EMAIL_HOST_PASSWORD='email host '
export EMAIL_USE_TLS=True
```
- Set these environment variables using the following command.
```sh
$ source ./config.txt
```
3. Switch to the project's root directory and run migrations to create database tables.
```sh
$ python manage.py makemigrations
$ python manage.py migrate
```
4. Then run the application.
```sh
$ python manage.py runserver
```
## Tests
pass