A crud library for python
Project description
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')
BSD 3-Clause License
Copyright (c) 2018, django-beam All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-
Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for django_beam-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5dec3ae78cda56192f225a999f53e7d43eacfad1daeee33957ee1afa53158e63 |
|
MD5 | 7ee4a6e4d7da0ef365f34e226c431742 |
|
BLAKE2b-256 | 92b387944c2690c01fd8ccfea496bda08d88fb5f575648849cc46497965247fb |