All Projects → simonw → Djng

simonw / Djng

Licence: bsd-2-clause
Turtles all the way down

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Djng

Django Micro
Django as a microframework
Stars: ✭ 245 (+92.91%)
Mutual labels:  django, microframework
Screenshots
Simple Website Screenshots as a Service (Django, Selenium, Docker, Docker-compose)
Stars: ✭ 126 (-0.79%)
Mutual labels:  django
Django Trench
django-trench provides a set of REST API endpoints to supplement django-rest-framework with multi-factor authentication (MFA, 2FA). It supports both standard built-in authentication methods, as well as JWT (JSON Web Token).
Stars: ✭ 123 (-3.15%)
Mutual labels:  django
Django Fields
Fields pack for django framework.
Stars: ✭ 124 (-2.36%)
Mutual labels:  django
Geekblog
A full blog system based on Django
Stars: ✭ 123 (-3.15%)
Mutual labels:  django
Wagtail
A Django content management system focused on flexibility and user experience
Stars: ✭ 11,387 (+8866.14%)
Mutual labels:  django
Django Classified
Django Classified
Stars: ✭ 122 (-3.94%)
Mutual labels:  django
Timestrap
Time tracking you can host anywhere. Full export support in multiple formats and easily extensible.
Stars: ✭ 1,607 (+1165.35%)
Mutual labels:  django
Djangocms Text Ckeditor
Text Plugin for django CMS using CKEditor 4
Stars: ✭ 126 (-0.79%)
Mutual labels:  django
Impostor
Django app that enables staff to log in as other users using their own credentials.
Stars: ✭ 124 (-2.36%)
Mutual labels:  django
Django Jsoneditor
Django JSONEditor input widget to provide javascript online JSON Editor
Stars: ✭ 124 (-2.36%)
Mutual labels:  django
Django Lockdown
Lock down a Django site or individual views, with configurable preview authorization
Stars: ✭ 123 (-3.15%)
Mutual labels:  django
Elasticstack
📇 Configurable indexing and other extras for Haystack (with ElasticSearch biases)
Stars: ✭ 125 (-1.57%)
Mutual labels:  django
Django Project Skeleton
A skeleton aka. template for Django projects
Stars: ✭ 123 (-3.15%)
Mutual labels:  django
Dialogue.moe
Stars: ✭ 127 (+0%)
Mutual labels:  django
Tera
A template engine for Rust based on Jinja2/Django
Stars: ✭ 1,873 (+1374.8%)
Mutual labels:  django
Searchrestaurant
Apps are built using Google Maps SDK, Geocoding and Foursquare APIs
Stars: ✭ 124 (-2.36%)
Mutual labels:  django
Python Resources 2019
A curated list of Python 3 resources, books, websites, tutorials, code challenges
Stars: ✭ 125 (-1.57%)
Mutual labels:  django
Vms
THIS PROJECT IS ARCHIVED. Volunteer Management System.
Stars: ✭ 127 (+0%)
Mutual labels:  django
Django Structlog
Structured Logging for Django
Stars: ✭ 127 (+0%)
Mutual labels:  django

djng

(pronounced "djing", with a mostly-silent "d")

Blog entry: http://simonwillison.net/2009/May/19/djng/ Mailing list: http://groups.google.com/group/djng

djng is a micro-framework that depends on a macro-framework (Django).

My definition of a micro-framework: something that lets you create an entire Python web application in a single module:

import djng

def index(request):
    return djng.Response('Hello, world')

if __name__ == '__main__':
    djng.serve(index, '0.0.0.0', 8888)

Or if you want hello and goodbye URLs, and a custom 404 page:

import djng

app = djng.ErrorWrapper(
    djng.Router(
        (r'^hello$', lambda request: djng.Response('Hello, world')),
        (r'^goodbye$', lambda request: djng.Response('Goodbye, world')),
    ),
    custom_404 = lambda request: djng.Response('404 error', status=404),
    custom_500 = lambda request: djng.Response('500 error', status=500)
)

if __name__ == '__main__':
    djng.serve(app, '0.0.0.0', 8888)

Under the hood, djng will re-use large amounts of functionality from Django, while re-imagining various aspects of the framework. A djng request object is a Django HttpRequest object; a djng response object is a Django HttpResponse. Django's template language and ORM will be available. Ideally, Django code will run almost entirely unmodified under djng, and vice versa.

Services, not Settings

I dislike Django's settings.py file - I often find I want to reconfigure settings at run-time, and I'm not comfortable with having arbitrary settings for so many different aspects of the framework.

djng experiments with /services/ in place of settings. Services are bits of shared functionality that djng makes available to applications - for example, caching, templating, ORM-ing and mail-sending.

Most of the stuff that Django sets up in settings.py will in djng be set up by configuring services. These services will be designed to be reconfigured at run-time, using a mechanism similar to Django middleware.

Some things that live in settings.py that really don't belong there - middleware for example. These will generally be constructed by composing together a djng application in code.

I'm still figuring out how the syntax for services should work.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].