Skip to content

Commit

Permalink
[AJP-2]
Browse files Browse the repository at this point in the history
  • Loading branch information
Anna Grund authored and Anna Grund committed Sep 27, 2023
1 parent 32c447c commit 279fa26
Show file tree
Hide file tree
Showing 12 changed files with 6 additions and 234 deletions.

This file was deleted.

28 changes: 0 additions & 28 deletions ajapaik/ajapaik/migrations/0026_photomodelsuggestionresult.py

This file was deleted.

This file was deleted.

31 changes: 0 additions & 31 deletions ajapaik/ajapaik/migrations/0028_auto_20230525_1916.py

This file was deleted.

27 changes: 0 additions & 27 deletions ajapaik/ajapaik/migrations/0029_photomodelsuggestionresult.py

This file was deleted.

This file was deleted.

21 changes: 0 additions & 21 deletions ajapaik/ajapaik/migrations/0031_auto_20230809_1940.py

This file was deleted.

This file was deleted.

21 changes: 0 additions & 21 deletions ajapaik/ajapaik/migrations/0033_auto_20230809_1944.py

This file was deleted.

This file was deleted.

6 changes: 2 additions & 4 deletions ajapaik/ajapaik/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2422,7 +2422,7 @@ def curator_photo_upload_handler(request):
licence=licence,
external_id=muis_id,
external_sub_id=muis_media_id,
source_key=source_key,
source_key=upload_form.cleaned_data['identifyingNumber'],
source_url=upload_form.cleaned_data['urlToRecord'],
flip=upload_form.cleaned_data['flip'],
invert=upload_form.cleaned_data['invert'],
Expand Down Expand Up @@ -2785,8 +2785,6 @@ def del_evenReadonly(action, name, exc):

existing_photos = Photo.objects.filter(image__in=file_list).values_list('image', flat=True)

import_blacklist_service = ImportBlacklistService()

# TODO: map over row fields instead to directly set attributes of photo with setattr
# before doing so remove any exceptions like album, source, licence or start using only ids
for row in csv.DictReader(decoded_file, delimiter=',', quotechar='"'):
Expand Down Expand Up @@ -2870,7 +2868,7 @@ def del_evenReadonly(action, name, exc):
lon=lon,
geography=geography,
source=source,
source_key=upload_form.cleaned_data['identifyingNumber'],
source_key=source_key,
source_url=source_url,
date_text=date_text,
licence=licence,
Expand Down
8 changes: 4 additions & 4 deletions ajapaik/settings/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
SECRET_KEY = '!!! paste your own secret key here !!!'

MIDDLEWARE = [
# 'corsheaders.middleware.CorsMiddleware',
'corsheaders.middleware.CorsMiddleware',
'django_hosts.middleware.HostsRequestMiddleware',
'django.middleware.gzip.GZipMiddleware',
'django.middleware.security.SecurityMiddleware',
Expand Down Expand Up @@ -199,7 +199,7 @@
'ajapaik.ajapaik_object_recognition',
'ajapaik.ajapaik_object_categorization',
'django_user_agents',
# 'corsheaders',
'corsheaders',

# Django allauth and related applications.
'allauth',
Expand All @@ -211,7 +211,7 @@
)

# Note: Allauth login's next-parameter redirection doesn't understand wildcards in ALLOWED_HOSTS.
ALLOWED_HOSTS = ['.ajapaik.ee', '127.0.0.1', '0.0.0.0']
ALLOWED_HOSTS = ['.ajapaik.ee', '127.0.0.1']

# Allow CORS from localhost for developing
CORS_ALLOWED_ORIGIN_REGEXES = [
Expand Down Expand Up @@ -399,7 +399,7 @@
ACCOUNT_AUTHENTICATION_METHOD = 'email'
ACCOUNT_EMAIL_REQUIRED = True
ACCOUNT_UNIQUE_EMAIL = True
ACCOUNT_EMAIL_VERIFICATION = 'none'
ACCOUNT_EMAIL_VERIFICATION = 'mandatory'
ACCOUNT_USERNAME_REQUIRED = False
ACCOUNT_AUTHENTICATED_LOGIN_REDIRECTS = False
SOCIALACCOUNT_EMAIL_VERIFICATION = 'none'
Expand Down

0 comments on commit 279fa26

Please sign in to comment.