Skip to content

itsSauraj/dev_stack

Repository files navigation

DEV_STACK

Description

A django based applicaiton for making a developer's profile with feature like showcasing skills, tech Stack and Peojects.

Technologies Used

  • Django
  • Python 3.12.x
  • HTML/CSS/JS
  • JavaScript (optional)
  • Database name - can be used any on your preference (PostgreSQL, MySQL, SQLite)
  • Tailwincss

Installation

Prerequisites

Before you begin, ensure you have the following installed:

  • Python 3.12
  • Django 3.x+
  • pip (Python package manager)
  • [Optional] Virtual environment tool (virtualenv or venv)

Steps

  1. Clone the repository:

    git clone https://github.com/CodeWithSaurabhYadav/dev_stack
  2. Navigate to the project directory:

    cd dev_stack
  3. Create and activate a virtual environment (recommended):

     # For virtualenv
     virtualenv venv
     source venv/bin/activate  # On Windows use `venv\Scripts\activate`
    
     # For venv (Python 3 built-in)
     python3 -m venv venv
     source venv/bin/activate  # On Windows use `venv\Scripts\activate`  
  4. Install project dependencies:

     pip install -r requirements.txt
  5. Set up the database:

  • If you are using the default SQLite database, Django will create it automatically. Otherwise, configure your database settings in the settings.py file, and then run:
     python manage.py migrate
  1. Create a superuser (admin account):

     python manage.py createsuperuser
  2. Run the development server:

    • gunicorn is used because of this application being a ASGI application and not WSGI
    • Note: python manage.py runserver does not run the application in ASGI
     gunicorn dev_stack.asgi:application -k uvicorn.workers.UvicornWorker --bind 0.0.0.0:8000

    Open your browser and navigate to http://127.0.0.1:8000/ to access the project.

Configuration

Database

To change the database settings, open the settings.py file and modify the DATABASES setting. Example for PostgreSQL:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': 'your_db_name',
        'USER': 'your_db_user',
        'PASSWORD': 'your_password',
        'HOST': 'localhost',
        'PORT': '5432',
    }
}

or

For using SQLite
# To use this you will need to create a file named 'db.sqlite3'

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': BASE_DIR / 'db.sqlite3',
    }
}

Stactic files

Django collects static files using the collectstatic command. Ensure that STATIC_URL and STATIC_ROOT are properly configured in settings.py. Run:

python manage.py collectstatic

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published