Add Django site, Docker packaging, and beta/prod Gitea deploys.
Deploy Beta / unit-tests (push) Successful in 9s
Deploy Beta / docker (push) Successful in 17s
Deploy Beta / deploy-beta (push) Successful in 2m31s

Unignore site/ (was blocked by mkdocs /site rule), add compose/Docker/uv tooling, and split deploys so push to main goes to beta while prod stays manual.
This commit is contained in:
2026-08-08 07:32:55 -05:00
parent 7dca98bbf6
commit 1f7d78de64
204 changed files with 21662 additions and 70 deletions
View File
+9
View File
@@ -0,0 +1,9 @@
from django.contrib import admin
from accounts.models import RealtorProfile
@admin.register(RealtorProfile)
class RealtorProfileAdmin(admin.ModelAdmin):
list_display = ("user", "display_name", "phone")
search_fields = ("user__username", "display_name")
+6
View File
@@ -0,0 +1,6 @@
from django.apps import AppConfig
class AccountsConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "accounts"
+33
View File
@@ -0,0 +1,33 @@
# Generated by Django 6.1 on 2026-08-06 18:01
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='RealtorProfile',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_at', models.DateTimeField(auto_now_add=True)),
('updated_at', models.DateTimeField(auto_now=True)),
('display_name', models.CharField(blank=True, max_length=120)),
('phone', models.CharField(blank=True, max_length=32)),
('title', models.CharField(blank=True, max_length=120)),
('bio', models.TextField(blank=True)),
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='realtor_profile', to=settings.AUTH_USER_MODEL)),
],
options={
'abstract': False,
},
),
]
+19
View File
@@ -0,0 +1,19 @@
from django.conf import settings
from django.db import models
from core.models import TimeStampedModel
class RealtorProfile(TimeStampedModel):
user = models.OneToOneField(
settings.AUTH_USER_MODEL,
on_delete=models.CASCADE,
related_name="realtor_profile",
)
display_name = models.CharField(max_length=120, blank=True)
phone = models.CharField(max_length=32, blank=True)
title = models.CharField(max_length=120, blank=True)
bio = models.TextField(blank=True)
def __str__(self) -> str:
return self.display_name or self.user.get_username()
@@ -0,0 +1,42 @@
{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Sign in · Portal · MKDRealtor.com</title>
<link rel="icon" href="{% static 'brand/favicon-32.png' %}" type="image/png">
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Work+Sans:300,400,500,700%7CPoppins:400,600,700">
<link rel="stylesheet" href="{% static 'css/portal.css' %}">
</head>
<body class="portal">
<div class="login-wrap">
<div class="login-card">
<h1>MKD Portal</h1>
<p class="sub">{{ SITE_TAGLINE }}</p>
<p class="sub" style="margin-top:0;margin-bottom:16px;font-size:13px">Leads, campaigns, and social — one place.</p>
{% if form.errors %}
<ul class="portal-flash">
<li class="error">Invalid email or password.</li>
</ul>
{% endif %}
<form class="form-grid" method="post" action="{% url 'accounts:login' %}">
{% csrf_token %}
{% if next %}<input type="hidden" name="next" value="{{ next }}">{% endif %}
<div class="field">
<label for="id_username">Email</label>
<input id="id_username" type="text" name="username" autocomplete="username" required value="{{ form.username.value|default:'' }}">
</div>
<div class="field">
<label for="id_password">Password</label>
<input id="id_password" type="password" name="password" autocomplete="current-password" required>
</div>
<button class="btn btn-primary" type="submit" data-tianji-event="login_submit">Sign in</button>
</form>
<p style="margin-top:16px;font-size:13px;color:#6b7280">
<a href="{% url 'public:home' %}">← Back to site</a>
</p>
</div>
</div>
</body>
</html>
+17
View File
@@ -0,0 +1,17 @@
from django.contrib.auth import views as auth_views
from django.urls import path
app_name = "accounts"
urlpatterns = [
path(
"login/",
auth_views.LoginView.as_view(template_name="accounts/login.html"),
name="login",
),
path(
"logout/",
auth_views.LogoutView.as_view(),
name="logout",
),
]