init commit

This commit is contained in:
2025-05-06 20:44:33 +09:00
commit 91f0d54563
5567 changed files with 948185 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
{
"app_name": "",
"_copy_without_render": [
"templates/base.html"
]
}

View File

@@ -0,0 +1,12 @@
import re
import sys
APP_NAME_REGEX = r"^[_a-zA-Z][_a-zA-Z0-9]+$"
app_name = "{{ cookiecutter.app_name }}"
if not re.match(APP_NAME_REGEX, app_name):
print(f"ERROR: {app_name} is not a valid Django app name!")
# exits with status 1 to indicate failure
sys.exit(1)

View File

@@ -0,0 +1,5 @@
from django.apps import AppConfig
class {{ cookiecutter.app_name[0]|upper }}{{ cookiecutter.app_name[1:] }}Config(AppConfig):
name = '{{ cookiecutter.app_name }}'

View File

@@ -0,0 +1,25 @@
{
"name": "{{ cookiecutter.app_name }}",
"version": "4.0.1",
"description": "",
"scripts": {
"start": "npm run dev",
"build": "npm run build:clean && npm run build:tailwind",
"build:clean": "rimraf ../static/css/dist",
"build:tailwind": "cross-env NODE_ENV=production postcss ./src/styles.css -o ../static/css/dist/styles.css --minify",
"dev": "cross-env NODE_ENV=development postcss ./src/styles.css -o ../static/css/dist/styles.css --watch"
},
"keywords": [],
"author": "",
"license": "MIT",
"devDependencies": {
"@tailwindcss/postcss": "^4.1.0",
"cross-env": "^7.0.3",
"postcss": "^8.5.3",
"postcss-cli": "^11.0.1",
"postcss-nested": "^7.0.2",
"postcss-simple-vars": "^7.0.1",
"rimraf": "^6.0.1",
"tailwindcss": "^4.1.0"
}
}

View File

@@ -0,0 +1,7 @@
module.exports = {
plugins: {
"@tailwindcss/postcss": {},
"postcss-simple-vars": {},
"postcss-nested": {}
},
}

View File

@@ -0,0 +1,10 @@
@import "tailwindcss";
/**
* A catch-all path to Django template files, JavaScript, and Python files
* that contain Tailwind CSS classes and will be scanned by Tailwind to generate the final CSS file.
*
* If your final CSS file is not being updated after code changes, you may want to broaden or narrow
* the scope of this path.
*/
@source "../../../**/*.{html,py,js}";

View File

@@ -0,0 +1,19 @@
{% load static tailwind_tags %}
<!DOCTYPE html>
<html lang="en">
<head>
<title>Django Tailwind</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
{% tailwind_css %}
</head>
<body class="bg-gray-50 font-serif leading-normal tracking-normal">
<div class="container mx-auto">
<section class="flex items-center justify-center h-screen">
<h1 class="text-5xl">Django + Tailwind = ❤️</h1>
</section>
</div>
</body>
</html>