Skip to main content

A crud library for python

Project description

CircleCI ReadTheDocs

django-beam

django-beam provides you with a set of views, templates and integrations for the most common CRUD applications.

The goal is having the functionality provided by django's own admin, but in a way that integrates with your other frontend code.

Features

  • CRUD operations based on class based views
  • Default templates with multiple themes (bootstrap 4, ...)
  • Extensions for common use cases, e.g. export as csv, ...
  • Support for related models (autocompletion, linking, ...)
  • Familiar interfaces

Documentation

See https://django-beam.readthedocs.io/en/latest/

Example

# models.py
class Group(models.Model):
    name = models.TextField()


class Person(models.Model):
    name = models.TextField()
    email = models.EmailField()

    groups = models.ManyToManyField(Group)


# views.py
import beam

class PersonViewSet(beam.ViewSet):
    fields = ['name', 'groups']


class GroupViewSet(beam.ViewSet):
    fields = ['name']


# urls.py
urlpatterns += [
    path('person/', include(PersonViewSet().get_urls())),
    path('group/', include(GroupViewSet().get_urls())),
]


# settings.py
INSTALLED_APPS += [
    "beam",
    "beam.themes.bootstrap4",  # or choose any theme you like
]

Themes

We currently ship two different themes.

  • beam.themes.plain
    Just plain and simple HTML5

  • beam.themes.bootstrap4
    Using default Bootstrap v4 markup and include a basic Bootstrap CSS file.

    In order to use the bootstrap4 theme you have to install the optional dependency django-crispy-forms and add it to your INSTALLED_APPS in settings.py:

    INSTALLED_APPS = (..., 'crispy_forms')
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-beam-0.0.5.tar.gz (8.1 kB view hashes)

Uploaded Source

Built Distribution

django_beam-0.0.5-py3-none-any.whl (12.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page