Skip to main content

django-entries

Overview

Basic create-read-update-delete (CRUD) functionality for an Entry model.

The base template makes use of light css and javascript:

  1. starter.css stylesheet
  2. pylon 0.1.1 for <hstack> and <vstack> layouts
  3. htmx 1.6.1 for html-over-the-wire functionality, e.g. infinite scrolling
  4. hyperscript 0.9 for client-side reactivity
  5. simplemde a 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)

Source distribution for django-entries 0.1.12
File Size Uploaded
django_entries-0.1.12.tar.gz 46.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-entries 0.1.12
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.1.12 This release

2 release files

0.1.11

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

1 release file

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page