summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-06-20 05:09:48 +0000
committerCoprDistGit <infra@openeuler.org>2023-06-20 05:09:48 +0000
commit74562bec98316aea458266d2dddd1583ff7cb797 (patch)
treea662d40145965e8956c27f820d51cb620ff64ed3
parentecf0c2ef9ad7263f41f3b50a30615d50c063d0c5 (diff)
automatic import of python-django-simplemdeopeneuler20.03
-rw-r--r--.gitignore1
-rw-r--r--python-django-simplemde.spec231
-rw-r--r--sources1
3 files changed, 233 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..5a454a1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/django-simplemde-0.1.4.tar.gz
diff --git a/python-django-simplemde.spec b/python-django-simplemde.spec
new file mode 100644
index 0000000..661322f
--- /dev/null
+++ b/python-django-simplemde.spec
@@ -0,0 +1,231 @@
+%global _empty_manifest_terminate_build 0
+Name: python-django-simplemde
+Version: 0.1.4
+Release: 1
+Summary: django-simplemde is a WYSIWYG markdown editor for Django
+License: MIT
+URL: https://github.com/onepill/django-simplemde
+Source0: https://mirrors.aliyun.com/pypi/web/packages/4c/47/8542fdb6f3d599778bbaadc8d3898f700d1d43355a86d917d035d1ead03c/django-simplemde-0.1.4.tar.gz
+BuildArch: noarch
+
+
+%description
+# A markdown editor(with preview) for Django
+Use markdown editor https://github.com/sparksuite/simplemde-markdown-editor in django project, this project is inspired by https://github.com/douglasmiranda/django-wysiwyg-redactor/
+
+# Getting started
+* install django-simplemde
+```
+pip install django-simplemde
+```
+
+* add 'simplemde' to INSTALLED_APPS.
+
+```python
+INSTALLED_APPS = (
+ # ...
+ 'simplemde',
+ # ...
+)
+```
+
+# Using in models
+```python
+from django.db import models
+from simplemde.fields import SimpleMDEField
+
+class Entry(models.Model):
+ title = models.CharField(max_length=250, verbose_name=u'Title')
+ content = SimpleMDEField(verbose_name=u'mardown content')
+```
+
+# SimpleMDE options
+You could set SimpleMDE options in settings.py like this:
+
+```python
+SIMPLEMDE_OPTIONS = {
+ 'placeholder': 'haha',
+ 'status': False,
+ 'autosave': {
+ 'enabled': True
+ }
+}
+```
+
+Right now this plugin supports [SimpleMDE Configurations](https://github.com/sparksuite/simplemde-markdown-editor#configuration), but only the static ones(don't support js configurations like ```previewRender```)
+
+***for autosave option, you dont need to set it, this plugin will generate uniqueId with python's uuid.uuid4 automatically***
+
+# Get SimpleMDE instance from DOM
+
+After SimpleMDE initialized, you could get SimpleMDE instance from dom element like this:
+
+```javascript
+$('.simplemde-box')[0].SimpleMDE
+```
+
+
+%package -n python3-django-simplemde
+Summary: django-simplemde is a WYSIWYG markdown editor for Django
+Provides: python-django-simplemde
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-django-simplemde
+# A markdown editor(with preview) for Django
+Use markdown editor https://github.com/sparksuite/simplemde-markdown-editor in django project, this project is inspired by https://github.com/douglasmiranda/django-wysiwyg-redactor/
+
+# Getting started
+* install django-simplemde
+```
+pip install django-simplemde
+```
+
+* add 'simplemde' to INSTALLED_APPS.
+
+```python
+INSTALLED_APPS = (
+ # ...
+ 'simplemde',
+ # ...
+)
+```
+
+# Using in models
+```python
+from django.db import models
+from simplemde.fields import SimpleMDEField
+
+class Entry(models.Model):
+ title = models.CharField(max_length=250, verbose_name=u'Title')
+ content = SimpleMDEField(verbose_name=u'mardown content')
+```
+
+# SimpleMDE options
+You could set SimpleMDE options in settings.py like this:
+
+```python
+SIMPLEMDE_OPTIONS = {
+ 'placeholder': 'haha',
+ 'status': False,
+ 'autosave': {
+ 'enabled': True
+ }
+}
+```
+
+Right now this plugin supports [SimpleMDE Configurations](https://github.com/sparksuite/simplemde-markdown-editor#configuration), but only the static ones(don't support js configurations like ```previewRender```)
+
+***for autosave option, you dont need to set it, this plugin will generate uniqueId with python's uuid.uuid4 automatically***
+
+# Get SimpleMDE instance from DOM
+
+After SimpleMDE initialized, you could get SimpleMDE instance from dom element like this:
+
+```javascript
+$('.simplemde-box')[0].SimpleMDE
+```
+
+
+%package help
+Summary: Development documents and examples for django-simplemde
+Provides: python3-django-simplemde-doc
+%description help
+# A markdown editor(with preview) for Django
+Use markdown editor https://github.com/sparksuite/simplemde-markdown-editor in django project, this project is inspired by https://github.com/douglasmiranda/django-wysiwyg-redactor/
+
+# Getting started
+* install django-simplemde
+```
+pip install django-simplemde
+```
+
+* add 'simplemde' to INSTALLED_APPS.
+
+```python
+INSTALLED_APPS = (
+ # ...
+ 'simplemde',
+ # ...
+)
+```
+
+# Using in models
+```python
+from django.db import models
+from simplemde.fields import SimpleMDEField
+
+class Entry(models.Model):
+ title = models.CharField(max_length=250, verbose_name=u'Title')
+ content = SimpleMDEField(verbose_name=u'mardown content')
+```
+
+# SimpleMDE options
+You could set SimpleMDE options in settings.py like this:
+
+```python
+SIMPLEMDE_OPTIONS = {
+ 'placeholder': 'haha',
+ 'status': False,
+ 'autosave': {
+ 'enabled': True
+ }
+}
+```
+
+Right now this plugin supports [SimpleMDE Configurations](https://github.com/sparksuite/simplemde-markdown-editor#configuration), but only the static ones(don't support js configurations like ```previewRender```)
+
+***for autosave option, you dont need to set it, this plugin will generate uniqueId with python's uuid.uuid4 automatically***
+
+# Get SimpleMDE instance from DOM
+
+After SimpleMDE initialized, you could get SimpleMDE instance from dom element like this:
+
+```javascript
+$('.simplemde-box')[0].SimpleMDE
+```
+
+
+%prep
+%autosetup -n django-simplemde-0.1.4
+
+%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-simplemde -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Tue Jun 20 2023 Python_Bot <Python_Bot@openeuler.org> - 0.1.4-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..cdb7b3d
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+f08f17a9cc592a0f7c28012721193c82 django-simplemde-0.1.4.tar.gz