Skip to content

asimxcode/CPI-STUDENT-ID

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chottogram Polytechnic Institute - Student ID Card System

Django web app for student ID application, approval, verification, and PDF card download.

Features

  • Public ID application form
  • Admin review workflow (Pending/Approved/Rejected)
  • QR code generation for verification URLs
  • Public verification endpoint
  • PDF ID card generation

Tech Stack

  • Python
  • Django
  • Pillow
  • qrcode
  • reportlab

Project Structure

  • cpi_id/ Django project settings and root URLs
  • idcards/ Main app (models, views, forms, admin)
  • templates/ Shared templates
  • idcards/templates/idcards/ App templates
  • static/ Source static assets
  • media/ Runtime uploads (ignored in git)

Local Setup (Windows PowerShell)

  1. Create venv:
python -m venv .venv
  1. Install dependencies:
.\.venv\Scripts\python -m pip install --upgrade pip
.\.venv\Scripts\python -m pip install -r requirements.txt
  1. Run migrations:
.\.venv\Scripts\python manage.py migrate
  1. Create admin user:
.\.venv\Scripts\python manage.py createsuperuser
  1. Start server:
.\.venv\Scripts\python manage.py runserver

Environment Configuration

Copy .env.example values into your deployment environment.

Important variables:

  • DJANGO_SECRET_KEY
  • DJANGO_DEBUG
  • DJANGO_ALLOWED_HOSTS
  • DJANGO_CSRF_TRUSTED_ORIGINS
  • DJANGO_SECURE_SSL_REDIRECT
  • DJANGO_CSRF_COOKIE_SECURE
  • DJANGO_SESSION_COOKIE_SECURE

Production Notes

  • Set DJANGO_DEBUG=False.
  • Set a strong DJANGO_SECRET_KEY.
  • Set correct DJANGO_ALLOWED_HOSTS and DJANGO_CSRF_TRUSTED_ORIGINS.
  • Run collectstatic before deployment:
.\.venv\Scripts\python manage.py collectstatic --noinput

GitHub Publish Checklist

  1. Confirm .gitignore is present (venv, db, media, env files are ignored).
  2. Do not commit .env or production secrets.
  3. Initialize git (if needed), then commit:
git init
git add .
git commit -m "Initial commit"
  1. Add GitHub remote and push:
git remote add origin <your-repo-url>
git branch -M main
git push -u origin main

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published