Skip to content

Latest commit

 

History

History
79 lines (49 loc) · 2.01 KB

File metadata and controls

79 lines (49 loc) · 2.01 KB

Core Django Setup Checklist

🗂️ Project & App Structure

  • Project created via django-admin startproject
  • App created via python manage.py startapp core
  • App (core) is added to INSTALLED_APPS in settings.py

Authentication Functionality

🔐 Login

  • login_view created and working
  • Accepts both email and username
  • Displays validation errors with messages
  • login.html template created
  • Login form field names match view logic (username, password)

🔐 Register

  • register view and register.html created
  • You haven't yet implemented user creation (form + logic)

🧾 Logout (Recommended)

  • Add logout_view to end session and redirect
from django.contrib.auth import logout

def logout_view(request):
    logout(request)
    return redirect('landing')

🔗 URLs

  • urls.py includes paths to login, register, and landing
  • base.html or nav links use {% url %} to prevent hardcoding

Templates and Static Files

  • Templates stored in templates/
  • Static files (e.g. CSS) stored in static/, with STATICFILES_DIRS configured in settings.py
  • {% load static %} used at top of templates
  • Forms and messages are styled or at least visible to user

Settings.py Reminders

  • TEMPLATES['DIRS'] includes your templates/ directory
  • STATICFILES_DIRS includes your static/ directory
  • LOGIN_URL and LOGIN_REDIRECT_URL optionally set

🧪 Testing

  • Test login with correct and incorrect credentials
  • Test registration flow (once implemented)
  • Test static file loading and responsiveness

🚀 What You Should Do Next:

  1. 🔧 Implement registration logic to create users
  2. 🔐 Add logout view and link
  3. 📱 Make the site responsive with mobile styles (optional but great UX)
  4. 📂 Create a dashboard or profile page for logged-in users (optional)