Skip to content

Twitter clone api implementation using Django Rest Framework

License

Notifications You must be signed in to change notification settings

davidpodrebarac/twitter

Repository files navigation

twitter

Twitter clone api implementation

Built with Cookiecutter Django
License:MIT

Basic Commands

Setting Up Your Users

Only superusers can be created for this app, it doesn't offer any registration endpoints.

  • To create an superuser account, use this command:

    $ python manage.py createsuperuser
    

How to run application?

  1. create database using docker

docker run -d -p 5432:5432 -e POSTGRES_PASSWORD=<pw> --name=<name> postgres:<version>

  1. connect to database with some tool(I used pgcli) with your password(you can change that)

pgcli -h 127.0.0.1 -U postgres

  1. create database twitter

create database twitter

  1. position yourself in root directory and migrate migrations to database

python manage.py migrate

  1. (optional) create your own data or load fixtures with this command

python manage.py loaddata */fixtures/*

  1. run server on port 5100 (this will serve admin interface on http://localhost:5100/admin/ and api on http://127.0.0.1:5100/api/)

python manage.py runserver 5100

Api authentification

The easiest way to authenticate is with JWT(Json web token) on http://127.0.0.1:5100/api-auth/login/

About

Twitter clone api implementation using Django Rest Framework

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages