ibrahimadlani / twitch-recap

Web application made to get the bests of your twitch videos. (chats, audience activity, custom videos)
0 stars 0 forks source link

Initialize Django Project #2

Closed ibrahimadlani closed 1 month ago

ibrahimadlani commented 1 month ago

Description

This task involves initializing a Django project named core such that its main app is also named core, while allowing for the root directory of the Django project to be renamed to back. Additionally, this task includes setting up a .gitignore file for the Django project, and creating requirements.txt and requirements-dev.txt files for dependencies.

Steps

  1. Initialize Django Project:

    • Create a new Django project named core:
      django-admin startproject core
    • Rename the root directory of the Django project to back:
      mv core back
  2. Create api App:

    • Navigate into the back directory and create a new Django app named api:
      cd back
      python manage.py startapp api
  3. Set Up .gitignore:

    • Create a .gitignore file in the root of the repository with the following content (or more):
      *.pyc
      __pycache__/
      *.sqlite3
      .DS_Store
      /back/core/settings.py
      /back/core/__pycache__/
      /back/core/db.sqlite3
      .env
  4. Create Requirements Files:

    • Create a requirements.txt file in the root of the repository and add the basic Django dependency:

      asgiref==3.8.1
      Django>=5.0.3,<5.1
      django-dotenv
      django-storages==1.11.1
      django-cors-headers==4.3.1
      djangorestframework==3.15.1
      djangorestframework-simplejwt
      psycopg2-binary
      sqlparse==0.4.4
      boto3
      requests
      gunicorn
      
    • Create a requirements-dev.txt file in the root of the repository for development dependencies:

      -r requirements.txt
      astroid==3.1.0
      click==8.1.7
      dill==0.3.8
      iniconfig==2.0.0
      mccabe==0.7.0
      mypy-extensions==1.0.0
      packaging==24.0
      pathspec==0.12.1
      platformdirs==4.2.0
      pluggy==1.4.0
      pytest==8.1.1
      pytest-django==4.8.0
      tomlkit==0.12.4
      typing_extensions==4.10.0
      isort==5.13.2
      gunicorn
      coverage
      pytest-cov
      black==24.3.0
      pylint==3.1.0
      pylint_django
      

Resources

Priority