Simple app to add configuration options to a Django project.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

migrated to poetry

+42 -345
+1
.gitignore
··· 56 56 57 57 # virtual environments 58 58 .env 59 + .venv 59 60 60 61 # Others 61 62 docs/_build
+1 -1
.travis.yml
··· 1 1 language: python 2 2 python: 3 - - "3.6" 4 3 - "3.7" 4 + - "3.8" 5 5 install: 6 6 - pip install coveralls 7 7 - pip install pipenv
+2 -1
AUTHORS.rst
··· 11 11 ------------ 12 12 13 13 * Antoni Aloy (@aaloy) 14 - * Iván Martín (@seik) 14 + * Iván Martín (@seik) 15 + * Salvador Marí (@saruba)
+5
HISTORY.rst
··· 3 3 History 4 4 ------- 5 5 6 + 2.1.2 (2020-07-13) 7 + ++++++++++++++++++ 8 + 9 + * Fixed problem with lists (Thanks to @saruba!) 10 + 6 11 2.1.1 (2019-09-20) 7 12 ++++++++++++++++++ 8 13
-13
Pipfile
··· 1 - [[source]] 2 - url = "https://pypi.org/simple" 3 - verify_ssl = true 4 - name = "pypi" 5 - 6 - [packages] 7 - Django = ">=1.9" 8 - pytest-django = "*" 9 - pytest-cov = "*" 10 - django-rest-framework = "*" 11 - factory-boy = "*" 12 - flit = "*" 13 - pytest = "*"
-281
Pipfile.lock
··· 1 - { 2 - "_meta": { 3 - "hash": { 4 - "sha256": "5ff4dd46a3be6eb20b2e877d1ba9808959ace19525fc40dda1e9eadf46ba6d49" 5 - }, 6 - "pipfile-spec": 6, 7 - "requires": {}, 8 - "sources": [ 9 - { 10 - "name": "pypi", 11 - "url": "https://pypi.org/simple", 12 - "verify_ssl": true 13 - } 14 - ] 15 - }, 16 - "default": { 17 - "atomicwrites": { 18 - "hashes": [ 19 - "sha256:03472c30eb2c5d1ba9227e4c2ca66ab8287fbfbbda3888aa93dc2e28fc6811b4", 20 - "sha256:75a9445bac02d8d058d5e1fe689654ba5a6556a1dfd8ce6ec55a0ed79866cfa6" 21 - ], 22 - "version": "==1.3.0" 23 - }, 24 - "attrs": { 25 - "hashes": [ 26 - "sha256:69c0dbf2ed392de1cb5ec704444b08a5ef81680a61cb899dc08127123af36a79", 27 - "sha256:f0b870f674851ecbfbbbd364d6b5cbdff9dcedbc7f3f5e18a6891057f21fe399" 28 - ], 29 - "version": "==19.1.0" 30 - }, 31 - "certifi": { 32 - "hashes": [ 33 - "sha256:046832c04d4e752f37383b628bc601a7ea7211496b4638f6514d0e5b9acc4939", 34 - "sha256:945e3ba63a0b9f577b1395204e13c3a231f9bc0223888be653286534e5873695" 35 - ], 36 - "version": "==2019.6.16" 37 - }, 38 - "chardet": { 39 - "hashes": [ 40 - "sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae", 41 - "sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691" 42 - ], 43 - "version": "==3.0.4" 44 - }, 45 - "coverage": { 46 - "hashes": [ 47 - "sha256:08907593569fe59baca0bf152c43f3863201efb6113ecb38ce7e97ce339805a6", 48 - "sha256:0be0f1ed45fc0c185cfd4ecc19a1d6532d72f86a2bac9de7e24541febad72650", 49 - "sha256:141f08ed3c4b1847015e2cd62ec06d35e67a3ac185c26f7635f4406b90afa9c5", 50 - "sha256:19e4df788a0581238e9390c85a7a09af39c7b539b29f25c89209e6c3e371270d", 51 - "sha256:23cc09ed395b03424d1ae30dcc292615c1372bfba7141eb85e11e50efaa6b351", 52 - "sha256:245388cda02af78276b479f299bbf3783ef0a6a6273037d7c60dc73b8d8d7755", 53 - "sha256:331cb5115673a20fb131dadd22f5bcaf7677ef758741312bee4937d71a14b2ef", 54 - "sha256:386e2e4090f0bc5df274e720105c342263423e77ee8826002dcffe0c9533dbca", 55 - "sha256:3a794ce50daee01c74a494919d5ebdc23d58873747fa0e288318728533a3e1ca", 56 - "sha256:60851187677b24c6085248f0a0b9b98d49cba7ecc7ec60ba6b9d2e5574ac1ee9", 57 - "sha256:63a9a5fc43b58735f65ed63d2cf43508f462dc49857da70b8980ad78d41d52fc", 58 - "sha256:6b62544bb68106e3f00b21c8930e83e584fdca005d4fffd29bb39fb3ffa03cb5", 59 - "sha256:6ba744056423ef8d450cf627289166da65903885272055fb4b5e113137cfa14f", 60 - "sha256:7494b0b0274c5072bddbfd5b4a6c6f18fbbe1ab1d22a41e99cd2d00c8f96ecfe", 61 - "sha256:826f32b9547c8091679ff292a82aca9c7b9650f9fda3e2ca6bf2ac905b7ce888", 62 - "sha256:93715dffbcd0678057f947f496484e906bf9509f5c1c38fc9ba3922893cda5f5", 63 - "sha256:9a334d6c83dfeadae576b4d633a71620d40d1c379129d587faa42ee3e2a85cce", 64 - "sha256:af7ed8a8aa6957aac47b4268631fa1df984643f07ef00acd374e456364b373f5", 65 - "sha256:bf0a7aed7f5521c7ca67febd57db473af4762b9622254291fbcbb8cd0ba5e33e", 66 - "sha256:bf1ef9eb901113a9805287e090452c05547578eaab1b62e4ad456fcc049a9b7e", 67 - "sha256:c0afd27bc0e307a1ffc04ca5ec010a290e49e3afbe841c5cafc5c5a80ecd81c9", 68 - "sha256:dd579709a87092c6dbee09d1b7cfa81831040705ffa12a1b248935274aee0437", 69 - "sha256:df6712284b2e44a065097846488f66840445eb987eb81b3cc6e4149e7b6982e1", 70 - "sha256:e07d9f1a23e9e93ab5c62902833bf3e4b1f65502927379148b6622686223125c", 71 - "sha256:e2ede7c1d45e65e209d6093b762e98e8318ddeff95317d07a27a2140b80cfd24", 72 - "sha256:e4ef9c164eb55123c62411f5936b5c2e521b12356037b6e1c2617cef45523d47", 73 - "sha256:eca2b7343524e7ba246cab8ff00cab47a2d6d54ada3b02772e908a45675722e2", 74 - "sha256:eee64c616adeff7db37cc37da4180a3a5b6177f5c46b187894e633f088fb5b28", 75 - "sha256:ef824cad1f980d27f26166f86856efe11eff9912c4fed97d3804820d43fa550c", 76 - "sha256:efc89291bd5a08855829a3c522df16d856455297cf35ae827a37edac45f466a7", 77 - "sha256:fa964bae817babece5aa2e8c1af841bebb6d0b9add8e637548809d040443fee0", 78 - "sha256:ff37757e068ae606659c28c3bd0d923f9d29a85de79bf25b2b34b148473b5025" 79 - ], 80 - "version": "==4.5.4" 81 - }, 82 - "django": { 83 - "hashes": [ 84 - "sha256:16a5d54411599780ac9dfe3b9b38f90f785c51259a584e0b24b6f14a7f69aae8", 85 - "sha256:9a2f98211ab474c710fcdad29c82f30fc14ce9917c7a70c3682162a624de4035" 86 - ], 87 - "index": "pypi", 88 - "version": "==2.2.4" 89 - }, 90 - "django-rest-framework": { 91 - "hashes": [ 92 - "sha256:47a8f496fa69e3b6bd79f68dd7a1527d907d6b77f009e9db7cf9bb21cc565e4a" 93 - ], 94 - "index": "pypi", 95 - "version": "==0.1.0" 96 - }, 97 - "djangorestframework": { 98 - "hashes": [ 99 - "sha256:42979bd5441bb4d8fd69d0f385024a114c3cae7df0f110600b718751250f6929", 100 - "sha256:aedb48010ebfab9651aaab1df5fd3b4848eb4182afc909852a2110c24f89a359" 101 - ], 102 - "version": "==3.10.2" 103 - }, 104 - "docutils": { 105 - "hashes": [ 106 - "sha256:6c4f696463b79f1fb8ba0c594b63840ebd41f059e92b31957c46b74a4599b6d0", 107 - "sha256:9e4d7ecfc600058e07ba661411a2b7de2fd0fafa17d1a7f7361cd47b1175c827", 108 - "sha256:a2aeea129088da402665e92e0b25b04b073c04b2dce4ab65caaa38b7ce2e1a99" 109 - ], 110 - "version": "==0.15.2" 111 - }, 112 - "factory-boy": { 113 - "hashes": [ 114 - "sha256:728df59b372c9588b83153facf26d3d28947fc750e8e3c95cefa9bed0e6394ee", 115 - "sha256:faf48d608a1735f0d0a3c9cbf536d64f9132b547dae7ba452c4d99a79e84a370" 116 - ], 117 - "index": "pypi", 118 - "version": "==2.12.0" 119 - }, 120 - "faker": { 121 - "hashes": [ 122 - "sha256:1d3f700e8dfcefd6e657118d71405d53e86974448aba78884f119bbd84c0cddf", 123 - "sha256:d5366e120191c5610fceeebfe1c298dc46da0277096f639c6dd7e2eaee0fa547" 124 - ], 125 - "version": "==2.0.1" 126 - }, 127 - "flit": { 128 - "hashes": [ 129 - "sha256:1d93f7a833ed8a6e120ddc40db5c4763bc39bccc75c05081ec8285ece718aefb", 130 - "sha256:6f6f0fb83c51ffa3a150fa41b5ac118df9ea4a87c2c06dff4ebf9adbe7b52b36" 131 - ], 132 - "index": "pypi", 133 - "version": "==1.3" 134 - }, 135 - "idna": { 136 - "hashes": [ 137 - "sha256:c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407", 138 - "sha256:ea8b7f6188e6fa117537c3df7da9fc686d485087abf6ac197f9c46432f7e4a3c" 139 - ], 140 - "version": "==2.8" 141 - }, 142 - "importlib-metadata": { 143 - "hashes": [ 144 - "sha256:23d3d873e008a513952355379d93cbcab874c58f4f034ff657c7a87422fa64e8", 145 - "sha256:80d2de76188eabfbfcf27e6a37342c2827801e59c4cc14b0371c56fed43820e3" 146 - ], 147 - "markers": "python_version < '3.8'", 148 - "version": "==0.19" 149 - }, 150 - "more-itertools": { 151 - "hashes": [ 152 - "sha256:409cd48d4db7052af495b09dec721011634af3753ae1ef92d2b32f73a745f832", 153 - "sha256:92b8c4b06dac4f0611c0729b2f2ede52b2e1bac1ab48f089c7ddc12e26bb60c4" 154 - ], 155 - "version": "==7.2.0" 156 - }, 157 - "packaging": { 158 - "hashes": [ 159 - "sha256:a7ac867b97fdc07ee80a8058fe4435ccd274ecc3b0ed61d852d7d53055528cf9", 160 - "sha256:c491ca87294da7cc01902edbe30a5bc6c4c28172b5138ab4e4aa1b9d7bfaeafe" 161 - ], 162 - "version": "==19.1" 163 - }, 164 - "pluggy": { 165 - "hashes": [ 166 - "sha256:0825a152ac059776623854c1543d65a4ad408eb3d33ee114dff91e57ec6ae6fc", 167 - "sha256:b9817417e95936bf75d85d3f8767f7df6cdde751fc40aed3bb3074cbcb77757c" 168 - ], 169 - "version": "==0.12.0" 170 - }, 171 - "py": { 172 - "hashes": [ 173 - "sha256:64f65755aee5b381cea27766a3a147c3f15b9b6b9ac88676de66ba2ae36793fa", 174 - "sha256:dc639b046a6e2cff5bbe40194ad65936d6ba360b52b3c3fe1d08a82dd50b5e53" 175 - ], 176 - "version": "==1.8.0" 177 - }, 178 - "pyparsing": { 179 - "hashes": [ 180 - "sha256:6f98a7b9397e206d78cc01df10131398f1c8b8510a2f4d97d9abd82e1aacdd80", 181 - "sha256:d9338df12903bbf5d65a0e4e87c2161968b10d2e489652bb47001d82a9b028b4" 182 - ], 183 - "version": "==2.4.2" 184 - }, 185 - "pytest": { 186 - "hashes": [ 187 - "sha256:95b1f6db806e5b1b5b443efeb58984c24945508f93a866c1719e1a507a957d7c", 188 - "sha256:c3d5020755f70c82eceda3feaf556af9a341334414a8eca521a18f463bcead88" 189 - ], 190 - "index": "pypi", 191 - "version": "==5.1.1" 192 - }, 193 - "pytest-cov": { 194 - "hashes": [ 195 - "sha256:2b097cde81a302e1047331b48cadacf23577e431b61e9c6f49a1170bbe3d3da6", 196 - "sha256:e00ea4fdde970725482f1f35630d12f074e121a23801aabf2ae154ec6bdd343a" 197 - ], 198 - "index": "pypi", 199 - "version": "==2.7.1" 200 - }, 201 - "pytest-django": { 202 - "hashes": [ 203 - "sha256:264fb4c506db5d48a6364c311a0b00b7b48a52715bad8839b2d8bee9b99ed6bb", 204 - "sha256:4adfe5fb3ed47f0ba55506dd3daf688b1f74d5e69148c10ad2dd2f79f40c0d62" 205 - ], 206 - "index": "pypi", 207 - "version": "==3.5.1" 208 - }, 209 - "python-dateutil": { 210 - "hashes": [ 211 - "sha256:7e6584c74aeed623791615e26efd690f29817a27c73085b78e4bad02493df2fb", 212 - "sha256:c89805f6f4d64db21ed966fda138f8a5ed7a4fdbc1a8ee329ce1b74e3c74da9e" 213 - ], 214 - "version": "==2.8.0" 215 - }, 216 - "pytoml": { 217 - "hashes": [ 218 - "sha256:57a21e6347049f73bfb62011ff34cd72774c031b9828cb628a752225136dfc33", 219 - "sha256:8eecf7c8d0adcff3b375b09fe403407aa9b645c499e5ab8cac670ac4a35f61e7" 220 - ], 221 - "version": "==0.1.21" 222 - }, 223 - "pytz": { 224 - "hashes": [ 225 - "sha256:26c0b32e437e54a18161324a2fca3c4b9846b74a8dccddd843113109e1116b32", 226 - "sha256:c894d57500a4cd2d5c71114aaab77dbab5eabd9022308ce5ac9bb93a60a6f0c7" 227 - ], 228 - "version": "==2019.2" 229 - }, 230 - "requests": { 231 - "hashes": [ 232 - "sha256:11e007a8a2aa0323f5a921e9e6a2d7e4e67d9877e85773fba9ba6419025cbeb4", 233 - "sha256:9cf5292fcd0f598c671cfc1e0d7d1a7f13bb8085e9a590f48c010551dc6c4b31" 234 - ], 235 - "version": "==2.22.0" 236 - }, 237 - "six": { 238 - "hashes": [ 239 - "sha256:3350809f0555b11f552448330d0b52d5f24c91a322ea4a15ef22629740f3761c", 240 - "sha256:d16a0141ec1a18405cd4ce8b4613101da75da0e9a7aec5bdd4fa804d0e0eba73" 241 - ], 242 - "version": "==1.12.0" 243 - }, 244 - "sqlparse": { 245 - "hashes": [ 246 - "sha256:40afe6b8d4b1117e7dff5504d7a8ce07d9a1b15aeeade8a2d10f130a834f8177", 247 - "sha256:7c3dca29c022744e95b547e867cee89f4fce4373f3549ccd8797d8eb52cdb873" 248 - ], 249 - "version": "==0.3.0" 250 - }, 251 - "text-unidecode": { 252 - "hashes": [ 253 - "sha256:5a1375bb2ba7968740508ae38d92e1f889a0832913cb1c447d5e2046061a396d", 254 - "sha256:801e38bd550b943563660a91de8d4b6fa5df60a542be9093f7abf819f86050cc" 255 - ], 256 - "version": "==1.2" 257 - }, 258 - "urllib3": { 259 - "hashes": [ 260 - "sha256:b246607a25ac80bedac05c6f282e3cdaf3afb65420fd024ac94435cabe6e18d1", 261 - "sha256:dbe59173209418ae49d485b87d1681aefa36252ee85884c31346debd19463232" 262 - ], 263 - "version": "==1.25.3" 264 - }, 265 - "wcwidth": { 266 - "hashes": [ 267 - "sha256:3df37372226d6e63e1b1e1eda15c594bca98a22d33a23832a90998faa96bc65e", 268 - "sha256:f4ebe71925af7b40a864553f761ed559b43544f8f71746c2d756c7fe788ade7c" 269 - ], 270 - "version": "==0.1.7" 271 - }, 272 - "zipp": { 273 - "hashes": [ 274 - "sha256:3718b1cbcd963c7d4c5511a8240812904164b7f381b647143a89d3b98f9bcd8e", 275 - "sha256:f06903e9f1f43b12d371004b4ac7b06ab39a44adc747266928ae6debfa7b3335" 276 - ], 277 - "version": "==0.6.0" 278 - } 279 - }, 280 - "develop": {} 281 - }
+1 -1
options/__init__.py
··· 14 14 "TYPE_CHOICES", 15 15 "CONVERTER", 16 16 ] 17 - __version__ = "2.1.1" 17 + __version__ = "2.1.2"
+1 -1
options/apps.py
··· 3 3 from django.apps import AppConfig 4 4 from django.db.models.signals import post_migrate 5 5 from django.db.utils import IntegrityError 6 - from django.utils.translation import ugettext_lazy as _ 6 + from django.utils.translation import gettext_lazy as _ 7 7 8 8 from options import get_option_model 9 9 from options.settings import DEFAULT_CONFIGURATION
+1 -1
options/constants.py
··· 1 - from django.utils.translation import ugettext_lazy as _ 1 + from django.utils.translation import gettext_lazy as _ 2 2 3 3 FLOAT, INT, STR, FILE = (0, 1, 2, 3) 4 4 TYPE_CHOICES = (
+1 -1
options/models.py
··· 1 1 from django.conf import settings 2 2 from django.core.exceptions import ValidationError 3 3 from django.db import models 4 - from django.utils.translation import ugettext_lazy as _ 4 + from django.utils.translation import gettext_lazy as _ 5 5 6 6 from options.constants import STR, TYPE_CHOICES, CONVERTER, FILE 7 7 from options.helpers import convert_value, UploadToDir
+1 -1
options/rest_framework/serializers.py
··· 1 - from django.utils.translation import ugettext_lazy as _ 1 + from django.utils.translation import gettext_lazy as _ 2 2 from rest_framework import serializers 3 3 4 4 from options import get_option_model, get_user_option_model
+28 -44
pyproject.toml
··· 1 - [build-system] 2 - requires = ["flit"] 3 - build-backend = "flit.buildapi" 4 - 5 - [tool.flit.metadata] 6 - dist-name = "django-simple-options" 7 - module = "options" 8 - author = "Marcos Gabarda" 9 - author-email = "hey@marcosgabarda.com" 10 - home-page = "https://github.com/marcosgabarda/django-simple-options" 11 - classifiers = [ 12 - "Environment :: Web Environment", 13 - "Framework :: Django", 14 - "Intended Audience :: Developers", 15 - "License :: OSI Approved :: MIT License", 16 - "Operating System :: OS Independent", 17 - "Programming Language :: Python :: 3", 18 - "Topic :: Utilities", 1 + [tool.poetry] 2 + name = "django-websocket-notification" 3 + version = "2.1.2" 4 + description = "A Django package to handle notifications using Django Channels and WebSockets." 5 + readme = "README.rst" 6 + authors = ["Marcos Gabarda <hey@marcosgabarda.com>"] 7 + license = "MIT" 8 + homepage = "https://github.com/marcosgabarda/django-websocket-notifications" 9 + packages = [ 10 + { include = "options" }, 19 11 ] 20 - requires = [ 21 - "django" 22 - ] 23 - description-file = "README.rst" 24 - requires-python=">=3.6" 25 12 26 - [tool.flit.metadata.requires-extra] 27 - test = [ 28 - "pytest", 29 - "pytest-django", 30 - "pytest-cov", 31 - "factory_boy", 13 + classifiers = [ 14 + "Environment :: Web Environment", 15 + "Framework :: Django", 16 + "License :: OSI Approved :: MIT License", 32 17 ] 33 - doc = ["sphinx"] 18 + [tool.poetry.dependencies] 19 + python = "^3.7" 20 + django = "^3.0.7" 21 + djangorestframework = "^3.11.0" 34 22 35 - [tool.tox] 36 - legacy_tox_ini = """ 37 - [tox] 38 - skipsdist=True 39 - envlist = py36,py37 23 + [tool.poetry.dev-dependencies] 24 + pylint = "^2.5.3" 25 + pytest = "^5.4.3" 26 + black = "^19.10b0" 27 + factory_boy = "^2.12.0" 28 + django-test-plus = "^1.4.0" 29 + pytest-django = "^3.9.0" 40 30 41 - [testenv] 42 - deps = 43 - django 44 - pytest 45 - pytest-django 46 - pytest-cov 47 - factory_boy 48 - commands = pytest 49 - """ 31 + [build-system] 32 + requires = ["poetry>=0.12"] 33 + build-backend = "poetry.masonry.api"