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

Parse Log entries #23

Closed
wants to merge 19 commits into from
Closed

Parse Log entries #23

wants to merge 19 commits into from

Conversation

cherijs
Copy link
Contributor

@cherijs cherijs commented Jul 9, 2023

Parse log entries and split into smaller parts, link to pass object
Screenshot 2023-07-09 at 22 13 40

cherijs added 11 commits July 6, 2023 16:58
Create event loop, if code is executing in non-main thread.
Starting from Python 3, the __str__ method was introduced as a replacement for __unicode__ to provide a string representation of an object.
# Conflicts:
#	django_walletpass/admin.py
#	django_walletpass/models.py
…//xxxx/passes/) encountered error: Unexpected response code 404
@patroqueeet
Copy link
Collaborator

good morning @cherijs very well done! excellent improvement. would adding a filter for date, type, status make sense now?

@cherijs
Copy link
Contributor Author

cherijs commented Jul 10, 2023

good morning @cherijs very well done! excellent improvement. would adding a filter for date, type, status make sense now?

I added list_filter = ("status", "task_type", "pass_type_identifier") already :)
but you can still add date_hierarchy and created_at filter

Screenshot 2023-07-10 at 10 01 09

@@ -27,6 +27,10 @@ def get_pass(pass_type_id, serial_number):
return get_object_or_404(Pass, pass_type_identifier=pass_type_id, serial_number=serial_number)


def web_service_root_view(request):
Copy link
Collaborator

@patroqueeet patroqueeet Jul 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not a classview. should either inherit from View or in views.py I assume. actually, what is the intention of this view? @cherijs

Copy link
Contributor Author

@cherijs cherijs Jul 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However, it seems that this view should be taken out.

I understood when this error came about not being able to open web_service_url:
WALLETPASS["SERVICE_URL"] = 'https://xxx/api/passes/'

[2023-07-09 12:18:47 +0300] Register task (for device 6d07103565a61da35b0cb6047736518a, pass type pass.id.lolo.tickets, serial number R1e7lciJx5K_j6_m4iNouABbUXY; with web service url https://xxx/api/passes/) encountered error: Unexpected response code 404

but i was wrong...

this error was about not being able to open paass R1e7lciJx5K_j6_m4iNouABbUXY not SERVICE_URL root


def wallet_pass_(self, obj: Pass):
if obj.data:
svg_icon = '<svg width="13" height="16" viewBox="0 0 13 16" fill="none" xmlns="http://www.w3.org/2000/svg">' \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this icon for? how would it look like? @cherijs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot 2023-07-10 at 10 50 56

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll copy&paste what I wrote in the other PR. I don't know how I feel about hardcoding the content of a svg file here. Can we maybe load this from a file?

@alexandernst
Copy link
Member

Is this ready to merge?

@patroqueeet
Copy link
Collaborator

Is this ready to merge?

not yet, I believe. the SVG might be better in a static file

@alexandernst
Copy link
Member

@patroqueeet if you're feeling brave enough, maybe clone cherijs's branch and apply the change to the svg?

@patroqueeet patroqueeet mentioned this pull request Jan 22, 2024
@alexandernst
Copy link
Member

This was merged in #29

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

Successfully merging this pull request may close these issues.

3 participants