From 20ae4862e45d825b87e33cad7c0671c8d7e07bd0 Mon Sep 17 00:00:00 2001 From: pacnpal <183241239+pacnpal@users.noreply.github.com> Date: Wed, 19 Feb 2025 09:56:23 -0500 Subject: [PATCH] Add development server and package management guidelines to documentation --- .clinerules | 28 ++++++++++++++++++++++++++++ memory-bank/systemPatterns.md | 32 ++++++++++++++++++++++++++++++-- 2 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 .clinerules diff --git a/.clinerules b/.clinerules new file mode 100644 index 00000000..c8dd3507 --- /dev/null +++ b/.clinerules @@ -0,0 +1,28 @@ +# Project Startup Rules + +## Development Server +IMPORTANT: Always follow these instructions exactly in this order when starting the development server: + +1. First, kill any existing process on port 8000: +```bash +lsof -ti :8000 | xargs kill -9 +``` + +2. Then, delete all __pycache__ directories: +```bash +find . -type d -name "__pycache__" -exec rm -r {} + +``` + +3. Finally, run the Django development server with Tailwind using UV: +```bash +uv run manage.py tailwind runserver +``` + +Note: These steps must be followed in exactly this order every time you start the development server to ensure consistent behavior. + +## Package Management +IMPORTANT: When a Python package is needed, only use UV to add it: +```bash +uv add +``` +Do not attempt to install packages using any other method. \ No newline at end of file diff --git a/memory-bank/systemPatterns.md b/memory-bank/systemPatterns.md index 15e82b28..69722df2 100644 --- a/memory-bank/systemPatterns.md +++ b/memory-bank/systemPatterns.md @@ -73,8 +73,8 @@ ```html
-
-
+
+
``` @@ -161,6 +161,34 @@ class ViewTests(TestCase): ## Development Workflows +### Package Management +IMPORTANT: When adding Python packages to the project, only use UV: +```bash +uv add +``` +Do not attempt to install packages using any other method (pip, poetry, etc.). + +### Development Server Management +1. Server Startup Process + IMPORTANT: Always follow these steps exactly in this order when starting the development server: + + 1. First, kill any existing process on port 8000: + ```bash + lsof -ti :8000 | xargs kill -9 + ``` + + 2. Then, delete all __pycache__ directories: + ```bash + find . -type d -name "__pycache__" -exec rm -r {} + + ``` + + 3. Finally, run the Django development server with Tailwind using UV: + ```bash + uv run manage.py tailwind runserver + ``` + + Note: These steps must be followed in exactly this order every time you start the development server to ensure consistent behavior. + ### Feature Development 1. Planning - Technical specification