Back to Templates

Python Django - Cloud Functions on EdgeOne Pages

Full-featured Django with built-in ORM, authentication, admin panel, and security — ready to deploy.

View Demo
Full-featured Django with built-in ORM, authentication, admin panel, and security — ready to deploy.

Python Cloud Functions - Django | EdgeOne Pages

A demonstration website showcasing how to deploy Django applications as serverless functions on EdgeOne Pages.

🚀 Features

  • Django Framework: The web framework for perfectionists with deadlines
  • Battle-Tested: Mature framework powering millions of websites
  • Batteries Included: ORM, auth, admin, templates, and more built-in
  • Security First: CSRF, XSS, SQL injection protection by default
  • URL Routing: Django's powerful URL dispatcher

🛠️ Tech Stack

Frontend

  • Next.js 15 - React full-stack framework
  • React 19 - User interface library
  • TypeScript - Type-safe JavaScript
  • Tailwind CSS 4 - Utility-first CSS framework

Backend

  • Django - Python web framework
  • Cloud Functions - EdgeOne Pages serverless functions

📁 Project Structure

python-django-template/
├── src/                    # Next.js frontend
├── cloud-functions/        # Python cloud functions
│   ├── api/
│   │   └── [[default]].py # Django application
│   └── requirements.txt   # Python dependencies
├── public/                # Static assets
└── package.json          # Project configuration

🚀 Quick Start

Requirements

  • Node.js 18+
  • Python 3.9+
  • EdgeOne CLI

Install Dependencies

npm install

Development Mode

edgeone pages dev

Visit http://localhost:8088 to view the application.

🎯 API Endpoints

MethodPathDescription
GET/api/Root endpoint
GET/api/healthHealth check
GET/api/infoFunction information
GET/api/timeCurrent server time
GET/POST/api/echoEcho request info
POST/api/jsonHandle JSON body
GET/api/users/{user_id}Get user by ID
POST/api/usersCreate new user
GET/api/searchSearch with query params

📚 Documentation

📄 License

This project is licensed under the MIT License.