Skip to content

Commit

Permalink
Merge pull request #23 from AUTGamecraft/excel
Browse files Browse the repository at this point in the history
Excel
  • Loading branch information
Javad-Ak authored Sep 17, 2024
2 parents fb41f27 + ed44a92 commit 7e663ba
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 222 deletions.
11 changes: 9 additions & 2 deletions core/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ class AssistantAdmin(admin.ModelAdmin):
]


def main_presenter(obj):
if presenters := obj.presenters.all():
return presenters[0]
else:
return "no presenters"


@admin.register(Talk)
class TalkAdmin(admin.ModelAdmin):
fieldsets = (
Expand All @@ -80,7 +87,7 @@ class TalkAdmin(admin.ModelAdmin):
exclude = ['presenters']
date_hierarchy = 'start'
actions_on_top = True
list_display = ('title', 'start', 'end', 'registered', 'capacity')
list_display = ('title', main_presenter, 'start', 'registered', 'capacity')
search_fields = ['title']
show_full_result_count = True

Expand All @@ -107,7 +114,7 @@ class WorkshopAdmin(admin.ModelAdmin):
]
date_hierarchy = 'start'
actions_on_top = True
list_display = ('title', 'start', 'end', 'registered', 'capacity')
list_display = ('title', main_presenter, 'start', 'registered', 'capacity')
show_full_result_count = True
search_fields = ['title']

Expand Down
219 changes: 0 additions & 219 deletions core/models.py.save

This file was deleted.

1 change: 1 addition & 0 deletions core/viewsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ def enroll(self, request, pk):
ev_service = EventService.objects.create(**args)
if obj.cost < 1:
ev_service.payment_state = 'CM'

ev_service.save()
return self.set_response(
message=SUCCESSFULLY_ADDED,
Expand Down
2 changes: 1 addition & 1 deletion templates/activation_message.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
style="background-color: #E8E7FF;text-align: center;padding: 20px 70px;width: fit-content;border-radius: 16px;margin: auto;margin-top: 56px;">
<p style="color: #474666;font-family: 'Estedad-SemiBold';margin-bottom: 0;">{{first_name|safe}} عزیز سلام!</p>
<p style="color: #474666;font-family: 'Estedad-SemiBold';margin-bottom: 0;">
از اینکه در AUT GameCraft 2023
از اینکه در AUT GameCraft 2024
(چهارمین دوره‌ی رویداد بازی‌سازی امیرکبیر)
همراه ما هستی، بسیار خرسندیم.
</p>
Expand Down

0 comments on commit 7e663ba

Please sign in to comment.