Bump django from 5.0.14 to 5.1.10
URL Manager
A URL management tool that helps you organize and access your links efficiently.
Features
- Create and manage short links
- Template links with dynamic parameters
- Bookmark pages with automatic title and summary extraction
- Advanced search capabilities
- API access
- Asynchronous page processing
Installation
Using Docker (Recommended)
-
Prerequisites:
- Docker
- Docker Compose
-
Clone the repository:
git clone https://github.com/yourusername/url-manager.git cd url-manager -
Build and start services:
./docker.sh build ./docker.sh start
The application will be available at http://localhost:8000
Docker Management Commands
-
Start all services:
./docker.sh start -
Stop all services:
./docker.sh stop -
Restart services:
./docker.sh restart -
View logs:
./docker.sh logs -
Run database migrations:
./docker.sh migrate -
Create new migrations:
./docker.sh makemigrations -
Access Django shell:
./docker.sh shell
Docker Services
The application runs the following services:
web: Django web server (port 8000)celery_worker: Processes background taskscelery_beat: Schedules periodic tasksredis: Message broker and result backend
Manual Installation
If you prefer not to use Docker:
-
Install Python 3.12 and Redis
-
Install uv:
curl -LsSf https://astral.sh/uv/install.sh | sh -
Install dependencies:
uv pip install -r requirements.txt -
Run migrations:
python manage.py migrate -
Start the development server:
./run_server.sh -
Start Celery worker:
./worker.sh -
Start Celery beat:
./celery_beat.sh
Usage
Managing Links
-
Create a new link:
- Visit
/create/ - Enter the original URL and desired alias
- For template links, use
{param}syntax
- Visit
-
Access a link:
- Use
http://localhost:8000/your-alias - For template links:
http://localhost:8000/your-alias/parameter
- Use
Managing Pages
-
Create a new page:
- Visit
/ui/pages/new/ - Enter the URL
- Title and summary will be automatically extracted
- Visit
-
View all pages:
- Visit
/ui/pages/
- Visit
API Access
The application provides a REST API:
- List pages:
GET /api/pages/ - Create page:
POST /api/pages/
Example:
Monitoring Celery Tasks
The application includes Flower for monitoring Celery tasks. You can access it in two ways:
-
Direct access:
- Visit
http://localhost:5555in your browser
- Visit
-
Using management script:
./docker.sh flower
Flower provides:
- Real-time monitoring of Celery tasks
- Task progress and history
- Worker status and statistics
- Error tracking
- Task graphs and charts
Monitoring Features
-
View all tasks:
- Active tasks
- Scheduled tasks
- Failed tasks
- Success rate
-
Worker information:
- Status
- Resource usage
- Queue length
-
Task details:
- Arguments
- Start time
- Runtime
- Result
- Stack traces for failed tasks
Why we have core folder and what it is?
The core folder is the Django project's root configuration directory, created when you first run django-admin startproject core. It serves several essential purposes: Project-wide settings (settings.py): Database configuration Installed apps Middleware Static/media files settings Other global settings Root URL configuration (urls.py): Main URL routing Admin site URLs Including app-specific URLs 3. WSGI/ASGI configuration: For production deployment Server integration Celery configuration (celery.py): Project-wide Celery settings Task discovery We can't completely remove it because Django requires this project-level configuration. The links folder is an app within the project, and you could have multiple apps in one project. Think of it this way: core/ = Project configuration (can contain multiple apps) links/ = One specific app's code This separation allows you to:
- Have multiple apps in one project Reuse apps across different projects Keep project-wide settings separate from app-specific code If you want to simplify, you could rename core to something shorter like config or core, but you can't eliminate it entirely as it's a fundamental part of Django's project structure. Would you like me to show you how to rename it to something shorter and cleaner?
Development
Using uv for Dependency Management
uv is a fast Python package installer and resolver. To add new dependencies:
uv pip
Favicon
This favicon was generated using the following font:
- Font Title: Zen Tokyo Zoo
- Font Author: undefined
- Font Source: https://fonts.gstatic.com/s/zentokyozoo/v7/NGSyv5ffC0J_BK6aFNtr6sRv8a1uRWe9amg.ttf
- Font License: undefined)
Image resizing
- bind custom domain
- enable image resizing https://developers.cloudflare.com/images/transform-images/