Skip to content

Commit

Permalink
Merge pull request #671 from geekygirlsarah/main
Browse files Browse the repository at this point in the history
Security updates and unit test fix
  • Loading branch information
geekygirlsarah authored Jul 12, 2023
2 parents 14c86b8 + d478a8d commit c955937
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
asgiref==3.4.1
asgiref==3.7.2
astroid==2.6.6
bleach==4.1.0
colorama==0.4.4
dj-database-url==0.5.0
Django==4.0.10
Django==4.2.3
django-markdownify==0.9.0
django-on-heroku==1.1.2
gunicorn==20.1.0
Expand All @@ -22,7 +22,7 @@ pytz==2021.1
six==1.16.0
sqlparse==0.4.4
toml==0.10.2
typing-extensions==3.10.0.0
typing-extensions==4.7.1
tzdata==2021.5
webencodings==0.5.1
whitenoise==5.3.0
Expand Down
17 changes: 9 additions & 8 deletions web/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,21 @@ def index(request):

random_langs = random.sample(list(meta_data_langs.values()), k=3)

thesauruses_dir = f'{BASE_DIR}/web/thesauruses'
meta_dir = f'{thesauruses_dir}/_meta'
thesauruses_dir = os.path.join(BASE_DIR, 'web', 'thesauruses')
meta_dir = os.path.join(thesauruses_dir, '_meta')
meta_concepts = os.listdir(meta_dir)
for lang in os.listdir(thesauruses_dir):
if 'meta' in lang:
continue
for ver in os.listdir(f'{thesauruses_dir}/{lang}'):
for ver in os.listdir(os.path.join(thesauruses_dir, lang)):
for concept_json in meta_concepts:
concept_name = concept_json.split('.')[0]
if concept_json in os.listdir(f'{thesauruses_dir}/{lang}/{ver}'):
for i in meta_data_langs[lang]:
if i['version'] == ver:
i['availStructs'].append(concept_name)
break
if os.path.isdir(os.path.join(thesauruses_dir, lang, ver)):
if concept_json in os.listdir(os.path.join(thesauruses_dir, lang, ver)):
for i in meta_data_langs[lang]:
if i['version'] == ver:
i['availStructs'].append(concept_name)
break

content = {
'title': 'Welcome',
Expand Down

0 comments on commit c955937

Please sign in to comment.