-
-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove storify #744
Open
sl1-1
wants to merge
32
commits into
Weasyl:main
Choose a base branch
from
sl1-1:Remove_storify
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Remove storify #744
Changes from 22 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
8eb489c
remove use of storify in controllers/marketplace.py
sl1-1 6323a1b
remove dependency on storify for controllers/user.py
sl1-1 f056fad
remove dependency on storify from controllers/general.py
sl1-1 f888bcc
remove dependency on storify from controllers/settings.py
sl1-1 04436ea
remove dependency on storify from controllers/profile.py
sl1-1 a11727f
remove dependency on storify from controllers/content.py
sl1-1 e9a241d
remove dependency on storify from controllers/detail.py
sl1-1 c9e5d58
remove storify from controllers/messages.py
sl1-1 596c90d
Remove dependency on storify from controllers/interaction.py
sl1-1 f0c512c
remove dependency on storify from controllers/moderation.py
sl1-1 2c674ac
remove dependency on storify from controllers/admin.py
sl1-1 daae586
remove dependency on storify from controllers/director.py
sl1-1 4e49905
remove dependency on storify from controllers/api.py
sl1-1 947fa78
remove dependency on storify from controllers/weasyl_collections.py
sl1-1 6ef7e51
remove storify dependency from oauth2.py
sl1-1 0684f84
remove web_input_request_method
sl1-1 e8c49f0
Merge branch 'master' into Remove_storify
sl1-1 5430fdf
resolve issues detected by LGTM
sl1-1 4a949b9
Merge branch 'master' into Remove_storify
sl1-1 e62cb3e
Fix merge issue
sl1-1 046d200
adjustments as recommended in code review
sl1-1 795bc9b
Fix test
sl1-1 6e0eeb1
Update weasyl/controllers/api.py
sl1-1 5a17484
Apply suggestions from code review
sl1-1 221f53e
Cleanup
sl1-1 d81eb54
Apply suggestions from code review
sl1-1 4c76cc6
More cleanup as recommended by code review
sl1-1 b0e5236
Merge remote-tracking branch 'remotes/Weasyl/master' into Remove_storify
sl1-1 7aaa41e
Merge branch 'master' into Remove_storify
sl1-1 2a599eb
Merge branch 'master' into Remove_storify
charmander de72c45
Remove last use of weasyl.test.utils.Bag
charmander 222a53e
Merge branch 'master' into Remove_storify
charmander File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -88,8 +88,7 @@ def inner(request): | |||||
@view_config(route_name='useravatar', renderer='json') | ||||||
@api_method | ||||||
def api_useravatar_(request): | ||||||
form = request.web_input(username="") | ||||||
userid = profile.resolve_by_login(d.get_sysname(form.username)) | ||||||
userid = profile.resolve_by_login(d.get_sysname(request.params.get('username', ''))) | ||||||
|
||||||
if userid: | ||||||
media_items = media.get_user_media(userid) | ||||||
|
@@ -154,12 +153,12 @@ def tidy_submission(submission): | |||||
@view_config(route_name='api_frontpage', renderer='json') | ||||||
@api_method | ||||||
def api_frontpage_(request): | ||||||
form = request.web_input(since=None, count=0) | ||||||
since = None | ||||||
|
||||||
try: | ||||||
if form.since: | ||||||
since = d.parse_iso8601(form.since) | ||||||
count = int(form.count) | ||||||
if 'since' in request.params: | ||||||
since = d.parse_iso8601(request.params['since']) | ||||||
count = int(request.params.get('count', 0)) | ||||||
except ValueError: | ||||||
raise HTTPUnprocessableEntity(json=_ERROR_UNEXPECTED) | ||||||
else: | ||||||
|
@@ -181,28 +180,25 @@ def api_frontpage_(request): | |||||
@view_config(route_name='api_submission_view', renderer='json') | ||||||
@api_method | ||||||
def api_submission_view_(request): | ||||||
form = request.web_input(anyway='', increment_views='') | ||||||
return submission.select_view_api( | ||||||
request.userid, int(request.matchdict['submitid']), | ||||||
anyway=bool(form.anyway), increment_views=bool(form.increment_views)) | ||||||
anyway=('anyway' in request.params), increment_views=('increment_views' in request.params)) | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Behaviour difference for empty values
Suggested change
|
||||||
|
||||||
|
||||||
@view_config(route_name='api_journal_view', renderer='json') | ||||||
@api_method | ||||||
def api_journal_view_(request): | ||||||
form = request.web_input(anyway='', increment_views='') | ||||||
return journal.select_view_api( | ||||||
request.userid, int(request.matchdict['journalid']), | ||||||
anyway=bool(form.anyway), increment_views=bool(form.increment_views)) | ||||||
anyway=('anyway' in request.params), increment_views=('increment_views' in request.params)) | ||||||
|
||||||
|
||||||
@view_config(route_name='api_character_view', renderer='json') | ||||||
@api_method | ||||||
def api_character_view_(request): | ||||||
form = request.web_input(anyway='', increment_views='') | ||||||
return character.select_view_api( | ||||||
request.userid, int(request.matchdict['charid']), | ||||||
anyway=bool(form.anyway), increment_views=bool(form.increment_views)) | ||||||
anyway=('anyway' in request.params), increment_views=('increment_views' in request.params)) | ||||||
|
||||||
|
||||||
@view_config(route_name='api_user_view', renderer='json') | ||||||
|
@@ -365,15 +361,14 @@ def api_user_gallery_(request): | |||||
if not userid: | ||||||
raise WeasylError('userRecordMissing') | ||||||
|
||||||
form = request.web_input(since=None, count=0, folderid=0, backid=0, nextid=0) | ||||||
since = None | ||||||
try: | ||||||
if form.since: | ||||||
since = d.parse_iso8601(form.since) | ||||||
count = int(form.count) | ||||||
folderid = int(form.folderid) | ||||||
backid = int(form.backid) | ||||||
nextid = int(form.nextid) | ||||||
if 'since' in request.params: | ||||||
since = d.parse_iso8601(request.params['since']) | ||||||
count = int(requests.params.get('count', 0)) | ||||||
folderid = int(requests.params.get('folderid', 0)) | ||||||
backid = int(requests.params.get('backid', 0)) | ||||||
nextid = int(requests.params.get('nextid', 0)) | ||||||
sl1-1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
except ValueError: | ||||||
raise HTTPUnprocessableEntity(json=_ERROR_UNEXPECTED) | ||||||
else: | ||||||
|
@@ -401,11 +396,10 @@ def api_user_gallery_(request): | |||||
@api_login_required | ||||||
@api_method | ||||||
def api_messages_submissions_(request): | ||||||
form = request.web_input(count=0, backtime=0, nexttime=0) | ||||||
try: | ||||||
count = int(form.count) | ||||||
backtime = int(form.backtime) | ||||||
nexttime = int(form.nexttime) | ||||||
count = int(requests.params.get('count', 0)) | ||||||
backtime = int(requests.params.get('backtime', 0)) | ||||||
nexttime = int(requests.params.get('nexttime', 0)) | ||||||
sl1-1 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
except ValueError: | ||||||
raise HTTPUnprocessableEntity(json=_ERROR_UNEXPECTED) | ||||||
else: | ||||||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will make an empty
?since=
will stop working. I think we may as well keep full backwards compatibility here.