diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-05-05 04:49:43 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-05-05 04:49:43 +0000 |
| commit | ed003b9edb9594538536e134aacc103f41ea20f4 (patch) | |
| tree | 43821ad209bd7ff963eacb287f695607b1070aba | |
| parent | 12da9d0af83cbefb5e9cbe2ea63811db25b19788 (diff) | |
automatic import of python-django-quill-editoropeneuler20.03
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | python-django-quill-editor.spec | 610 | ||||
| -rw-r--r-- | sources | 1 |
3 files changed, 612 insertions, 0 deletions
@@ -0,0 +1 @@ +/django-quill-editor-0.1.40.tar.gz diff --git a/python-django-quill-editor.spec b/python-django-quill-editor.spec new file mode 100644 index 0000000..663fd01 --- /dev/null +++ b/python-django-quill-editor.spec @@ -0,0 +1,610 @@ +%global _empty_manifest_terminate_build 0 +Name: python-django-quill-editor +Version: 0.1.40 +Release: 1 +Summary: Integrate Quill editor with Django project. +License: MIT +URL: https://github.com/LeeHanYeong/django-quill-editor +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/71/84/2bf9df521764d1fff3cae7f6dc81f58cd72dc0ee3f3314326faf5f7359b2/django-quill-editor-0.1.40.tar.gz +BuildArch: noarch + +Requires: python3-django + +%description +# django-quill-editor + + + +**django-quill-editor** makes [Quill.js](https://quilljs.com/) easy to use on Django Forms and admin sites + +- **No configuration required for static files!** +- The entire code for inserting WYSIWYG editor is less than 30 lines +- It can be used in both admin and Django views + + + +## Live Demo + +#### https://quill.lhy.kr/ + +- Form | https://quill.lhy.kr/posts/create/normal/ +- ModelForm | https://quill.lhy.kr/posts/create/ +- Form (Initial HTML) | https://quill.lhy.kr/posts/create/normal/html/ +- Form (Initial Text) | https://quill.lhy.kr/posts/create/normal/text/ +- Admin | https://quill.lhy.kr/admin/login/ + + + +## Documentation + +The full document is in [https://django-quill-editor.readthedocs.io/](https://django-quill-editor.readthedocs.io/), including everything about how to use the Form or ModelForm, and where you can add custom settings. + +Please refer to the **QuickStart** section below for simple usage. + + + +## QuickStart + +### Setup + +- Install `django-quill-editor` to your Python environment + + > Requires Python 3.7 or higher and Django 3.1 or higher. + + ```shell + pip install django-quill-editor + ``` + +- Add `django_quill` to `INSTALLED_APPS` in `settings.py` + + ```python + # settings.py + INSTALLED_APPS = [ + 'django.contrib.admin', + ... + 'django_quill', + ] + ``` + +### Making Model + +Add `QuillField` to the **Model class** you want to use. + +> 1. App containing models.py must be added to INSTALLED_APPS +> 2. After adding the app, you need to run makemigrations and migrate to create the DB table. + +```python +# models.py +from django.db import models +from django_quill.fields import QuillField + +class QuillPost(models.Model): + content = QuillField() +``` + +### Using in admin + +Just register the Model in **admin.py** of the app. + +```python +from django.contrib import admin +from .models import QuillPost + +@admin.register(QuillPost) +class QuillPostAdmin(admin.ModelAdmin): + pass +``` + + + + + + + +## Running the Live Demo project in local + +The live demo is a deployment of the **"playground"** package, which is a django application within this library. +After cloning or downloading the repository, you can try running the live demo locally. + +**A Python virtual environment is required to run the project.** + +```shell +# [Optional] We recommend that you start after creating a folder for your project. +mkdir ~/projects +cd projects + +# Clone repository +git clone git@github.com:LeeHanYeong/django-quill-editor.git + +# Go to the project directory and apply the virtual environment +cd django-quill-editor +# [apply venv] + +# Go to the playground package +cd playground + +# Install requirements +pip install -r requirements.txt + +# Run migrate and runserver +python manage.py migrate +python manage.py runserver +``` + +After the above operation, the live demo site works at localhost:8000. + + + +## Contributing + +As an open source project, we welcome contributions. +The code lives on [GitHub](https://github.com/LeeHanYeong/django-quill-editor) + + + +## Distribution tips (for owners) + +### Installation + +```shell +# black +brew install black + +# pre-commit +brew install pre-commit +pre-commit install +``` + +### PyPI Release + +```shell +poetry install # Install PyPI distribution packages +python deploy.py +``` + +### Sphinx docs + +```shell +brew install sphinx-doc # macOS +``` + +#### Local + +``` +cd docs +make html +# ... +# The HTML pages are in _build/html. + +cd _build/html +python -m http.server 3001 +``` + + + +### docker-compose up (in local) + +```shell +docker-compose -f docker-compose-local.yml up --build --force-recreate --remove-orphans +``` + + + + + +%package -n python3-django-quill-editor +Summary: Integrate Quill editor with Django project. +Provides: python-django-quill-editor +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-django-quill-editor +# django-quill-editor + + + +**django-quill-editor** makes [Quill.js](https://quilljs.com/) easy to use on Django Forms and admin sites + +- **No configuration required for static files!** +- The entire code for inserting WYSIWYG editor is less than 30 lines +- It can be used in both admin and Django views + + + +## Live Demo + +#### https://quill.lhy.kr/ + +- Form | https://quill.lhy.kr/posts/create/normal/ +- ModelForm | https://quill.lhy.kr/posts/create/ +- Form (Initial HTML) | https://quill.lhy.kr/posts/create/normal/html/ +- Form (Initial Text) | https://quill.lhy.kr/posts/create/normal/text/ +- Admin | https://quill.lhy.kr/admin/login/ + + + +## Documentation + +The full document is in [https://django-quill-editor.readthedocs.io/](https://django-quill-editor.readthedocs.io/), including everything about how to use the Form or ModelForm, and where you can add custom settings. + +Please refer to the **QuickStart** section below for simple usage. + + + +## QuickStart + +### Setup + +- Install `django-quill-editor` to your Python environment + + > Requires Python 3.7 or higher and Django 3.1 or higher. + + ```shell + pip install django-quill-editor + ``` + +- Add `django_quill` to `INSTALLED_APPS` in `settings.py` + + ```python + # settings.py + INSTALLED_APPS = [ + 'django.contrib.admin', + ... + 'django_quill', + ] + ``` + +### Making Model + +Add `QuillField` to the **Model class** you want to use. + +> 1. App containing models.py must be added to INSTALLED_APPS +> 2. After adding the app, you need to run makemigrations and migrate to create the DB table. + +```python +# models.py +from django.db import models +from django_quill.fields import QuillField + +class QuillPost(models.Model): + content = QuillField() +``` + +### Using in admin + +Just register the Model in **admin.py** of the app. + +```python +from django.contrib import admin +from .models import QuillPost + +@admin.register(QuillPost) +class QuillPostAdmin(admin.ModelAdmin): + pass +``` + + + + + + + +## Running the Live Demo project in local + +The live demo is a deployment of the **"playground"** package, which is a django application within this library. +After cloning or downloading the repository, you can try running the live demo locally. + +**A Python virtual environment is required to run the project.** + +```shell +# [Optional] We recommend that you start after creating a folder for your project. +mkdir ~/projects +cd projects + +# Clone repository +git clone git@github.com:LeeHanYeong/django-quill-editor.git + +# Go to the project directory and apply the virtual environment +cd django-quill-editor +# [apply venv] + +# Go to the playground package +cd playground + +# Install requirements +pip install -r requirements.txt + +# Run migrate and runserver +python manage.py migrate +python manage.py runserver +``` + +After the above operation, the live demo site works at localhost:8000. + + + +## Contributing + +As an open source project, we welcome contributions. +The code lives on [GitHub](https://github.com/LeeHanYeong/django-quill-editor) + + + +## Distribution tips (for owners) + +### Installation + +```shell +# black +brew install black + +# pre-commit +brew install pre-commit +pre-commit install +``` + +### PyPI Release + +```shell +poetry install # Install PyPI distribution packages +python deploy.py +``` + +### Sphinx docs + +```shell +brew install sphinx-doc # macOS +``` + +#### Local + +``` +cd docs +make html +# ... +# The HTML pages are in _build/html. + +cd _build/html +python -m http.server 3001 +``` + + + +### docker-compose up (in local) + +```shell +docker-compose -f docker-compose-local.yml up --build --force-recreate --remove-orphans +``` + + + + + +%package help +Summary: Development documents and examples for django-quill-editor +Provides: python3-django-quill-editor-doc +%description help +# django-quill-editor + + + +**django-quill-editor** makes [Quill.js](https://quilljs.com/) easy to use on Django Forms and admin sites + +- **No configuration required for static files!** +- The entire code for inserting WYSIWYG editor is less than 30 lines +- It can be used in both admin and Django views + + + +## Live Demo + +#### https://quill.lhy.kr/ + +- Form | https://quill.lhy.kr/posts/create/normal/ +- ModelForm | https://quill.lhy.kr/posts/create/ +- Form (Initial HTML) | https://quill.lhy.kr/posts/create/normal/html/ +- Form (Initial Text) | https://quill.lhy.kr/posts/create/normal/text/ +- Admin | https://quill.lhy.kr/admin/login/ + + + +## Documentation + +The full document is in [https://django-quill-editor.readthedocs.io/](https://django-quill-editor.readthedocs.io/), including everything about how to use the Form or ModelForm, and where you can add custom settings. + +Please refer to the **QuickStart** section below for simple usage. + + + +## QuickStart + +### Setup + +- Install `django-quill-editor` to your Python environment + + > Requires Python 3.7 or higher and Django 3.1 or higher. + + ```shell + pip install django-quill-editor + ``` + +- Add `django_quill` to `INSTALLED_APPS` in `settings.py` + + ```python + # settings.py + INSTALLED_APPS = [ + 'django.contrib.admin', + ... + 'django_quill', + ] + ``` + +### Making Model + +Add `QuillField` to the **Model class** you want to use. + +> 1. App containing models.py must be added to INSTALLED_APPS +> 2. After adding the app, you need to run makemigrations and migrate to create the DB table. + +```python +# models.py +from django.db import models +from django_quill.fields import QuillField + +class QuillPost(models.Model): + content = QuillField() +``` + +### Using in admin + +Just register the Model in **admin.py** of the app. + +```python +from django.contrib import admin +from .models import QuillPost + +@admin.register(QuillPost) +class QuillPostAdmin(admin.ModelAdmin): + pass +``` + + + + + + + +## Running the Live Demo project in local + +The live demo is a deployment of the **"playground"** package, which is a django application within this library. +After cloning or downloading the repository, you can try running the live demo locally. + +**A Python virtual environment is required to run the project.** + +```shell +# [Optional] We recommend that you start after creating a folder for your project. +mkdir ~/projects +cd projects + +# Clone repository +git clone git@github.com:LeeHanYeong/django-quill-editor.git + +# Go to the project directory and apply the virtual environment +cd django-quill-editor +# [apply venv] + +# Go to the playground package +cd playground + +# Install requirements +pip install -r requirements.txt + +# Run migrate and runserver +python manage.py migrate +python manage.py runserver +``` + +After the above operation, the live demo site works at localhost:8000. + + + +## Contributing + +As an open source project, we welcome contributions. +The code lives on [GitHub](https://github.com/LeeHanYeong/django-quill-editor) + + + +## Distribution tips (for owners) + +### Installation + +```shell +# black +brew install black + +# pre-commit +brew install pre-commit +pre-commit install +``` + +### PyPI Release + +```shell +poetry install # Install PyPI distribution packages +python deploy.py +``` + +### Sphinx docs + +```shell +brew install sphinx-doc # macOS +``` + +#### Local + +``` +cd docs +make html +# ... +# The HTML pages are in _build/html. + +cd _build/html +python -m http.server 3001 +``` + + + +### docker-compose up (in local) + +```shell +docker-compose -f docker-compose-local.yml up --build --force-recreate --remove-orphans +``` + + + + + +%prep +%autosetup -n django-quill-editor-0.1.40 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-django-quill-editor -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 0.1.40-1 +- Package Spec generated @@ -0,0 +1 @@ +c78192622ab98d91438cd9519066d2a0 django-quill-editor-0.1.40.tar.gz |
