Giter Site home page Giter Site logo

srinivaskstpl / backend-assignment Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 31 KB

This is a basic Django project that serves a app in which can have user and post, where logged in user can check, create and update the post.

Python 98.70% Dockerfile 1.30%

backend-assignment's Introduction

Backend Assignment Django Project

This is a basic Django project that serves a app in which you can have user and post.

Getting Started

These instructions will help you set up and run the project on your local machine for development purposes.

  1. Clone this repository to your local machine:
git clone https://github.com/srinivaskstpl/backend-assignment.git
cd backend-assignment

Prerequisites

Before you begin, make sure you have the following software installed on your system:

Installing Dependencies

  1. Create a virtual environment to isolate project dependencies:
python -m venv /path/to/new/virtual/environment
  1. Activate the virtual environment:

    • On Windows:
    venv\Scripts\activate
    
    • On macOS and Linux:
    source venv/bin/activate
    
  2. Install project dependencies using pip:

    pip install -r requirements.txt
    

Running the Development Server

Before running data base migration make sure you have created backendassignment project in your postgres db.

  1. Apply initial database migrations:
python manage.py migrate
  1. You can create a superuser by below command:
python manage.py createsuperuser
  1. Start the development server:
python manage.py runserver

The development server should now be running at http://localhost:8000/.

  1. Access the Django admin panel at http://localhost:8000/admin/ and log in with the admin credentials.

Run using docker

To run the project using docker follow the following steps.

  1. Build the Docker image using the following command:
docker build -t django-app .
  1. Run the container using the following command:
docker run -p 8000 --net="host" django-app

postman collection

Postman collection JSON is added in repository you can import the file in postman

backend-assignment's People

Contributors

srinivaskstpl avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.