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:
starter.css
stylesheetpylon
0.1.1 for<hstack>
and<vstack>
layoutshtmx
1.6.1 for html-over-the-wire functionality, e.g. infinite scrollinghyperscript
0.9 for client-side reactivitysimplemde
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
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
django_entries-0.1.12.tar.gz
(46.5 kB
view details)
Built Distribution
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9e53ad14b65dd9dd49085c51d08667af400f0e11fc32906f16fc46eda1e4b56 |
|
MD5 | a61b65a7cf8b76483b7b86054e567a94 |
|
BLAKE2b-256 | fc9dac0aa9283012c9f1222bf3568a243a0f24a57a7ff840c5125346b3193b92 |
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
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2b9860aa8e7a6ad027da89257da69a82384ad792e3c3613df3eb5fb6ce31c7a |
|
MD5 | daa6e0c652c99319ec6e29b8c5ab131f |
|
BLAKE2b-256 | a6f990cabc01fb3382e19007d3c659726dcc1dcee1bf80f2086e74b53c9c3a00 |