清空,重构
This commit is contained in:
29
.env.example
29
.env.example
@@ -1,29 +0,0 @@
|
||||
# Django
|
||||
SECRET_KEY=your-secret-key-here
|
||||
DEBUG=True
|
||||
DJANGO_SETTINGS_MODULE=config.settings.development
|
||||
ALLOWED_HOSTS=localhost,127.0.0.1
|
||||
|
||||
# Database
|
||||
DB_NAME=fonrey
|
||||
DB_USER=fonrey
|
||||
DB_PASSWORD=fonrey
|
||||
DB_HOST=db
|
||||
DB_PORT=5432
|
||||
|
||||
# Redis
|
||||
REDIS_URL=redis://redis:6379/0
|
||||
CELERY_BROKER_URL=redis://redis:6379/1
|
||||
|
||||
# Cloudflare R2
|
||||
R2_ENDPOINT_URL=https://<account_id>.r2.cloudflarestorage.com
|
||||
R2_ACCESS_KEY_ID=
|
||||
R2_SECRET_ACCESS_KEY=
|
||||
R2_BUCKET_NAME=media
|
||||
R2_CUSTOM_DOMAIN=
|
||||
|
||||
# Sentry(production 填写)
|
||||
SENTRY_DSN=
|
||||
|
||||
# PII 加密密钥(AES-256,生产环境必须替换)
|
||||
PHONE_ENCRYPTION_KEY=
|
||||
8
.gitignore
vendored
8
.gitignore
vendored
@@ -1,8 +0,0 @@
|
||||
.env
|
||||
*.pyc
|
||||
__pycache__/
|
||||
.DS_Store
|
||||
node_modules/
|
||||
static/css/output.css
|
||||
media/
|
||||
dist/
|
||||
@@ -1,8 +0,0 @@
|
||||
FROM python:3.12-slim
|
||||
WORKDIR /app
|
||||
RUN apt-get update && apt-get install -y libpq-dev gcc && rm -rf /var/lib/apt/lists/*
|
||||
COPY requirements/base.txt requirements/base.txt
|
||||
RUN pip install --no-cache-dir -r requirements/base.txt
|
||||
COPY . .
|
||||
EXPOSE 8000
|
||||
CMD ["uvicorn", "config.asgi:application", "--host", "0.0.0.0", "--port", "8000"]
|
||||
23
Makefile
23
Makefile
@@ -1,23 +0,0 @@
|
||||
.PHONY: dev migrate shell createsuperuser test lint
|
||||
|
||||
dev:
|
||||
docker compose up
|
||||
|
||||
migrate:
|
||||
docker compose exec web python manage.py migrate_schemas --shared
|
||||
docker compose exec web python manage.py migrate_schemas
|
||||
|
||||
shell:
|
||||
docker compose exec web python manage.py shell_plus
|
||||
|
||||
test:
|
||||
docker compose exec web pytest apps/ -v
|
||||
|
||||
lint:
|
||||
ruff check . && black --check .
|
||||
|
||||
tailwind-build:
|
||||
npm run build
|
||||
|
||||
createsuperuser:
|
||||
docker compose exec web python manage.py create_tenant_superuser
|
||||
@@ -1 +0,0 @@
|
||||
from django.contrib import admin
|
||||
@@ -1,6 +0,0 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class AccountConfig(AppConfig):
|
||||
name = "apps.account"
|
||||
verbose_name = "登录认证"
|
||||
@@ -1,6 +0,0 @@
|
||||
from celery import shared_task
|
||||
|
||||
|
||||
@shared_task
|
||||
def sample_task() -> str:
|
||||
return "account task placeholder"
|
||||
@@ -1,9 +0,0 @@
|
||||
from django.urls import path
|
||||
|
||||
from . import views
|
||||
|
||||
app_name = "account"
|
||||
|
||||
urlpatterns = [
|
||||
path("", views.index, name="index"),
|
||||
]
|
||||
@@ -1,5 +0,0 @@
|
||||
from django.http import HttpRequest, HttpResponse
|
||||
|
||||
|
||||
def index(request: HttpRequest) -> HttpResponse:
|
||||
return HttpResponse("account app placeholder")
|
||||
@@ -1 +0,0 @@
|
||||
from django.contrib import admin
|
||||
@@ -1,6 +0,0 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class ClientConfig(AppConfig):
|
||||
name = "apps.client"
|
||||
verbose_name = "客源管理"
|
||||
@@ -1,6 +0,0 @@
|
||||
from celery import shared_task
|
||||
|
||||
|
||||
@shared_task
|
||||
def sample_task() -> str:
|
||||
return "client task placeholder"
|
||||
@@ -1,9 +0,0 @@
|
||||
from django.urls import path
|
||||
|
||||
from . import views
|
||||
|
||||
app_name = "client"
|
||||
|
||||
urlpatterns = [
|
||||
path("", views.index, name="index"),
|
||||
]
|
||||
@@ -1,5 +0,0 @@
|
||||
from django.http import HttpRequest, HttpResponse
|
||||
|
||||
|
||||
def index(request: HttpRequest) -> HttpResponse:
|
||||
return HttpResponse("client app placeholder")
|
||||
@@ -1 +0,0 @@
|
||||
from django.contrib import admin
|
||||
@@ -1,6 +0,0 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class ComplexConfig(AppConfig):
|
||||
name = "apps.complex"
|
||||
verbose_name = "楼盘管理"
|
||||
@@ -1,6 +0,0 @@
|
||||
from celery import shared_task
|
||||
|
||||
|
||||
@shared_task
|
||||
def sample_task() -> str:
|
||||
return "complex task placeholder"
|
||||
@@ -1,9 +0,0 @@
|
||||
from django.urls import path
|
||||
|
||||
from . import views
|
||||
|
||||
app_name = "complex"
|
||||
|
||||
urlpatterns = [
|
||||
path("", views.index, name="index"),
|
||||
]
|
||||
@@ -1,5 +0,0 @@
|
||||
from django.http import HttpRequest, HttpResponse
|
||||
|
||||
|
||||
def index(request: HttpRequest) -> HttpResponse:
|
||||
return HttpResponse("complex app placeholder")
|
||||
@@ -1 +0,0 @@
|
||||
from django.contrib import admin
|
||||
@@ -1,6 +0,0 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class OrgConfig(AppConfig):
|
||||
name = "apps.org"
|
||||
verbose_name = "组织人事"
|
||||
@@ -1,6 +0,0 @@
|
||||
from celery import shared_task
|
||||
|
||||
|
||||
@shared_task
|
||||
def sample_task() -> str:
|
||||
return "org task placeholder"
|
||||
@@ -1,9 +0,0 @@
|
||||
from django.urls import path
|
||||
|
||||
from . import views
|
||||
|
||||
app_name = "org"
|
||||
|
||||
urlpatterns = [
|
||||
path("", views.index, name="index"),
|
||||
]
|
||||
@@ -1,5 +0,0 @@
|
||||
from django.http import HttpRequest, HttpResponse
|
||||
|
||||
|
||||
def index(request: HttpRequest) -> HttpResponse:
|
||||
return HttpResponse("org app placeholder")
|
||||
@@ -1 +0,0 @@
|
||||
from django.contrib import admin
|
||||
@@ -1,6 +0,0 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class PermissionConfig(AppConfig):
|
||||
name = "apps.permission"
|
||||
verbose_name = "权限管理"
|
||||
@@ -1,6 +0,0 @@
|
||||
from celery import shared_task
|
||||
|
||||
|
||||
@shared_task
|
||||
def sample_task() -> str:
|
||||
return "permission task placeholder"
|
||||
@@ -1,9 +0,0 @@
|
||||
from django.urls import path
|
||||
|
||||
from . import views
|
||||
|
||||
app_name = "permission"
|
||||
|
||||
urlpatterns = [
|
||||
path("", views.index, name="index"),
|
||||
]
|
||||
@@ -1,5 +0,0 @@
|
||||
from django.http import HttpRequest, HttpResponse
|
||||
|
||||
|
||||
def index(request: HttpRequest) -> HttpResponse:
|
||||
return HttpResponse("permission app placeholder")
|
||||
@@ -1 +0,0 @@
|
||||
from django.contrib import admin
|
||||
@@ -1,6 +0,0 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class PropertyConfig(AppConfig):
|
||||
name = "apps.property"
|
||||
verbose_name = "房源核心"
|
||||
@@ -1,6 +0,0 @@
|
||||
from celery import shared_task
|
||||
|
||||
|
||||
@shared_task
|
||||
def sample_task() -> str:
|
||||
return "property task placeholder"
|
||||
@@ -1,9 +0,0 @@
|
||||
from django.urls import path
|
||||
|
||||
from . import views
|
||||
|
||||
app_name = "property"
|
||||
|
||||
urlpatterns = [
|
||||
path("", views.index, name="index"),
|
||||
]
|
||||
@@ -1,5 +0,0 @@
|
||||
from django.http import HttpRequest, HttpResponse
|
||||
|
||||
|
||||
def index(request: HttpRequest) -> HttpResponse:
|
||||
return HttpResponse("property app placeholder")
|
||||
@@ -1 +0,0 @@
|
||||
from django.contrib import admin
|
||||
@@ -1,6 +0,0 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class RegionConfig(AppConfig):
|
||||
name = "apps.region"
|
||||
verbose_name = "区域管理"
|
||||
@@ -1,6 +0,0 @@
|
||||
from celery import shared_task
|
||||
|
||||
|
||||
@shared_task
|
||||
def sample_task() -> str:
|
||||
return "region task placeholder"
|
||||
@@ -1,9 +0,0 @@
|
||||
from django.urls import path
|
||||
|
||||
from . import views
|
||||
|
||||
app_name = "region"
|
||||
|
||||
urlpatterns = [
|
||||
path("", views.index, name="index"),
|
||||
]
|
||||
@@ -1,5 +0,0 @@
|
||||
from django.http import HttpRequest, HttpResponse
|
||||
|
||||
|
||||
def index(request: HttpRequest) -> HttpResponse:
|
||||
return HttpResponse("region app placeholder")
|
||||
@@ -1 +0,0 @@
|
||||
from django.contrib import admin
|
||||
@@ -1,6 +0,0 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class ReleaseConfig(AppConfig):
|
||||
name = "apps.release"
|
||||
verbose_name = "客户端发布管理"
|
||||
@@ -1,6 +0,0 @@
|
||||
from celery import shared_task
|
||||
|
||||
|
||||
@shared_task
|
||||
def sample_task() -> str:
|
||||
return "release task placeholder"
|
||||
@@ -1,9 +0,0 @@
|
||||
from django.urls import path
|
||||
|
||||
from . import views
|
||||
|
||||
app_name = "release"
|
||||
|
||||
urlpatterns = [
|
||||
path("", views.index, name="index"),
|
||||
]
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user