JanGo

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2026 License: MIT Imports: 2 Imported by: 0

README

GoDjango

GoDjango is a full Django-equivalent web framework written in Go. It aims to provide the robust, "batteries-included" experience of Django, while leveraging Go's performance, concurrency, and static typing.

Design Goals

  • Django-like Experience: Familiar patterns, directory structure, and APIs for Django developers.
  • Batteries Included: Built-in ORM, admin panel, form handling, authentication, templating, and caching.
  • No Build Required: Run your project instantly with go run manage.go <command>.
  • Pure Go: Relies on Go standards and popular native libraries where appropriate.
  • Developer Friendly: Excellent developer experience with hot-reloading built-in.

Architecture

The framework is divided into logical packages mimicking Django's structure:

  • core/ - Framework kernel (app registry, settings loader, signals)
  • http/ - Router, request, response, and middleware chain
  • template/ - Template engine, tags, filters, and context processors
  • orm/ - Models, querysets, schema management, and migrations
  • forms/ - Form fields, validation, widgets, and rendering
  • admin/ - Auto-generated admin UI
  • auth/ - User model, permissions, and session management
  • cache/ - Cache framework and pluggable backends (Redis, in-memory)
  • static/ - Static file handling and collectstatic command
  • management/ - Management command infrastructure (equivalent to manage.py)
  • contrib/ - Optional bundled apps
  • test/ - Testing utilities and a test client
  • cmd/godjango-admin/ - Global CLI binary for generating new projects

Getting Started

To run a project using GoDjango:

# Initialize a new project (similar to django-admin startproject)
go run cmd/godjango-admin/main.go startproject myproject

# Navigate to your project
cd myproject

# Run the development server
go run manage.go runserver

Management Commands

GoDjango uses Cobra to provide a robust CLI experience. Common commands include:

  • runserver - Starts the development server with hot reload.
  • migrate - Applies database migrations.
  • makemigrations - Creates new migrations based on model changes.
  • createsuperuser - Creates an administrative user.
  • shell - Opens an interactive Go shell with context loaded.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
godjango-admin command
debug
examples
blog command
blog/app
Package app provides a blog application demonstrating GoDjango capabilities.
Package app provides a blog application demonstrating GoDjango capabilities.
ws
orm

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL