Skip to main content

Entries is a helper Django app, CRUD.

Project description

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

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_entries-0.1.12.tar.gz (46.5 kB view details)

Uploaded Source

Built Distribution

django_entries-0.1.12-py3-none-any.whl (51.6 kB view details)

Uploaded Python 3

File details

Details for the file django_entries-0.1.12.tar.gz.

File metadata

  • Download URL: django_entries-0.1.12.tar.gz
  • Upload date:
  • Size: 46.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.6 Darwin/22.4.0

File hashes

Hashes for django_entries-0.1.12.tar.gz
Algorithm Hash digest
SHA256 a9e53ad14b65dd9dd49085c51d08667af400f0e11fc32906f16fc46eda1e4b56
MD5 a61b65a7cf8b76483b7b86054e567a94
BLAKE2b-256 fc9dac0aa9283012c9f1222bf3568a243a0f24a57a7ff840c5125346b3193b92

See more details on using hashes here.

File details

Details for the file django_entries-0.1.12-py3-none-any.whl.

File metadata

  • Download URL: django_entries-0.1.12-py3-none-any.whl
  • Upload date:
  • Size: 51.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.6 Darwin/22.4.0

File hashes

Hashes for django_entries-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 b2b9860aa8e7a6ad027da89257da69a82384ad792e3c3613df3eb5fb6ce31c7a
MD5 daa6e0c652c99319ec6e29b8c5ab131f
BLAKE2b-256 a6f990cabc01fb3382e19007d3c659726dcc1dcee1bf80f2086e74b53c9c3a00

See more details on using hashes here.

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