# =============================================================
# INSTRUKCIJA — Backend izmaiņas invoices app pievienošanai
# =============================================================


## 1. core/settings.py — pievieno 'invoices' INSTALLED_APPS

INSTALLED_APPS = [
    ...
    'mim_auth',
    'projects',
    'invoices',     # ← PIEVIENO
    'telegram_bot', # (ja jau pievienots)
]


## 2. core/urls.py — pievieno invoices URL

from django.urls import path, include

urlpatterns = [
    path('admin/', admin.site.urls),
    path('api/auth/',     include('mim_auth.urls')),
    path('api/projects/', include('projects.urls')),
    path('api/invoices/', include('invoices.urls')),  # ← PIEVIENO
    path('webhook/',      include('telegram_bot.urls')),
]


## 3. Migrācijas — palaid cPanel "Execute python script"

# Fails: manage.py
# Arguments: makemigrations invoices

# Tad:
# Fails: manage.py
# Arguments: migrate

# VAI lokāli:
# python manage.py makemigrations invoices
# python manage.py migrate
