From 9b042c3be5e52da3d6231d7fd551b6eede429b3a Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Mon, 8 Apr 2019 11:47:36 +0100 Subject: Add django-wiki, and downgrade to Django 2.1 Downgrade required by django-wiki for now --- Pipfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Pipfile') diff --git a/Pipfile b/Pipfile index 932746d2..1fd34c35 100644 --- a/Pipfile +++ b/Pipfile @@ -16,7 +16,7 @@ coverage = "~=4.5.3" unittest-xml-reporting = "~=2.5.1" [packages] -django = "~=2.2" +django = "~=2.1" django-crispy-forms = "~=1.7.2" django-environ = "~=0.4.5" django-filter = "~=2.1.0" @@ -27,6 +27,7 @@ uwsgi = "~=2.0.18" psycopg2-binary = "~=2.8" django-simple-bulma = ">=1.1.6,<2.0" django-crispy-bulma = ">=0.1.2,<2.0" +wiki = "~=0.4.4" [requires] python_version = "3.7" -- cgit v1.2.3 From 4dc58e6e14702989f7419d6bfc4ca589898f2e56 Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Mon, 8 Apr 2019 14:05:50 +0100 Subject: Remove wiki host, use /wiki - Also some wiki config I've included the monokai pygments theme, but we can change it later --- .dockerignore | 2 - Pipfile | 1 + Pipfile.lock | 10 ++++- pydis_site/apps/home/urls.py | 7 +-- pydis_site/apps/wiki_container/__init__.py | 0 pydis_site/apps/wiki_container/apps.py | 6 --- pydis_site/apps/wiki_container/urls.py | 6 --- pydis_site/hosts.py | 3 +- pydis_site/settings.py | 29 ++++++++++++- pydis_site/static/css/pygments.css | 70 ++++++++++++++++++++++++++++++ 10 files changed, 113 insertions(+), 21 deletions(-) delete mode 100644 pydis_site/apps/wiki_container/__init__.py delete mode 100644 pydis_site/apps/wiki_container/apps.py delete mode 100644 pydis_site/apps/wiki_container/urls.py create mode 100644 pydis_site/static/css/pygments.css (limited to 'Pipfile') diff --git a/.dockerignore b/.dockerignore index ca6ba308..4ad7c8a7 100644 --- a/.dockerignore +++ b/.dockerignore @@ -31,5 +31,3 @@ README.md scripts Vagrantfile venv -pydis_site/apps/wiki/tests -pydis_site/apps/wiki/tests.py diff --git a/Pipfile b/Pipfile index 1fd34c35..c6f210ab 100644 --- a/Pipfile +++ b/Pipfile @@ -28,6 +28,7 @@ psycopg2-binary = "~=2.8" django-simple-bulma = ">=1.1.6,<2.0" django-crispy-bulma = ">=0.1.2,<2.0" wiki = "~=0.4.4" +pygments = "~=2.3.1" [requires] python_version = "3.7" diff --git a/Pipfile.lock b/Pipfile.lock index a908b8c7..777dbd38 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "a63ccdec81594bd69f4af503e5a62fe01a74adfd6daaaa0fb9be08b25631cb84" + "sha256": "d6bbf11476ca021d14ef03475ef6154b148d75a3ceada522194a56e80a27ccf1" }, "pipfile-spec": 6, "requires": { @@ -229,6 +229,14 @@ "index": "pypi", "version": "==2.8.1" }, + "pygments": { + "hashes": [ + "sha256:5ffada19f6203563680669ee7f53b64dabbeb100eb51b61996085e99c03b284a", + "sha256:e8218dd399a61674745138520d0d4cf2621d7e032439341bc3f647bff125818d" + ], + "index": "pypi", + "version": "==2.3.1" + }, "pytz": { "hashes": [ "sha256:32b0891edff07e28efe91284ed9c31e123d84bea3fd98e1f72be2508f43ef8d9", diff --git a/pydis_site/apps/home/urls.py b/pydis_site/apps/home/urls.py index a01e019e..ede0531e 100644 --- a/pydis_site/apps/home/urls.py +++ b/pydis_site/apps/home/urls.py @@ -1,10 +1,11 @@ from django.contrib import admin -from django.urls import path +from django.urls import path, include from django.views.generic import TemplateView app_name = 'home' urlpatterns = [ - path('', TemplateView.as_view(template_name='home/index.html'), name='index'), - path('admin/', admin.site.urls) + path('admin/', admin.site.urls), + path('wiki/', include('wiki.urls')), + path('/', TemplateView.as_view(template_name='home/index.html'), name='index'), ] diff --git a/pydis_site/apps/wiki_container/__init__.py b/pydis_site/apps/wiki_container/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/pydis_site/apps/wiki_container/apps.py b/pydis_site/apps/wiki_container/apps.py deleted file mode 100644 index 874ae8e4..00000000 --- a/pydis_site/apps/wiki_container/apps.py +++ /dev/null @@ -1,6 +0,0 @@ -from wiki.apps import WikiConfig - - -class WikiContainerConfig(WikiConfig): - name = 'wiki_container' - default_site = 'pydis_site.sites.PyDisWikiSite' diff --git a/pydis_site/apps/wiki_container/urls.py b/pydis_site/apps/wiki_container/urls.py deleted file mode 100644 index 1537fe8c..00000000 --- a/pydis_site/apps/wiki_container/urls.py +++ /dev/null @@ -1,6 +0,0 @@ -from django.urls import path, include - -urlpatterns = [ - path('notifications/', include('django_nyt.urls')), - path('', include('wiki.urls')) -] diff --git a/pydis_site/hosts.py b/pydis_site/hosts.py index fc43d0eb..25220ee0 100644 --- a/pydis_site/hosts.py +++ b/pydis_site/hosts.py @@ -3,8 +3,7 @@ from django_hosts import host, patterns host_patterns = patterns( '', - # host(r"subdomain pattern", "URLs module", "host entry name") - host(r'wiki', 'pydis_site.apps.wiki_container.urls', name="wiki"), + # host(r"subdomain pattern", "URLs module", "host entry name"), host(r'admin', 'pydis_site.apps.admin.urls', name="admin"), host(r'api', 'pydis_site.apps.api.urls', name='api'), host(r'.*', 'pydis_site.apps.home.urls', name=settings.DEFAULT_HOST) diff --git a/pydis_site/settings.py b/pydis_site/settings.py index 2212da21..e55b3132 100644 --- a/pydis_site/settings.py +++ b/pydis_site/settings.py @@ -64,7 +64,6 @@ else: INSTALLED_APPS = [ 'pydis_site.apps.api', 'pydis_site.apps.home', - 'pydis_site.apps.wiki_container', 'django.contrib.admin', 'django.contrib.auth', @@ -277,3 +276,31 @@ SITE_ID = 1 WIKI_ACCOUNT_HANDLING = False WIKI_ACCOUNT_SIGNUP_ALLOWED = False + +WIKI_ANONYMOUS = True +WIKI_ANONYMOUS_CREATE = DEBUG +WIKI_ANONYMOUS_UPLOAD = DEBUG +WIKI_ANONYMOUS_WRITE = DEBUG + +WIKI_MARKDOWN_KWARGS = { + "extension_configs": { + "wiki.plugins.macros.mdx.toc": { + "title": "Contents" + } + }, "extensions": [ + "markdown.extensions.abbr", + "markdown.extensions.attr_list", + "markdown.extensions.extra", + "markdown.extensions.fenced_code", + "markdown.extensions.footnotes", + "markdown.extensions.nl2br", + "markdown.extensions.sane_lists", + + "wiki.core.markdown.mdx.codehilite", + "wiki.core.markdown.mdx.previewlinks", + "wiki.core.markdown.mdx.responsivetable", + "wiki.plugins.macros.mdx.macro", + "wiki.plugins.macros.mdx.toc", + "wiki.plugins.macros.mdx.wikilinks", + ] +} diff --git a/pydis_site/static/css/pygments.css b/pydis_site/static/css/pygments.css new file mode 100644 index 00000000..d2e9fc72 --- /dev/null +++ b/pydis_site/static/css/pygments.css @@ -0,0 +1,70 @@ +.codehilite .hll { background-color: #49483e } +.codehilite { background: #272822; color: #f8f8f2 } +.codehilite .c { color: #75715e } /* Comment */ +.codehilite .err { color: #960050; background-color: #1e0010 } /* Error */ +.codehilite .k { color: #66d9ef } /* Keyword */ +.codehilite .l { color: #ae81ff } /* Literal */ +.codehilite .n { color: #f8f8f2 } /* Name */ +.codehilite .o { color: #f92672 } /* Operator */ +.codehilite .p { color: #f8f8f2 } /* Punctuation */ +.codehilite .ch { color: #75715e } /* Comment.Hashbang */ +.codehilite .cm { color: #75715e } /* Comment.Multiline */ +.codehilite .cp { color: #75715e } /* Comment.Preproc */ +.codehilite .cpf { color: #75715e } /* Comment.PreprocFile */ +.codehilite .c1 { color: #75715e } /* Comment.Single */ +.codehilite .cs { color: #75715e } /* Comment.Special */ +.codehilite .gd { color: #f92672 } /* Generic.Deleted */ +.codehilite .ge { font-style: italic } /* Generic.Emph */ +.codehilite .gi { color: #a6e22e } /* Generic.Inserted */ +.codehilite .gs { font-weight: bold } /* Generic.Strong */ +.codehilite .gu { color: #75715e } /* Generic.Subheading */ +.codehilite .kc { color: #66d9ef } /* Keyword.Constant */ +.codehilite .kd { color: #66d9ef } /* Keyword.Declaration */ +.codehilite .kn { color: #f92672 } /* Keyword.Namespace */ +.codehilite .kp { color: #66d9ef } /* Keyword.Pseudo */ +.codehilite .kr { color: #66d9ef } /* Keyword.Reserved */ +.codehilite .kt { color: #66d9ef } /* Keyword.Type */ +.codehilite .ld { color: #e6db74 } /* Literal.Date */ +.codehilite .m { color: #ae81ff } /* Literal.Number */ +.codehilite .s { color: #e6db74 } /* Literal.String */ +.codehilite .na { color: #a6e22e } /* Name.Attribute */ +.codehilite .nb { color: #f8f8f2 } /* Name.Builtin */ +.codehilite .nc { color: #a6e22e } /* Name.Class */ +.codehilite .no { color: #66d9ef } /* Name.Constant */ +.codehilite .nd { color: #a6e22e } /* Name.Decorator */ +.codehilite .ni { color: #f8f8f2 } /* Name.Entity */ +.codehilite .ne { color: #a6e22e } /* Name.Exception */ +.codehilite .nf { color: #a6e22e } /* Name.Function */ +.codehilite .nl { color: #f8f8f2 } /* Name.Label */ +.codehilite .nn { color: #f8f8f2 } /* Name.Namespace */ +.codehilite .nx { color: #a6e22e } /* Name.Other */ +.codehilite .py { color: #f8f8f2 } /* Name.Property */ +.codehilite .nt { color: #f92672 } /* Name.Tag */ +.codehilite .nv { color: #f8f8f2 } /* Name.Variable */ +.codehilite .ow { color: #f92672 } /* Operator.Word */ +.codehilite .w { color: #f8f8f2 } /* Text.Whitespace */ +.codehilite .mb { color: #ae81ff } /* Literal.Number.Bin */ +.codehilite .mf { color: #ae81ff } /* Literal.Number.Float */ +.codehilite .mh { color: #ae81ff } /* Literal.Number.Hex */ +.codehilite .mi { color: #ae81ff } /* Literal.Number.Integer */ +.codehilite .mo { color: #ae81ff } /* Literal.Number.Oct */ +.codehilite .sa { color: #e6db74 } /* Literal.String.Affix */ +.codehilite .sb { color: #e6db74 } /* Literal.String.Backtick */ +.codehilite .sc { color: #e6db74 } /* Literal.String.Char */ +.codehilite .dl { color: #e6db74 } /* Literal.String.Delimiter */ +.codehilite .sd { color: #e6db74 } /* Literal.String.Doc */ +.codehilite .s2 { color: #e6db74 } /* Literal.String.Double */ +.codehilite .se { color: #ae81ff } /* Literal.String.Escape */ +.codehilite .sh { color: #e6db74 } /* Literal.String.Heredoc */ +.codehilite .si { color: #e6db74 } /* Literal.String.Interpol */ +.codehilite .sx { color: #e6db74 } /* Literal.String.Other */ +.codehilite .sr { color: #e6db74 } /* Literal.String.Regex */ +.codehilite .s1 { color: #e6db74 } /* Literal.String.Single */ +.codehilite .ss { color: #e6db74 } /* Literal.String.Symbol */ +.codehilite .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */ +.codehilite .fm { color: #a6e22e } /* Name.Function.Magic */ +.codehilite .vc { color: #f8f8f2 } /* Name.Variable.Class */ +.codehilite .vg { color: #f8f8f2 } /* Name.Variable.Global */ +.codehilite .vi { color: #f8f8f2 } /* Name.Variable.Instance */ +.codehilite .vm { color: #f8f8f2 } /* Name.Variable.Magic */ +.codehilite .il { color: #ae81ff } /* Literal.Number.Integer.Long */ -- cgit v1.2.3 From 14e98f1e790c85e761c9ead44160ac1174f808d2 Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Fri, 19 Apr 2019 17:59:55 +0100 Subject: Lint and update django-simple-bulma --- Pipfile | 2 +- Pipfile.lock | 77 +++++++++++----------- pydis_site/apps/home/templatetags/wiki_extra.py | 4 +- .../apps/home/tests/test_wiki_templatetags.py | 5 +- pydis_site/apps/home/urls.py | 2 +- pydis_site/settings.py | 8 +-- 6 files changed, 49 insertions(+), 49 deletions(-) (limited to 'Pipfile') diff --git a/Pipfile b/Pipfile index c6f210ab..d45db4d5 100644 --- a/Pipfile +++ b/Pipfile @@ -25,7 +25,7 @@ djangorestframework = "~=3.9.2" djangorestframework-bulk = "~=0.2.1" uwsgi = "~=2.0.18" psycopg2-binary = "~=2.8" -django-simple-bulma = ">=1.1.6,<2.0" +django-simple-bulma = ">=1.1.7,<2.0" django-crispy-bulma = ">=0.1.2,<2.0" wiki = "~=0.4.4" pygments = "~=2.3.1" diff --git a/Pipfile.lock b/Pipfile.lock index 777dbd38..071c3887 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "d6bbf11476ca021d14ef03475ef6154b148d75a3ceada522194a56e80a27ccf1" + "sha256": "3e41d1f5aeff03b49de55ef5086b975ecb0f74341870622237e553e7a1190116" }, "pipfile-spec": 6, "requires": { @@ -101,18 +101,17 @@ }, "django-sekizai": { "hashes": [ - "sha256:39c5d16ad694aa78278ca84fdc7b9f953ebcf94e2fc95b68c875d02014303260", - "sha256:cbd48e7be29e8cc4108476b9420d7c391fc509a504bc20b60616b116ba6ea51e" + "sha256:642a3356fe92fe9b5ccc97f320b64edd2cfcb3b2fbb113e8a26dad9a1f3b5e14" ], - "version": "==0.10.0" + "version": "==1.0.0" }, "django-simple-bulma": { "hashes": [ - "sha256:420042e26dd4bc70b148fc721bd77a48130b62b3d91b977e56f8232a4cfac555", - "sha256:beb323aa1c51e5efee398b6e5a2b481b31a0be7505e3118d140c65349f637100" + "sha256:7dcc04a11b5a3aefb6ec57cb211c161df8421ea333638e03c9e7db87465fead2", + "sha256:f4bb4833c3272ec49e4901a53254de8e8d267da48b88f6f79af4c32f9f70c504" ], "index": "pypi", - "version": "==1.1.6" + "version": "==1.1.7" }, "djangorestframework": { "hashes": [ @@ -197,37 +196,37 @@ }, "psycopg2-binary": { "hashes": [ - "sha256:163d3ee445a0b4c0109877da9e46271aacf4e5e3d60ae7368669555c30f13e7c", - "sha256:1af0bfe7b0c13a0e613a27311fd4f9c5d024e8fc0f4b3d284e7df02a58a11fc0", - "sha256:2169c3a1bf52d5b30cc98625b5919a964c571a32e8646be20be6c7e3e82079de", - "sha256:218f079fa48e2ef812dc3d3ce6ec2f67ac56427ba4b038d5d6331f2cceb489c2", - "sha256:26a958930687e94c4c6c73c171e4d4783b82ae4e16aa3424e6bcd4529bceedf0", - "sha256:2c7c195aef3acdbc853942bc674844031a732890d2fee88a324298ed376b6c2b", - "sha256:2ecdbfed7004669472bfa27c8d51012c717c241c7154ae17e4c8f93024043525", - "sha256:345fc31b71a90ada1b51826537917b19a1af685a91c0f066787069c184d7d00f", - "sha256:378a06649503f548be5f1e9eec2e94cc1d6138250b82a08dcc6151bca8cec107", - "sha256:3f300bf2930e501dde09605de85cb2b84c2638e2c954be02a3c86f28176d3525", - "sha256:6c2f66c653ce8bbd7e789d0f7f92c3f9fea881b55226f0ae5ee550cce9e3cf0e", - "sha256:6fccbac2633831b877a8fbf865f7082d34895e82a015795a9f80f99a2efe2576", - "sha256:7a166f8ccb6888358d3e67795b057540ea7caa71ab9e089b0cb0097f01088965", - "sha256:8f6b84f887ec6fef6c1796779f8ec2603dc7e9ef52bc9269de719d4bcbdaebbb", - "sha256:92cf3ceb7bb90cf35b8bd993c640b15d4832ba0e142a3b9da5006ef217da595d", - "sha256:a20dfdf73f56da674926a3811929cff9fd23b9af90be9a6c36ac246a3486eef3", - "sha256:a84415df4689251556c961e4fe3b25d30e32f00faa8064ce0909458dbe0d67b2", - "sha256:ab1aa1cd50df3860f624c9713ee9e690eefd4e049d3a4d86577bab6e741e9616", - "sha256:abc9dcf85e75a8687f2a6d560c0c1a2593e8e34ba6f9ad6721f8212c5de179a2", - "sha256:c10454710a81a2f4b1ff4d1c83ac2cec63e0e55845a56324991514af5b1299d0", - "sha256:c38f80719e4dfae7a6311a4f091f07f4fb2fb5d602352015d5639f63f8fabb68", - "sha256:d75cf00605630b2cfefa5c62373c605dcda1cc0d607902847dbb8e8e9b67c1ce", - "sha256:dce15cb6ef604c9e38fdaa848f58f83153ade9f4aa5e4cf5812aa27163561750", - "sha256:e7e0db4311bb76bf3f6e0380f71912cfa6d0be7cc635e3772476050b0dabdabd", - "sha256:eac59cae78dfe3fbf7ece25c170d7a152f88df7643381aa5e7344c2028a8d8d4", - "sha256:ead7b3e1567bd14cacd44279c5e42cd19f54b9feed39180220253f4fbe3abd56", - "sha256:ed772a5e8e7e5dd6bede960a86940c17cf653c7f158dafa5d52e919b676f10ba", - "sha256:f2d73131acb94afa45de8b6b8a4bfb21bbe3736633d6478e53247f19dd8c299c" + "sha256:007ca0df127b1862fc010125bc4100b7a630efc6841047bd11afceadb4754611", + "sha256:03c49e02adf0b4d68f422fdbd98f7a7c547beb27e99a75ed02298f85cb48406a", + "sha256:0a1232cdd314e08848825edda06600455ad2a7adaa463ebfb12ece2d09f3370e", + "sha256:131c80d0958c89273d9720b9adf9df1d7600bb3120e16019a7389ab15b079af5", + "sha256:2de34cc3b775724623f86617d2601308083176a495f5b2efc2bbb0da154f483a", + "sha256:2eddc31500f73544a2a54123d4c4b249c3c711d31e64deddb0890982ea37397a", + "sha256:484f6c62bdc166ee0e5be3aa831120423bf399786d1f3b0304526c86180fbc0b", + "sha256:4c2d9369ed40b4a44a8ccd6bc3a7db6272b8314812d2d1091f95c4c836d92e06", + "sha256:70f570b5fa44413b9f30dbc053d17ef3ce6a4100147a10822f8662e58d473656", + "sha256:7a2b5b095f3bd733aab101c89c0e1a3f0dfb4ebdc26f6374805c086ffe29d5b2", + "sha256:804914a669186e2843c1f7fbe12b55aad1b36d40a28274abe6027deffad9433d", + "sha256:8520c03172da18345d012949a53617a963e0191ccb3c666f23276d5326af27b5", + "sha256:90da901fc33ea393fc644607e4a3916b509387e9339ec6ebc7bfded45b7a0ae9", + "sha256:a582416ad123291a82c300d1d872bdc4136d69ad0b41d57dc5ca3df7ef8e3088", + "sha256:ac8c5e20309f4989c296d62cac20ee456b69c41fd1bc03829e27de23b6fa9dd0", + "sha256:b2cf82f55a619879f8557fdaae5cec7a294fac815e0087c4f67026fdf5259844", + "sha256:b59d6f8cfca2983d8fdbe457bf95d2192f7b7efdb2b483bf5fa4e8981b04e8b2", + "sha256:be08168197021d669b9964bd87628fa88f910b1be31e7010901070f2540c05fd", + "sha256:be0f952f1c365061041bad16e27e224e29615d4eb1fb5b7e7760a1d3d12b90b6", + "sha256:c1c9a33e46d7c12b9c96cf2d4349d783e3127163fd96254dcd44663cf0a1d438", + "sha256:d18c89957ac57dd2a2724ecfe9a759912d776f96ecabba23acb9ecbf5c731035", + "sha256:d7e7b0ff21f39433c50397e60bf0995d078802c591ca3b8d99857ea18a7496ee", + "sha256:da0929b2bf0d1f365345e5eb940d8713c1d516312e010135b14402e2a3d2404d", + "sha256:de24a4962e361c512d3e528ded6c7480eab24c655b8ca1f0b761d3b3650d2f07", + "sha256:e45f93ff3f7dae2202248cf413a87aeb330821bf76998b3cf374eda2fc893dd7", + "sha256:f046aeae1f7a845041b8661bb7a52449202b6c5d3fb59eb4724e7ca088811904", + "sha256:f1dc2b7b2748084b890f5d05b65a47cd03188824890e9a60818721fd492249fb", + "sha256:fcbe7cf3a786572b73d2cd5f34ed452a5f5fac47c9c9d1e0642c457a148f9f88" ], "index": "pypi", - "version": "==2.8.1" + "version": "==2.8.2" }, "pygments": { "hashes": [ @@ -239,10 +238,10 @@ }, "pytz": { "hashes": [ - "sha256:32b0891edff07e28efe91284ed9c31e123d84bea3fd98e1f72be2508f43ef8d9", - "sha256:d5f05e487007e29e03409f9398d074e158d920d36eb82eaf66fb1136b0c5374c" + "sha256:303879e36b721603cc54604edcac9d20401bdbe31e1e4fdee5b9f98d5d31dfda", + "sha256:d747dd3d23d77ef44c6a3526e274af6efeb0a6f1afd5a69ba4d5be4098c8e141" ], - "version": "==2018.9" + "version": "==2019.1" }, "six": { "hashes": [ diff --git a/pydis_site/apps/home/templatetags/wiki_extra.py b/pydis_site/apps/home/templatetags/wiki_extra.py index a6861fd9..9847ef5a 100644 --- a/pydis_site/apps/home/templatetags/wiki_extra.py +++ b/pydis_site/apps/home/templatetags/wiki_extra.py @@ -1,4 +1,4 @@ -from typing import Union, Dict, Type, Any +from typing import Any, Dict, Type, Union from django import template from django.forms import BooleanField, BoundField, CharField, Field, ImageField, ModelChoiceField @@ -34,7 +34,7 @@ def get_unbound_field(field: BoundField) -> Field: def render(template_path: str, context: Dict[str, Any]): - return mark_safe(get_template(template_path).render(context)) + return mark_safe(get_template(template_path).render(context)) # noqa: S703 S308 @register.simple_tag diff --git a/pydis_site/apps/home/tests/test_wiki_templatetags.py b/pydis_site/apps/home/tests/test_wiki_templatetags.py index 6399c0b6..201d3df4 100644 --- a/pydis_site/apps/home/tests/test_wiki_templatetags.py +++ b/pydis_site/apps/home/tests/test_wiki_templatetags.py @@ -1,6 +1,9 @@ from unittest.mock import Mock, create_autospec -from django.forms import BooleanField, BoundField, CharField, ChoiceField, Field, Form, ImageField, ModelChoiceField +from django.forms import ( + BooleanField, BoundField, CharField, ChoiceField, Field, Form, ImageField, + ModelChoiceField +) from django.template import Context, Template from django.test import TestCase from wiki.editors.markitup import MarkItUpWidget diff --git a/pydis_site/apps/home/urls.py b/pydis_site/apps/home/urls.py index 34ceda40..6d144aaa 100644 --- a/pydis_site/apps/home/urls.py +++ b/pydis_site/apps/home/urls.py @@ -1,7 +1,7 @@ from django.conf import settings from django.conf.urls.static import static from django.contrib import admin -from django.urls import path, include +from django.urls import include, path from django.views.generic import TemplateView diff --git a/pydis_site/settings.py b/pydis_site/settings.py index 4ffb06a1..c4c8a535 100644 --- a/pydis_site/settings.py +++ b/pydis_site/settings.py @@ -14,10 +14,8 @@ import os import sys import environ - from django.contrib.messages import constants as messages - env = environ.Env( DEBUG=(bool, False) ) @@ -190,10 +188,10 @@ MEDIA_URL = '/media/' MEDIA_ROOT = env('MEDIA_ROOT', default='media') STATICFILES_FINDERS = [ - 'django.contrib.staticfiles.finders.FileSystemFinder', - 'django.contrib.staticfiles.finders.AppDirectoriesFinder', + 'django.contrib.staticfiles.finders.FileSystemFinder', + 'django.contrib.staticfiles.finders.AppDirectoriesFinder', - 'django_simple_bulma.finders.SimpleBulmaFinder', + 'django_simple_bulma.finders.SimpleBulmaFinder', ] # django-hosts -- cgit v1.2.3 From 5a18564cd42641d7bbdb52accae79c32f3bcca71 Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Sat, 20 Apr 2019 22:03:00 +0100 Subject: Replace wiki dep with PyDis fork, add git to Docker --- Pipfile | 4 +- Pipfile.lock | 117 +++++--------------------------------------------- docker/app/Dockerfile | 1 + 3 files changed, 13 insertions(+), 109 deletions(-) (limited to 'Pipfile') diff --git a/Pipfile b/Pipfile index 62eb84a2..59f660a4 100644 --- a/Pipfile +++ b/Pipfile @@ -16,7 +16,7 @@ coverage = "~=4.5.3" unittest-xml-reporting = "~=2.5.1" [packages] -django = "~=2.1" +django = "~=2.2" django-crispy-forms = "~=1.7.2" django-environ = "~=0.4.5" django-filter = "~=2.1.0" @@ -27,8 +27,8 @@ psycopg2-binary = "~=2.8" django-simple-bulma = ">=1.1.7,<2.0" django-crispy-bulma = ">=0.1.2,<2.0" requests = "~=2.21" -wiki = "~=0.4.4" pygments = "~=2.3.1" +wiki = {git = "https://github.com/python-discord/django-wiki.git"} [requires] python_version = "3.7" diff --git a/Pipfile.lock b/Pipfile.lock index 539932e9..30103336 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "2c8dbf435c3e38ed18ef63ed511399a5e4964d41eb4d5acd34a714eec2881220" + "sha256": "78085b805ff9d797c2ce4720c4fc84a91347233b93e4b85615c9833e6b208ed8" }, "pipfile-spec": 6, "requires": { @@ -16,13 +16,6 @@ ] }, "default": { - "bleach": { - "hashes": [ - "sha256:0ee95f6167129859c5dce9b1ca291ebdb5d8cd7e382ca0e237dfd0dad63f63d8", - "sha256:24754b9a7d530bf30ce7cbc805bc6cce785660b4a10ff3a43633728438c105ab" - ], - "version": "==2.1.4" - }, "certifi": { "hashes": [ "sha256:59b7658e26ca9c7339e00f8f4636cdfe59d34fa37b9b04f6f9e9926b3cece1a5", @@ -39,18 +32,11 @@ }, "django": { "hashes": [ - "sha256:0fd54e4f27bc3e0b7054a11e6b3a18fa53f2373f6b2df8a22e8eadfe018970a5", - "sha256:f3b28084101d516f56104856761bc247f85a2a5bbd9da39d9f6197ff461b3ee4" + "sha256:7c3543e4fb070d14e10926189a7fcf42ba919263b7473dceaefce34d54e8a119", + "sha256:a2814bffd1f007805b19194eb0b9a331933b82bd5da1c3ba3d7b7ba16e06dc4b" ], "index": "pypi", - "version": "==2.1.8" - }, - "django-classy-tags": { - "hashes": [ - "sha256:792f9161d0e22d55b4fab6fc297bab8ab072ffaa3075b227613a6d8473624db8", - "sha256:f6d12f5a4df3e387795a0d9ef2836af389cae9a1fbebda035dac043d4722b1f7" - ], - "version": "==0.8.0" + "version": "==2.2" }, "django-crispy-bulma": { "hashes": [ @@ -92,33 +78,6 @@ "index": "pypi", "version": "==3.0" }, - "django-js-asset": { - "hashes": [ - "sha256:8ec12017f26eec524cab436c64ae73033368a372970af4cf42d9354fcb166bdd", - "sha256:c163ae80d2e0b22d8fb598047cd0dcef31f81830e127cfecae278ad574167260" - ], - "version": "==1.2.2" - }, - "django-mptt": { - "hashes": [ - "sha256:18a41d1b56ca7c02a5b04d246e33ee2d18f6ee5459c02ed1d945f5abdef23a2e", - "sha256:689a04cce0981671d6061a9928c33a16b47abb0d4cd43cf7dec31ae284fdae9d" - ], - "version": "==0.9.1" - }, - "django-nyt": { - "hashes": [ - "sha256:02c828e483606addbaeea8c08d4c7301be6fdba5e00f03b7a984b4cbae353e21", - "sha256:bf65e3d7e138b3c00879b6a7420c1f4f897e6bd6a9d2f09d7cd7ac5f623d8448" - ], - "version": "==1.1.2" - }, - "django-sekizai": { - "hashes": [ - "sha256:642a3356fe92fe9b5ccc97f320b64edd2cfcb3b2fbb113e8a26dad9a1f3b5e14" - ], - "version": "==1.0.0" - }, "django-simple-bulma": { "hashes": [ "sha256:7dcc04a11b5a3aefb6ec57cb211c161df8421ea333638e03c9e7db87465fead2", @@ -142,13 +101,6 @@ "index": "pypi", "version": "==0.2.1" }, - "html5lib": { - "hashes": [ - "sha256:20b159aa3badc9d5ee8f5c647e5efd02ed2a66ab8d354930bd9ff139fc1dc0a3", - "sha256:66cb0dcfdbbc4f9c3ba1a63fdb511ffdbd4f513b2b6d81b80cd26ce6b3fb3736" - ], - "version": "==1.0.1" - }, "idna": { "hashes": [ "sha256:c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407", @@ -177,44 +129,6 @@ ], "version": "==0.18.0" }, - "markdown": { - "hashes": [ - "sha256:9ba587db9daee7ec761cfc656272be6aabe2ed300fece21208e4aab2e457bc8f", - "sha256:a856869c7ff079ad84a3e19cd87a64998350c2b94e9e08e44270faef33400f81" - ], - "version": "==2.6.11" - }, - "pillow": { - "hashes": [ - "sha256:15c056bfa284c30a7f265a41ac4cbbc93bdbfc0dfe0613b9cb8a8581b51a9e55", - "sha256:1a4e06ba4f74494ea0c58c24de2bb752818e9d504474ec95b0aa94f6b0a7e479", - "sha256:1c3c707c76be43c9e99cb7e3d5f1bee1c8e5be8b8a2a5eeee665efbf8ddde91a", - "sha256:1fd0b290203e3b0882d9605d807b03c0f47e3440f97824586c173eca0aadd99d", - "sha256:24114e4a6e1870c5a24b1da8f60d0ba77a0b4027907860188ea82bd3508c80eb", - "sha256:258d886a49b6b058cd7abb0ab4b2b85ce78669a857398e83e8b8e28b317b5abb", - "sha256:33c79b6dd6bc7f65079ab9ca5bebffb5f5d1141c689c9c6a7855776d1b09b7e8", - "sha256:367385fc797b2c31564c427430c7a8630db1a00bd040555dfc1d5c52e39fcd72", - "sha256:3c1884ff078fb8bf5f63d7d86921838b82ed4a7d0c027add773c2f38b3168754", - "sha256:44e5240e8f4f8861d748f2a58b3f04daadab5e22bfec896bf5434745f788f33f", - "sha256:46aa988e15f3ea72dddd81afe3839437b755fffddb5e173886f11460be909dce", - "sha256:74d90d499c9c736d52dd6d9b7221af5665b9c04f1767e35f5dd8694324bd4601", - "sha256:809c0a2ce9032cbcd7b5313f71af4bdc5c8c771cb86eb7559afd954cab82ebb5", - "sha256:85d1ef2cdafd5507c4221d201aaf62fc9276f8b0f71bd3933363e62a33abc734", - "sha256:8c3889c7681af77ecfa4431cd42a2885d093ecb811e81fbe5e203abc07e0995b", - "sha256:9218d81b9fca98d2c47d35d688a0cea0c42fd473159dfd5612dcb0483c63e40b", - "sha256:9aa4f3827992288edd37c9df345783a69ef58bd20cc02e64b36e44bcd157bbf1", - "sha256:9d80f44137a70b6f84c750d11019a3419f409c944526a95219bea0ac31f4dd91", - "sha256:b7ebd36128a2fe93991293f997e44be9286503c7530ace6a55b938b20be288d8", - "sha256:c4c78e2c71c257c136cdd43869fd3d5e34fc2162dc22e4a5406b0ebe86958239", - "sha256:c6a842537f887be1fe115d8abb5daa9bc8cc124e455ff995830cc785624a97af", - "sha256:cf0a2e040fdf5a6d95f4c286c6ef1df6b36c218b528c8a9158ec2452a804b9b8", - "sha256:cfd28aad6fc61f7a5d4ee556a997dc6e5555d9381d1390c00ecaf984d57e4232", - "sha256:dca5660e25932771460d4688ccbb515677caaf8595f3f3240ec16c117deff89a", - "sha256:de7aedc85918c2f887886442e50f52c1b93545606317956d65f342bd81cb4fc3", - "sha256:e6c0bbf8e277b74196e3140c35f9a1ae3eafd818f7f2d3a15819c49135d6c062" - ], - "version": "==6.0.0" - }, "psycopg2-binary": { "hashes": [ "sha256:007ca0df127b1862fc010125bc4100b7a630efc6841047bd11afceadb4754611", @@ -279,12 +193,12 @@ ], "version": "==1.12.0" }, - "sorl-thumbnail": { + "sqlparse": { "hashes": [ - "sha256:8dfe5fda91a5047d1d35a0b9effe7b000764a01d648e15ca076f44e9c34b6dbd", - "sha256:d9e3f018d19293824803e4ffead96b19dfcd44fa7987cea392f50436817bef34" + "sha256:40afe6b8d4b1117e7dff5504d7a8ce07d9a1b15aeeade8a2d10f130a834f8177", + "sha256:7c3dca29c022744e95b547e867cee89f4fce4373f3549ccd8797d8eb52cdb873" ], - "version": "==12.5.0" + "version": "==0.3.0" }, "urllib3": { "hashes": [ @@ -293,20 +207,9 @@ ], "version": "==1.24.2" }, - "webencodings": { - "hashes": [ - "sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78", - "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923" - ], - "version": "==0.5.1" - }, "wiki": { - "hashes": [ - "sha256:8a3130c50aa6e92a579968d154ce7e66dda85d0b10358d479066ed957f6f4dfc", - "sha256:df9c73d4185433d9f375c1646b7c08e099e86172faf93d6afc16389db075440a" - ], - "index": "pypi", - "version": "==0.4.4" + "git": "https://github.com/python-discord/django-wiki.git", + "ref": "66d443248279fb8decf23f68c5363ecf6362ee09" } }, "develop": { diff --git a/docker/app/Dockerfile b/docker/app/Dockerfile index 5b965740..52cc6b32 100644 --- a/docker/app/Dockerfile +++ b/docker/app/Dockerfile @@ -15,6 +15,7 @@ RUN apt-get update -y \ gcc \ libc-dev \ libpq-dev \ + git \ && \ apt-get clean \ && \ -- cgit v1.2.3