Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4713dc6305 |
0
accounting/__init__.py
Normal file
0
accounting/__init__.py
Normal file
BIN
accounting/__pycache__/__init__.cpython-311.pyc
Normal file
BIN
accounting/__pycache__/__init__.cpython-311.pyc
Normal file
Binary file not shown.
BIN
accounting/__pycache__/admin.cpython-311.pyc
Normal file
BIN
accounting/__pycache__/admin.cpython-311.pyc
Normal file
Binary file not shown.
BIN
accounting/__pycache__/apps.cpython-311.pyc
Normal file
BIN
accounting/__pycache__/apps.cpython-311.pyc
Normal file
Binary file not shown.
BIN
accounting/__pycache__/models.cpython-311.pyc
Normal file
BIN
accounting/__pycache__/models.cpython-311.pyc
Normal file
Binary file not shown.
BIN
accounting/__pycache__/urls.cpython-311.pyc
Normal file
BIN
accounting/__pycache__/urls.cpython-311.pyc
Normal file
Binary file not shown.
BIN
accounting/__pycache__/views.cpython-311.pyc
Normal file
BIN
accounting/__pycache__/views.cpython-311.pyc
Normal file
Binary file not shown.
22
accounting/admin.py
Normal file
22
accounting/admin.py
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
from django.contrib import admin
|
||||||
|
from .models import Account, JournalEntry, Ledger, Invoice, InvoiceItem, Bill, BillItem
|
||||||
|
|
||||||
|
class InvoiceItemInline(admin.TabularInline):
|
||||||
|
model = InvoiceItem
|
||||||
|
extra = 1
|
||||||
|
|
||||||
|
class InvoiceAdmin(admin.ModelAdmin):
|
||||||
|
inlines = [InvoiceItemInline]
|
||||||
|
|
||||||
|
class BillItemInline(admin.TabularInline):
|
||||||
|
model = BillItem
|
||||||
|
extra = 1
|
||||||
|
|
||||||
|
class BillAdmin(admin.ModelAdmin):
|
||||||
|
inlines = [BillItemInline]
|
||||||
|
|
||||||
|
admin.site.register(Account)
|
||||||
|
admin.site.register(JournalEntry)
|
||||||
|
admin.site.register(Ledger)
|
||||||
|
admin.site.register(Invoice, InvoiceAdmin)
|
||||||
|
admin.site.register(Bill, BillAdmin)
|
||||||
6
accounting/apps.py
Normal file
6
accounting/apps.py
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
from django.apps import AppConfig
|
||||||
|
|
||||||
|
|
||||||
|
class AccountingConfig(AppConfig):
|
||||||
|
default_auto_field = 'django.db.models.BigAutoField'
|
||||||
|
name = 'accounting'
|
||||||
24
accounting/migrations/0001_initial.py
Normal file
24
accounting/migrations/0001_initial.py
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# Generated by Django 5.2.7 on 2025-12-16 14:13
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
initial = True
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Account',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('name', models.CharField(max_length=100)),
|
||||||
|
('number', models.CharField(max_length=20, unique=True)),
|
||||||
|
('type', models.CharField(choices=[('ASSET', 'Asset'), ('LIABILITY', 'Liability'), ('EQUITY', 'Equity'), ('REVENUE', 'Revenue'), ('EXPENSE', 'Expense')], max_length=10)),
|
||||||
|
('balance', models.DecimalField(decimal_places=2, default=0.0, max_digits=15)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
]
|
||||||
32
accounting/migrations/0002_journalentry_ledger.py
Normal file
32
accounting/migrations/0002_journalentry_ledger.py
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
# Generated by Django 5.2.7 on 2025-12-16 14:14
|
||||||
|
|
||||||
|
import django.db.models.deletion
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('accounting', '0001_initial'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='JournalEntry',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('date', models.DateField()),
|
||||||
|
('description', models.CharField(max_length=255)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Ledger',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('debit', models.DecimalField(decimal_places=2, default=0.0, max_digits=15)),
|
||||||
|
('credit', models.DecimalField(decimal_places=2, default=0.0, max_digits=15)),
|
||||||
|
('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='accounting.account')),
|
||||||
|
('journal_entry', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='accounting.journalentry')),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
]
|
||||||
36
accounting/migrations/0003_invoice_invoiceitem.py
Normal file
36
accounting/migrations/0003_invoice_invoiceitem.py
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
# Generated by Django 5.2.7 on 2025-12-16 14:16
|
||||||
|
|
||||||
|
import django.db.models.deletion
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('accounting', '0002_journalentry_ledger'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Invoice',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('customer_name', models.CharField(max_length=255)),
|
||||||
|
('invoice_date', models.DateField()),
|
||||||
|
('due_date', models.DateField()),
|
||||||
|
('total_amount', models.DecimalField(decimal_places=2, default=0.0, max_digits=15)),
|
||||||
|
('paid', models.BooleanField(default=False)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='InvoiceItem',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('description', models.CharField(max_length=255)),
|
||||||
|
('quantity', models.PositiveIntegerField(default=1)),
|
||||||
|
('unit_price', models.DecimalField(decimal_places=2, max_digits=15)),
|
||||||
|
('total', models.DecimalField(decimal_places=2, max_digits=15)),
|
||||||
|
('invoice', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='items', to='accounting.invoice')),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
]
|
||||||
36
accounting/migrations/0004_bill_billitem.py
Normal file
36
accounting/migrations/0004_bill_billitem.py
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
# Generated by Django 5.2.7 on 2025-12-16 14:18
|
||||||
|
|
||||||
|
import django.db.models.deletion
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('accounting', '0003_invoice_invoiceitem'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Bill',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('vendor_name', models.CharField(max_length=255)),
|
||||||
|
('bill_date', models.DateField()),
|
||||||
|
('due_date', models.DateField()),
|
||||||
|
('total_amount', models.DecimalField(decimal_places=2, default=0.0, max_digits=15)),
|
||||||
|
('paid', models.BooleanField(default=False)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='BillItem',
|
||||||
|
fields=[
|
||||||
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('description', models.CharField(max_length=255)),
|
||||||
|
('quantity', models.PositiveIntegerField(default=1)),
|
||||||
|
('unit_price', models.DecimalField(decimal_places=2, max_digits=15)),
|
||||||
|
('total', models.DecimalField(decimal_places=2, max_digits=15)),
|
||||||
|
('bill', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='items', to='accounting.bill')),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
]
|
||||||
0
accounting/migrations/__init__.py
Normal file
0
accounting/migrations/__init__.py
Normal file
BIN
accounting/migrations/__pycache__/0001_initial.cpython-311.pyc
Normal file
BIN
accounting/migrations/__pycache__/0001_initial.cpython-311.pyc
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
accounting/migrations/__pycache__/__init__.cpython-311.pyc
Normal file
BIN
accounting/migrations/__pycache__/__init__.cpython-311.pyc
Normal file
Binary file not shown.
74
accounting/models.py
Normal file
74
accounting/models.py
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
from django.db import models
|
||||||
|
|
||||||
|
class Account(models.Model):
|
||||||
|
ACCOUNT_TYPE_CHOICES = (
|
||||||
|
('ASSET', 'Asset'),
|
||||||
|
('LIABILITY', 'Liability'),
|
||||||
|
('EQUITY', 'Equity'),
|
||||||
|
('REVENUE', 'Revenue'),
|
||||||
|
('EXPENSE', 'Expense'),
|
||||||
|
)
|
||||||
|
|
||||||
|
name = models.CharField(max_length=100)
|
||||||
|
number = models.CharField(max_length=20, unique=True)
|
||||||
|
type = models.CharField(max_length=10, choices=ACCOUNT_TYPE_CHOICES)
|
||||||
|
balance = models.DecimalField(max_digits=15, decimal_places=2, default=0.00)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return f'{self.number} - {self.name}'
|
||||||
|
|
||||||
|
class JournalEntry(models.Model):
|
||||||
|
date = models.DateField()
|
||||||
|
description = models.CharField(max_length=255)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return f'{self.date} - {self.description}'
|
||||||
|
|
||||||
|
class Ledger(models.Model):
|
||||||
|
journal_entry = models.ForeignKey(JournalEntry, on_delete=models.CASCADE)
|
||||||
|
account = models.ForeignKey(Account, on_delete=models.CASCADE)
|
||||||
|
debit = models.DecimalField(max_digits=15, decimal_places=2, default=0.00)
|
||||||
|
credit = models.DecimalField(max_digits=15, decimal_places=2, default=0.00)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return f'{self.journal_entry} - {self.account}'
|
||||||
|
|
||||||
|
class Invoice(models.Model):
|
||||||
|
customer_name = models.CharField(max_length=255)
|
||||||
|
invoice_date = models.DateField()
|
||||||
|
due_date = models.DateField()
|
||||||
|
total_amount = models.DecimalField(max_digits=15, decimal_places=2, default=0.00)
|
||||||
|
paid = models.BooleanField(default=False)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return f'Invoice #{self.id} - {self.customer_name}'
|
||||||
|
|
||||||
|
class InvoiceItem(models.Model):
|
||||||
|
invoice = models.ForeignKey(Invoice, related_name='items', on_delete=models.CASCADE)
|
||||||
|
description = models.CharField(max_length=255)
|
||||||
|
quantity = models.PositiveIntegerField(default=1)
|
||||||
|
unit_price = models.DecimalField(max_digits=15, decimal_places=2)
|
||||||
|
total = models.DecimalField(max_digits=15, decimal_places=2)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return f'{self.description} ({self.quantity} @ {self.unit_price})'
|
||||||
|
|
||||||
|
class Bill(models.Model):
|
||||||
|
vendor_name = models.CharField(max_length=255)
|
||||||
|
bill_date = models.DateField()
|
||||||
|
due_date = models.DateField()
|
||||||
|
total_amount = models.DecimalField(max_digits=15, decimal_places=2, default=0.00)
|
||||||
|
paid = models.BooleanField(default=False)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return f'Bill #{self.id} - {self.vendor_name}'
|
||||||
|
|
||||||
|
class BillItem(models.Model):
|
||||||
|
bill = models.ForeignKey(Bill, related_name='items', on_delete=models.CASCADE)
|
||||||
|
description = models.CharField(max_length=255)
|
||||||
|
quantity = models.PositiveIntegerField(default=1)
|
||||||
|
unit_price = models.DecimalField(max_digits=15, decimal_places=2)
|
||||||
|
total = models.DecimalField(max_digits=15, decimal_places=2)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return f'{self.description} ({self.quantity} @ {self.unit_price})'
|
||||||
25
accounting/templates/accounting/account_list.html
Normal file
25
accounting/templates/accounting/account_list.html
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<h1>Chart of Accounts</h1>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Number</th>
|
||||||
|
<th>Name</th>
|
||||||
|
<th>Type</th>
|
||||||
|
<th>Balance</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for account in accounts %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ account.number }}</td>
|
||||||
|
<td>{{ account.name }}</td>
|
||||||
|
<td>{{ account.get_type_display }}</td>
|
||||||
|
<td>{{ account.balance }}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{% endblock %}
|
||||||
31
accounting/templates/accounting/bill_list.html
Normal file
31
accounting/templates/accounting/bill_list.html
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
|
{% block title %}Bills{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<h1>Bills</h1>
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Bill #</th>
|
||||||
|
<th>Vendor</th>
|
||||||
|
<th>Bill Date</th>
|
||||||
|
<th>Due Date</th>
|
||||||
|
<th>Total</th>
|
||||||
|
<th>Paid</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for bill in bills %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ bill.id }}</td>
|
||||||
|
<td>{{ bill.vendor_name }}</td>
|
||||||
|
<td>{{ bill.bill_date }}</td>
|
||||||
|
<td>{{ bill.due_date }}</td>
|
||||||
|
<td>{{ bill.total_amount }}</td>
|
||||||
|
<td>{{ bill.paid|yesno:"Yes,No" }}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{% endblock %}
|
||||||
29
accounting/templates/accounting/invoice_list.html
Normal file
29
accounting/templates/accounting/invoice_list.html
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<h1>Invoices</h1>
|
||||||
|
<table class="table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Invoice #</th>
|
||||||
|
<th>Customer</th>
|
||||||
|
<th>Date</th>
|
||||||
|
<th>Due Date</th>
|
||||||
|
<th>Total</th>
|
||||||
|
<th>Paid</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for invoice in invoices %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ invoice.id }}</td>
|
||||||
|
<td>{{ invoice.customer_name }}</td>
|
||||||
|
<td>{{ invoice.invoice_date }}</td>
|
||||||
|
<td>{{ invoice.due_date }}</td>
|
||||||
|
<td>${{ invoice.total_amount }}</td>
|
||||||
|
<td>{{ invoice.paid|yesno:"Yes,No" }}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{% endblock %}
|
||||||
32
accounting/templates/accounting/trial_balance.html
Normal file
32
accounting/templates/accounting/trial_balance.html
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<h1>Trial Balance</h1>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Account Number</th>
|
||||||
|
<th>Account Name</th>
|
||||||
|
<th>Debit</th>
|
||||||
|
<th>Credit</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{% for item in report_data %}
|
||||||
|
<tr>
|
||||||
|
<td>{{ item.number }}</td>
|
||||||
|
<td>{{ item.name }}</td>
|
||||||
|
<td>{{ item.debit }}</td>
|
||||||
|
<td>{{ item.credit }}</td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
|
<tfoot>
|
||||||
|
<tr>
|
||||||
|
<td colspan="2"><strong>Total</strong></td>
|
||||||
|
<td><strong>{{ total_debits }}</strong></td>
|
||||||
|
<td><strong>{{ total_credits }}</strong></td>
|
||||||
|
</tr>
|
||||||
|
</tfoot>
|
||||||
|
</table>
|
||||||
|
{% endblock %}
|
||||||
3
accounting/tests.py
Normal file
3
accounting/tests.py
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
from django.test import TestCase
|
||||||
|
|
||||||
|
# Create your tests here.
|
||||||
11
accounting/urls.py
Normal file
11
accounting/urls.py
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
from django.urls import path
|
||||||
|
from . import views
|
||||||
|
|
||||||
|
app_name = 'accounting'
|
||||||
|
|
||||||
|
urlpatterns = [
|
||||||
|
path('accounts/', views.account_list, name='account_list'),
|
||||||
|
path('trial-balance/', views.trial_balance, name='trial_balance'),
|
||||||
|
path('invoices/', views.invoice_list, name='invoice_list'),
|
||||||
|
path('bills/', views.bill_list, name='bill_list'),
|
||||||
|
]
|
||||||
43
accounting/views.py
Normal file
43
accounting/views.py
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
from django.shortcuts import render
|
||||||
|
from .models import Account, Ledger, Invoice, Bill
|
||||||
|
from django.db.models import Sum
|
||||||
|
|
||||||
|
def account_list(request):
|
||||||
|
accounts = Account.objects.all()
|
||||||
|
return render(request, 'accounting/account_list.html', {'accounts': accounts})
|
||||||
|
|
||||||
|
def trial_balance(request):
|
||||||
|
accounts = Account.objects.all()
|
||||||
|
report_data = []
|
||||||
|
total_debits = 0
|
||||||
|
total_credits = 0
|
||||||
|
|
||||||
|
for account in accounts:
|
||||||
|
debit_total = Ledger.objects.filter(account=account).aggregate(Sum('debit'))['debit__sum'] or 0
|
||||||
|
credit_total = Ledger.objects.filter(account=account).aggregate(Sum('credit'))['credit__sum'] or 0
|
||||||
|
|
||||||
|
balance = debit_total - credit_total
|
||||||
|
|
||||||
|
report_data.append({
|
||||||
|
'number': account.number,
|
||||||
|
'name': account.name,
|
||||||
|
'debit': debit_total,
|
||||||
|
'credit': credit_total,
|
||||||
|
})
|
||||||
|
|
||||||
|
total_debits += debit_total
|
||||||
|
total_credits += credit_total
|
||||||
|
|
||||||
|
return render(request, 'accounting/trial_balance.html', {
|
||||||
|
'report_data': report_data,
|
||||||
|
'total_debits': total_debits,
|
||||||
|
'total_credits': total_credits,
|
||||||
|
})
|
||||||
|
|
||||||
|
def invoice_list(request):
|
||||||
|
invoices = Invoice.objects.all()
|
||||||
|
return render(request, 'accounting/invoice_list.html', {'invoices': invoices})
|
||||||
|
|
||||||
|
def bill_list(request):
|
||||||
|
bills = Bill.objects.all()
|
||||||
|
return render(request, 'accounting/bill_list.html', {'bills': bills})
|
||||||
Binary file not shown.
Binary file not shown.
@ -56,6 +56,7 @@ INSTALLED_APPS = [
|
|||||||
'django.contrib.messages',
|
'django.contrib.messages',
|
||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
'core',
|
'core',
|
||||||
|
'accounting',
|
||||||
]
|
]
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
|
|||||||
@ -22,6 +22,7 @@ from django.conf.urls.static import static
|
|||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path("admin/", admin.site.urls),
|
path("admin/", admin.site.urls),
|
||||||
path("", include("core.urls")),
|
path("", include("core.urls")),
|
||||||
|
path("accounting/", include("accounting.urls")),
|
||||||
]
|
]
|
||||||
|
|
||||||
if settings.DEBUG:
|
if settings.DEBUG:
|
||||||
|
|||||||
@ -3,7 +3,8 @@
|
|||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>{% block title %}Knowledge Base{% endblock %}</title>
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>{% block title %}Smart Accounting{% endblock %}</title>
|
||||||
{% if project_description %}
|
{% if project_description %}
|
||||||
<meta name="description" content="{{ project_description }}">
|
<meta name="description" content="{{ project_description }}">
|
||||||
<meta property="og:description" content="{{ project_description }}">
|
<meta property="og:description" content="{{ project_description }}">
|
||||||
@ -13,13 +14,52 @@
|
|||||||
<meta property="og:image" content="{{ project_image_url }}">
|
<meta property="og:image" content="{{ project_image_url }}">
|
||||||
<meta property="twitter:image" content="{{ project_image_url }}">
|
<meta property="twitter:image" content="{{ project_image_url }}">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Roboto:wght@400;500&display=swap" rel="stylesheet">
|
||||||
|
|
||||||
{% load static %}
|
{% load static %}
|
||||||
<link rel="stylesheet" href="{% static 'css/custom.css' %}?v={{ deployment_timestamp }}">
|
<link rel="stylesheet" href="{% static 'css/custom.css' %}?v={{ deployment_timestamp }}">
|
||||||
|
|
||||||
{% block head %}{% endblock %}
|
{% block head %}{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
{% block content %}{% endblock %}
|
<header class="navbar navbar-expand-lg navbar-light bg-white fixed-top">
|
||||||
|
<div class="container">
|
||||||
|
<a class="navbar-brand" href="#">Smart Accounting</a>
|
||||||
|
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
</button>
|
||||||
|
<div class="collapse navbar-collapse" id="navbarNav">
|
||||||
|
<ul class="navbar-nav ms-auto">
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="#">Features</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="#">Pricing</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link btn btn-primary text-white" href="#">Get Started</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
{% block content %}{% endblock %}
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<footer class="bg-light py-5">
|
||||||
|
<div class="container text-center">
|
||||||
|
<p class="mb-0">© 2025 Smart Accounting. All rights reserved.</p>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@ -1,145 +1,69 @@
|
|||||||
{% extends "base.html" %}
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
{% block title %}{{ project_name }}{% endblock %}
|
{% block title %}Smart Accounting - Cloud Accounting Software{% endblock %}
|
||||||
|
|
||||||
{% block head %}
|
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap" rel="stylesheet">
|
|
||||||
<style>
|
|
||||||
:root {
|
|
||||||
--bg-color-start: #6a11cb;
|
|
||||||
--bg-color-end: #2575fc;
|
|
||||||
--text-color: #ffffff;
|
|
||||||
--card-bg-color: rgba(255, 255, 255, 0.01);
|
|
||||||
--card-border-color: rgba(255, 255, 255, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
* {
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
margin: 0;
|
|
||||||
font-family: 'Inter', sans-serif;
|
|
||||||
background: linear-gradient(45deg, var(--bg-color-start), var(--bg-color-end));
|
|
||||||
color: var(--text-color);
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
min-height: 100vh;
|
|
||||||
text-align: center;
|
|
||||||
overflow: hidden;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
|
|
||||||
body::before {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
inset: 0;
|
|
||||||
background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'><path d='M-10 10L110 10M10 -10L10 110' stroke-width='1' stroke='rgba(255,255,255,0.05)'/></svg>");
|
|
||||||
animation: bg-pan 20s linear infinite;
|
|
||||||
z-index: -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes bg-pan {
|
|
||||||
0% {
|
|
||||||
background-position: 0% 0%;
|
|
||||||
}
|
|
||||||
|
|
||||||
100% {
|
|
||||||
background-position: 100% 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
main {
|
|
||||||
padding: 2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
.card {
|
|
||||||
background: var(--card-bg-color);
|
|
||||||
border: 1px solid var(--card-border-color);
|
|
||||||
border-radius: 16px;
|
|
||||||
padding: 2.5rem 2rem;
|
|
||||||
backdrop-filter: blur(20px);
|
|
||||||
-webkit-backdrop-filter: blur(20px);
|
|
||||||
box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25);
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
font-size: clamp(2.2rem, 3vw + 1.2rem, 3.2rem);
|
|
||||||
font-weight: 700;
|
|
||||||
margin: 0 0 1.2rem;
|
|
||||||
letter-spacing: -0.02em;
|
|
||||||
}
|
|
||||||
|
|
||||||
p {
|
|
||||||
margin: 0.5rem 0;
|
|
||||||
font-size: 1.1rem;
|
|
||||||
opacity: 0.92;
|
|
||||||
}
|
|
||||||
|
|
||||||
.loader {
|
|
||||||
margin: 1.5rem auto;
|
|
||||||
width: 56px;
|
|
||||||
height: 56px;
|
|
||||||
border: 4px solid rgba(255, 255, 255, 0.25);
|
|
||||||
border-top-color: #fff;
|
|
||||||
border-radius: 50%;
|
|
||||||
animation: spin 1s linear infinite;
|
|
||||||
}
|
|
||||||
|
|
||||||
@keyframes spin {
|
|
||||||
to {
|
|
||||||
transform: rotate(360deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.runtime code {
|
|
||||||
background: rgba(0, 0, 0, 0.25);
|
|
||||||
padding: 0.15rem 0.45rem;
|
|
||||||
border-radius: 4px;
|
|
||||||
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sr-only {
|
|
||||||
position: absolute;
|
|
||||||
width: 1px;
|
|
||||||
height: 1px;
|
|
||||||
padding: 0;
|
|
||||||
margin: -1px;
|
|
||||||
overflow: hidden;
|
|
||||||
clip: rect(0, 0, 0, 0);
|
|
||||||
border: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
footer {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 1rem;
|
|
||||||
width: 100%;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 0.85rem;
|
|
||||||
opacity: 0.75;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<main>
|
<div class="container-fluid hero-section">
|
||||||
<div class="card">
|
<div class="container">
|
||||||
<h1>Analyzing your requirements and generating your app…</h1>
|
<div class="row align-items-center" style="min-height: 80vh;">
|
||||||
<div class="loader" role="status" aria-live="polite" aria-label="Applying initial changes">
|
<div class="col-md-6">
|
||||||
<span class="sr-only">Loading…</span>
|
<h1 class="display-3 fw-bold">Effortless Accounting for Your Business</h1>
|
||||||
|
<p class="lead my-4">Smart Accounting is a simple, beautiful, and powerful cloud accounting solution designed for modern businesses.</p>
|
||||||
|
<a href="#" class="btn btn-primary btn-lg me-2">Get Started for Free</a>
|
||||||
|
<a href="#" class="btn btn-outline-secondary btn-lg">Learn More</a>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6 text-center">
|
||||||
|
<div class="invoice-teaser-card">
|
||||||
|
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||||
|
<h5 class="mb-0">New Invoice</h5>
|
||||||
|
<span class="badge bg-success-soft">Paid</span>
|
||||||
|
</div>
|
||||||
|
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||||
|
<span>Client:</span>
|
||||||
|
<strong>Innovate Corp.</strong>
|
||||||
|
</div>
|
||||||
|
<div class="d-flex justify-content-between align-items-center mb-3">
|
||||||
|
<span>Amount:</span>
|
||||||
|
<strong class="text-success">$1,250.00</strong>
|
||||||
|
</div>
|
||||||
|
<div class="progress" style="height: 5px;">
|
||||||
|
<div class="progress-bar bg-success" role="progressbar" style="width: 100%;" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p class="hint">AppWizzy AI is collecting your requirements and applying the first changes.</p>
|
</div>
|
||||||
<p class="hint">This page will refresh automatically as the plan is implemented.</p>
|
|
||||||
<p class="runtime">
|
<div class="container my-5 py-5">
|
||||||
Runtime: Django <code>{{ django_version }}</code> · Python <code>{{ python_version }}</code>
|
<div class="row text-center">
|
||||||
— UTC <code>{{ current_time|date:"Y-m-d H:i:s" }}</code>
|
<div class="col-md-4">
|
||||||
</p>
|
<div class="feature-card">
|
||||||
</div>
|
<div class="icon-circle bg-primary-soft mb-3">
|
||||||
</main>
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-file-text"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path><polyline points="14 2 14 8 20 8"></polyline><line x1="16" y1="13" x2="8" y2="13"></line><line x1="16" y1="17" x2="8" y2="17"></line><polyline points="10 9 9 9 8 9"></polyline></svg>
|
||||||
<footer>
|
</div>
|
||||||
Page updated: {{ current_time|date:"Y-m-d H:i:s" }} (UTC)
|
<h4>Invoicing</h4>
|
||||||
</footer>
|
<p>Create and send professional invoices in seconds.</p>
|
||||||
{% endblock %}
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="feature-card">
|
||||||
|
<div class="icon-circle bg-secondary-soft mb-3">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-trending-up"><polyline points="23 6 13.5 15.5 8.5 10.5 1 18"></polyline><polyline points="17 6 23 6 23 12"></polyline></svg>
|
||||||
|
</div>
|
||||||
|
<h4>Expense Tracking</h4>
|
||||||
|
<p>Track your expenses and never miss a deduction.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-4">
|
||||||
|
<div class="feature-card">
|
||||||
|
<div class="icon-circle bg-accent-soft mb-3">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-pie-chart"><path d="M21.21 15.89A10 10 0 1 1 8.11 2.99"></path><path d="M22 12A10 10 0 0 0 12 2v10z"></path></svg>
|
||||||
|
</div>
|
||||||
|
<h4>Reporting</h4>
|
||||||
|
<p>Generate insightful financial reports with a single click.</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|||||||
@ -1,4 +1,91 @@
|
|||||||
/* Custom styles for the application */
|
/* static/css/custom.css */
|
||||||
body {
|
|
||||||
font-family: system-ui, -apple-system, sans-serif;
|
:root {
|
||||||
|
--bs-primary: #4A90E2;
|
||||||
|
--bs-secondary: #F8F9FA;
|
||||||
|
--bs-accent-1: #50E3C2;
|
||||||
|
--bs-dark: #333333;
|
||||||
|
--bs-font-sans-serif: 'Roboto', sans-serif;
|
||||||
|
--bs-font-monospace: 'Poppins', sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: var(--bs-font-sans-serif);
|
||||||
|
color: var(--bs-dark);
|
||||||
|
padding-top: 70px; /* Offset for fixed navbar */
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5, h6 {
|
||||||
|
font-family: 'Poppins', sans-serif;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary {
|
||||||
|
background-color: var(--bs-primary);
|
||||||
|
border-color: var(--bs-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero-section {
|
||||||
|
background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(80, 227, 194, 0.1));
|
||||||
|
}
|
||||||
|
|
||||||
|
.invoice-teaser-card {
|
||||||
|
background-color: white;
|
||||||
|
border-radius: 15px;
|
||||||
|
padding: 2rem;
|
||||||
|
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
|
||||||
|
border: 1px solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-success-soft {
|
||||||
|
background-color: rgba(80, 227, 194, 0.2);
|
||||||
|
color: #2E856E;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature-card {
|
||||||
|
padding: 2rem;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature-card:hover {
|
||||||
|
transform: translateY(-5px);
|
||||||
|
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
|
||||||
|
border-radius: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-circle {
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
border-radius: 50%;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-circle svg {
|
||||||
|
color: var(--bs-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-primary-soft {
|
||||||
|
background-color: rgba(74, 144, 226, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-secondary-soft {
|
||||||
|
background-color: rgba(200, 200, 200, 0.1);
|
||||||
|
}
|
||||||
|
.bg-secondary-soft svg {
|
||||||
|
color: #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-accent-soft {
|
||||||
|
background-color: rgba(80, 227, 194, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-accent-soft svg {
|
||||||
|
color: #2E856E;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-brand {
|
||||||
|
font-family: 'Poppins', sans-serif;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
@ -1,21 +1,91 @@
|
|||||||
|
/* static/css/custom.css */
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
--bg-color-start: #6a11cb;
|
--bs-primary: #4A90E2;
|
||||||
--bg-color-end: #2575fc;
|
--bs-secondary: #F8F9FA;
|
||||||
--text-color: #ffffff;
|
--bs-accent-1: #50E3C2;
|
||||||
--card-bg-color: rgba(255, 255, 255, 0.01);
|
--bs-dark: #333333;
|
||||||
--card-border-color: rgba(255, 255, 255, 0.1);
|
--bs-font-sans-serif: 'Roboto', sans-serif;
|
||||||
|
--bs-font-monospace: 'Poppins', sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
margin: 0;
|
font-family: var(--bs-font-sans-serif);
|
||||||
font-family: 'Inter', sans-serif;
|
color: var(--bs-dark);
|
||||||
background: linear-gradient(45deg, var(--bg-color-start), var(--bg-color-end));
|
padding-top: 70px; /* Offset for fixed navbar */
|
||||||
color: var(--text-color);
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
min-height: 100vh;
|
|
||||||
text-align: center;
|
|
||||||
overflow: hidden;
|
|
||||||
position: relative;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5, h6 {
|
||||||
|
font-family: 'Poppins', sans-serif;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary {
|
||||||
|
background-color: var(--bs-primary);
|
||||||
|
border-color: var(--bs-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero-section {
|
||||||
|
background: linear-gradient(135deg, rgba(74, 144, 226, 0.1), rgba(80, 227, 194, 0.1));
|
||||||
|
}
|
||||||
|
|
||||||
|
.invoice-teaser-card {
|
||||||
|
background-color: white;
|
||||||
|
border-radius: 15px;
|
||||||
|
padding: 2rem;
|
||||||
|
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
|
||||||
|
border: 1px solid #eee;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-success-soft {
|
||||||
|
background-color: rgba(80, 227, 194, 0.2);
|
||||||
|
color: #2E856E;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature-card {
|
||||||
|
padding: 2rem;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.feature-card:hover {
|
||||||
|
transform: translateY(-5px);
|
||||||
|
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
|
||||||
|
border-radius: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-circle {
|
||||||
|
width: 60px;
|
||||||
|
height: 60px;
|
||||||
|
border-radius: 50%;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-circle svg {
|
||||||
|
color: var(--bs-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-primary-soft {
|
||||||
|
background-color: rgba(74, 144, 226, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-secondary-soft {
|
||||||
|
background-color: rgba(200, 200, 200, 0.1);
|
||||||
|
}
|
||||||
|
.bg-secondary-soft svg {
|
||||||
|
color: #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-accent-soft {
|
||||||
|
background-color: rgba(80, 227, 194, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.bg-accent-soft svg {
|
||||||
|
color: #2E856E;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar-brand {
|
||||||
|
font-family: 'Poppins', sans-serif;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user