Skip to content
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

Array compress into GET-request #4

Merged
merged 2 commits into from Mar 25, 2020
Merged

Array compress into GET-request #4

merged 2 commits into from Mar 25, 2020

Conversation

@Teramar
Copy link
Owner

Teramar commented Mar 25, 2020

В данном коммите был добавлен viewport на сжатие входное массива, когда совершается GET запрос.

@Teramar Teramar merged commit 8f39b3b into master Mar 25, 2020
@Teramar Teramar changed the title Dev Array compress into GET-request Mar 25, 2020
else :
result.append(f'{tmp[0]}-{tmp[-1]}')
# print(', '.join(map(str, result)))
arrz = {'array' : lst, 'compressed array' : (', '.join(map(str, result)))}

This comment has been minimized.

Copy link
@dmitvitalii

dmitvitalii Mar 25, 2020

Collaborator

Можно джойнить без map.
Круглые скобки вокруг джойна тоже не нужны.

@@ -23,3 +23,37 @@ def post(self) :
return {
'method' : 'post'
}


class comp_arr(MethodView) :

This comment has been minimized.

Copy link
@dmitvitalii

dmitvitalii Mar 25, 2020

Collaborator

Имена классов с большой буквы кэмел кейсом.
CompressView


app = flask.Flask(__name__)
app.add_url_rule('/checkapproute', 'checkr', Check_R, methods=['GET', 'POST'])
app.add_url_rule('/data', 'data', data, methods=['GET', 'POST'])
app.add_url_rule('/checkapproute', endpoint=None, view_func=Check_R.as_view('checkr'), methods=['GET', 'POST'])

This comment has been minimized.

Copy link
@dmitvitalii

dmitvitalii Mar 25, 2020

Collaborator

Зачем endpoint=None?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.