• Stars
    star
    480
  • Rank 91,562 (Top 2 %)
  • Language
    Python
  • License
    MIT License
  • Created over 4 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Quick CRUD views for Django

Neapolitan

PyPI version

I have a Django model:

from django.db import models

class Bookmark(models.Model):
    url = models.URLField(unique=True)
    title = models.CharField(max_length=255)
    note = models.TextField(blank=True)
    favourite = models.BooleanField(default=False)

I want easy CRUD views for it, without it taking all day:

# urls.py
from neapolitan.views import CRUDView

class BookmarkView(CRUDView):
    model = Bookmark
    fields = ["url", "title", "note"]
    filterset_fields = [
        "favourite",
    ]

urlpatterns = [ ... ] + BookmarkView.get_urls()

Neapolitan's CRUDView provides the standard list, detail, create, edit, and delete views for a model, as well as the hooks you need to be able to customise any part of that.

Neapolitan provides base templates and re-usable template tags to make getting your model on the page as easy as possible.

Where you take your app after that is up to you. But Neapolitan will get you started.

Let's go! ๐Ÿš€

Next stop the docs ๐Ÿš‚

Versioning and Status

Neapolitan uses a two-part CalVer versioning scheme, such as 23.7. The first number is the year. The second is the release number within that year.

This is alpha software. I'm still working out the details of the API, and I've only begun the docs.

But: You could just read neapolitan.views.CRUDView and see what it does. Up to you. ๐Ÿ˜œ

Installation

Install with pip:

pip install neapolitan

Add neapolitan to your INSTALLED_APPS:

INSTALLED_APPS = [
    ...
    "neapolitan",
]

Templates expect a base.html template to exist and for that to defined a content block. (Refs <#6>.)

More Repositories

1

django-filter

A generic system for filtering Django QuerySets based on user selections
Python
4,436
star
2

django-template-partials

Reusable named inline partials for the Django Template Language.
Python
443
star
3

django-unique-user-email

Enable login-by-email with the default User model for your Django project by making auth.User.email unique.
Python
116
star
4

django-sphinx-view

Django Powered Dynamic Sphinx Docs.
Python
51
star
5

djangocon-sprints

Notes for "Getting started contributing to Django" sprints workshop.
28
star
6

Noumenal-PHP-Library

PHP Source and General Resources
PHP
20
star
7

azure-functions-wsgi-adapter

Adapter to run your WSGI application in Azure Functions. ๐ŸŽ‰ NO LONGER NEEDED โ€”ย Azure Functions Python SDK DOES THIS ITSELF NOW.
Python
9
star
8

notes

Being a (Django) open source maintainer discussion group, and my notes on misc.
Python
6
star
9

JavaScript

General resources
Python
5
star
10

django-staticsite

Django static site generator for DEBUG and production
Python
3
star
11

site-starter

Port of HTML5 Boilerplate to Django templates, plus static site generator.
JavaScript
2
star
12

CouchDBX-Redux

Work in progress repo for resurrection of CouchDBX โ€”ย A Mac OS X wrapper for CouchDBX
Objective-C
2
star
13

django-http-benchmarks

A Django project for investigating HTTP performance in various scenarios.
Python
1
star
14

Holiday-Activity

Christmas Tree commit activity from Working Copy.
1
star
15

django_ticket_32539

Python
1
star
16

YouTubePortal

Reusable wrapper around the YouTube mobile site, with options to open in YouTube app and Mobile Safari
Objective-C
1
star