django-entries-0.1.9
توضیحات
Entries is a helper Django app with CRUD functions based on htmx.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | django-entries-0.1.9 |
| نام | django-entries |
| نسخه کتابخانه | 0.1.9 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Marcelino G. Veloso III |
| ایمیل نویسنده | mars@veloso.one |
| آدرس صفحه اصلی | https://github.com/justmars/django-entries |
| آدرس اینترنتی | https://pypi.org/project/django-entries/ |
| مجوز | MIT |
# django-entries
## Overview
Basic create-read-update-delete (CRUD) functionality for an `Entry` model.
The base [template](./entries/templates/base.html) makes use of light css and javascript:
1. `starter.css` [stylesheet](./entries/static/css/starter.css)
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](./entries/docs/infinity_scroll.md)
4. `hyperscript` 0.9 for client-side reactivity
5. `simplemde` a simple markdown editor
## Quickstart
Install in your virtual environment:
```zsh
.venv> pip3 install django-entries # poetry add django-entries
```
Include package in main project settings file:
```python
# in project_folder/settings.py
INSTALLED_APPS = [
...,
'crispy_forms', # add crispy_forms at least > v1.13, if not yet added
'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('entries.urls')), # new
path("", TemplateView.as_view(template_name="home.html")), # (optional: if fresh project install)
]
```
Add to database:
```zsh
.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:
```zsh
.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
```zsh
.venv> pytest --ds=config.settings --cov
```
نیازمندی
| مقدار | نام |
|---|---|
| >=4.0,<5.0 | Django |
| >=3.1.5,<4.0.0 | django-extensions |
| >=1.13.0,<2.0.0 | django-crispy-forms |
| >=0.10.0,<0.11.0 | markdownify |
| >=3.3.6,<4.0.0 | Markdown |
| >=3.3.8,<4.0.0 | types-Markdown |
| >=4.1.0,<5.0.0 | bleach |
| >=4.1.1,<5.0.0 | types-bleach |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8,<4.0 | Python |
نحوه نصب
نصب پکیج whl django-entries-0.1.9:
pip install django-entries-0.1.9.whl
نصب پکیج tar.gz django-entries-0.1.9:
pip install django-entries-0.1.9.tar.gz