nikhilrayaprolu / SocialBack

Django Application for social Wall

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SocialBack

Django Application for social Wall

Contributing

While contributing make a new branch in the same repository and push the new branch to the origin. Then make a pull request for the branch made to the master.

Folder Structure

  • The Django app is contained in socialbackmain/socialbackmain
  • The models are structured in SocialBack/apps/api/models according to the given UML.
  • This UML is not strictly followed UML

Running the server

  • Clone the repo: git clone "https://github.com/YoungSphere/SocialBack.git"
  • Create virtual environment using virtualenv and install the requirements: pip install -r requirements.txt
  • Run python manage.py migrate
  • Run python manage.py createsuperuser to create a new admin. Fill in the prompts next for admin creation.
  • Run python manage.py loaddata testdata.json to load dummy data into server
  • Run npm install to install frontend requirements
  • Run npm run start to compile the react application, this creates dist in assets directory which will be used by django templates to display the react components
  • Or you can run npm run watch which autocompiles for each change in the frontend.
  • Run python manage.py runserver to run the server on 127.0.0.1:8000/
  • Go to 127.0.0.1:8000/admin and login to access admin page. You can check out models and related fields here.

Heroku deployment

JWT-Authentication

{
    "username": "",
    "password": ""
}
  • The response will be a JSON object of the form ({"token":"tokenvalue"}) and of the form:-
{
    "non_field_errors": [
        "Unable to log in with provided credentials."
    ]
}

if the given username and password do not exist.

Reference:

About

Django Application for social Wall


Languages

Language:JavaScript 51.0%Language:CSS 34.8%Language:Python 13.2%Language:HTML 1.1%Language:Shell 0.0%