Compare commits
2 commits
7fcc3c8788
...
37d5a7a20d
Author | SHA1 | Date | |
---|---|---|---|
37d5a7a20d | |||
76496e7169 |
3 changed files with 888 additions and 545 deletions
1426
Pipfile.lock
generated
1426
Pipfile.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -3,3 +3,6 @@ from .base import *
|
||||||
ALLOWED_HOSTS = ['*']
|
ALLOWED_HOSTS = ['*']
|
||||||
SECURE_SSL_REDIRECT = False
|
SECURE_SSL_REDIRECT = False
|
||||||
STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage'
|
STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage'
|
||||||
|
|
||||||
|
MEDIA_URL = '/media/'
|
||||||
|
STATIC_ROOT = path.join(BASE_DIR, 'media')
|
||||||
|
|
|
@ -21,9 +21,9 @@ def libravatar(request, hash):
|
||||||
try:
|
try:
|
||||||
size = int(size)
|
size = int(size)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
return utils.bad_req('size parameter must be an integer')
|
size = 80
|
||||||
if not 1 <= size <= 512:
|
if not 1 <= size <= 512:
|
||||||
return utils.bad_req('size parameter must be between 1 and 512')
|
size = 512
|
||||||
|
|
||||||
if len(hash) == 32:
|
if len(hash) == 32:
|
||||||
where = Q(email_md5=hash)
|
where = Q(email_md5=hash)
|
||||||
|
|
Loading…
Reference in a new issue