Skip to content

Commit 2b4b1b4

Browse files
committed
⬆️ Add support for Django v4.0 and v3.2
1 parent d8b7009 commit 2b4b1b4

File tree

8 files changed

+21
-21
lines changed

8 files changed

+21
-21
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
![GitHub All Releases](https://img.shields.io/github/downloads/techouse/alfred-django-docs/total.svg)
55
![GitHub](https://img.shields.io/github/license/techouse/alfred-django-docs.svg)
66

7-
Search the [Django documentation](https://docs.djangoproject.com/en/3.1/) using [Alfred](https://www.alfredapp.com/).
7+
Search the [Django documentation](https://docs.djangoproject.com/en/4.0/) using [Alfred](https://www.alfredapp.com/).
88

99
![demo](demo.gif)
1010

@@ -27,10 +27,10 @@ Either press `⌘Y` to Quick Look the result, or press `<enter>` to open it in y
2727
## Changing Branches
2828

2929
The workflow supports searching the documentation of all the currently officially supported branches.
30-
By default, it searches the latest stable branch. To search branch `2.2` or `1.11` simply type `v2.2` or `v1.11` anywhere in your query, like so:
30+
By default, it searches the latest stable branch. To search branch `3.2` or `2.2` simply type `v3.2` or `v2.2` anywhere in your query, like so:
3131

3232
```
33-
dj v1.11 as_p
33+
dj v3.2 as_p
3434
```
3535

3636
### Note
Binary file not shown.

src/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ class Config(object):
1010
DJANGO_ICON = "icon.png"
1111
GOOGLE_ICON = "google.png"
1212
# supported docs
13-
SUPPORTED_DJANGO_VERSIONS = {"3.1", "3.0", "2.2", "2.1", "2.0", "1.11", "1.10", "1.8"}
14-
DEFAULT_DJANGO_VERSION = "3.1"
13+
SUPPORTED_DJANGO_VERSIONS = {"4", "3.2", "3.1", "3", "2.2", "2.1", "2", "1.11", "1.10", "1.8"}
14+
DEFAULT_DJANGO_VERSION = "4"
1515
# Algolia credentials
1616
ALGOLIA_APP_ID = "WODHKE4WZG"
1717
ALGOLIA_SEARCH_ONLY_API_KEY = "7456cdd91ba8d4f87846549697397759"

src/copy_requirements.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#!/usr/bin/env bash
2-
cp -r ./env/lib/python2.7/site-packages/workflow .
3-
cp -r ./env/lib/python2.7/site-packages/algoliasearch .
4-
cp -r ./env/lib/python2.7/site-packages/certifi .
5-
cp -r ./env/lib/python2.7/site-packages/chardet .
6-
cp -r ./env/lib/python2.7/site-packages/idna .
7-
cp -r ./env/lib/python2.7/site-packages/requests .
8-
cp -r ./env/lib/python2.7/site-packages/typing.py .
9-
cp -r ./env/lib/python2.7/site-packages/urllib3 .
2+
cp -r ../env/lib/python2.7/site-packages/workflow .
3+
cp -r ../env/lib/python2.7/site-packages/algoliasearch .
4+
cp -r ../env/lib/python2.7/site-packages/certifi .
5+
cp -r ../env/lib/python2.7/site-packages/chardet .
6+
cp -r ../env/lib/python2.7/site-packages/idna .
7+
cp -r ../env/lib/python2.7/site-packages/requests .
8+
cp -r ../env/lib/python2.7/site-packages/typing.py .
9+
cp -r ../env/lib/python2.7/site-packages/urllib3 .

src/docs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def main(wf):
8686
version = Config.DEFAULT_DJANGO_VERSION
8787

8888
for word in words:
89-
if word in Config.SUPPORTED_DJANGO_VERSIONS:
89+
if word.replace("v", "") in Config.SUPPORTED_DJANGO_VERSIONS:
9090
version = word.replace("v", "")
9191
else:
9292
query.append(word)

src/info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
<key>variablesdontexport</key>
124124
<array/>
125125
<key>version</key>
126-
<string>1.0.9</string>
126+
<string>1.0.10</string>
127127
<key>webaddress</key>
128128
<string>https://github.com/techouse</string>
129129
</dict>

src/requirements.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Alfred-Workflow>=1.40.0
2-
algoliasearch>=2.4.0
3-
certifi>=2020.12.5
2+
algoliasearch>=2.6.1
3+
certifi>=2021.10.8
44
chardet>=4.0.0
55
idna>=2.10
6-
requests>=2.25.1
7-
typing>=3.7.4.3
8-
urllib3>=1.26.2
6+
requests>=2.26.0
7+
typing>=3.10.0.0
8+
urllib3>=1.26.7

src/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.9
1+
1.0.10

0 commit comments

Comments
 (0)