django-entries
Overview
Basic create-read-update-delete (CRUD) functionality for an Entry model.
The base template makes use of light css and javascript:
starter.cssstylesheetpylon0.1.1 for<hstack>and<vstack>layoutshtmx1.6.1 for html-over-the-wire functionality, e.g. infinite scrollinghyperscript0.9 for client-side reactivitysimplemdea simple markdown editor
Quickstart
Install in your virtual environment:
.venv> pip3 install django-entries # poetry add django-entries
Include package in main project settings file:
# in project_folder/settings.py
INSTALLED_APPS = [..., "django_entries"] # this is the new django-entries folder
# in project_folder/urls.py
from django.views.generic import TemplateView
from django.urls import path, include # new
urlpatterns = [
...,
path("entry/", include("django_entries.urls")), # new
path(
"", TemplateView.as_view(template_name="home.html")
), # (optional: if fresh project install)
]
Add to database:
.venv> python manage.py migrate # adds the `Entry` model to the database.
.venv> python manage.py createsuperuser # (optional: if fresh project install)
Login to add:
.venv> `python manage.py runserver`
# Visit http://127.0.0.1:8000/entry/entries/list
# Assumes _entry_ as folder in config/urls.py
# The `Add entry` button is only visible to logged in users.
# Can login via admin using the superuser account http://127.0.0.1:8000/admin/
# Visit the list page again at http://127.0.0.1:8000/entry/entries/list to see the `Add entry` button.
Test
.venv> pytest
Metadata
Release files for django-entries 0.1.12
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django_entries-0.1.12.tar.gz | 46.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_entries-0.1.12-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 98.1 kB
Release files / django_entries-0.1.12.tar.gz
| Download URL | django_entries-0.1.12.tar.gz |
|---|---|
| Size | 46.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a9e53ad14b65dd9dd49085c51d08667af400f0e11fc32906f16fc46eda1e4b56
|
|
BLAKE2b-256 checksum How to use checksums |
fc9dac0aa9283012c9f1222bf3568a243a0f24a57a7ff840c5125346b3193b92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.10.6 Darwin/22.4.0
|
Release files / django_entries-0.1.12-py3-none-any.whl
| Download URL | django_entries-0.1.12-py3-none-any.whl |
|---|---|
| Size | 51.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b2b9860aa8e7a6ad027da89257da69a82384ad792e3c3613df3eb5fb6ce31c7a
|
|
BLAKE2b-256 checksum How to use checksums |
a6f990cabc01fb3382e19007d3c659726dcc1dcee1bf80f2086e74b53c9c3a00
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.10.6 Darwin/22.4.0
|