-
Notifications
You must be signed in to change notification settings - Fork 7
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
Develop -> master #194
Develop -> master #194
Conversation
feat: only show current or upcoming terms in /timetable also now sorted by term start date
…orts. please see the TODO's
duration is controllable by settings.TERM_GRACE_PERIOD
might change the modal later to keep it in db but that's a future step
added session refresh so the session will refresh every time a page is loaded so as long as they log into the app every settings.SESSION_EXPIRY they will stay logged in
note: can improve later on with counter in card_snippet.html as well and non reliance on an external api closes #119
Usually it's better to keep less code so it's easier to maintain over time
(esp bc we're a school club and everyone don't have much time). It's fine
in this case bc this is not much code (and I am a hypocrite...lol).
I can also see if you can get access to prod bc you'll need it sometime
anyway.
2023年2月12日(日) 17:06 Jason ***@***.***>:
… ***@***.**** commented on this pull request.
------------------------------
In core/admin.py
<#194 (comment)>:
> ***@***.***(description="Archive selected flatpages and download them as a JSON file")
+def archive_page(modeladmin, request, queryset):
+ if not request.user.has_perm("flatpages.change_flatpage"):
+ raise PermissionDenied
+
+ response = HttpResponse(
+ content_type="application/json"
+ ) # write a json file with all the page date and then download it
+ response["Content-Disposition"] = 'attachment; filename="pages.json"'
+ data = []
+ for page in queryset:
+ data.append(
+ {
+ "url": page.url,
+ "title": page.title,
+ "content": page.content,
+ "registration_required": page.registration_required,
+ "template_name": page.template_name,
+ }
+ )
+ response.write(json.dumps(data))
+ return response
+
+
+class CustomFlatPageAdmin(FlatPageAdmin):
Sorry to bother but wym by
"but it's a tiny bit more stuff to care about. can see on access to prod."
—
Reply to this email directly, view it on GitHub
<#194 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AK5PL6KUWFS5HZWLA2QAFBTWXFNGHANCNFSM6AAAAAAUYPURZ4>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
Mainly we don't want a huge chunk of random Assembly code that does some
critical part of the website... (Extreme example but)
2023年2月12日(日) 17:08 Ken Shibata ***@***.***>:
… Usually it's better to keep less code so it's easier to maintain over time
(esp bc we're a school club and everyone don't have much time). It's fine
in this case bc this is not much code (and I am a hypocrite...lol).
I can also see if you can get access to prod bc you'll need it sometime
anyway.
2023年2月12日(日) 17:06 Jason ***@***.***>:
> ***@***.**** commented on this pull request.
> ------------------------------
>
> In core/admin.py
> <#194 (comment)>:
>
> > ***@***.***(description="Archive selected flatpages and download them as a JSON file")
> +def archive_page(modeladmin, request, queryset):
> + if not request.user.has_perm("flatpages.change_flatpage"):
> + raise PermissionDenied
> +
> + response = HttpResponse(
> + content_type="application/json"
> + ) # write a json file with all the page date and then download it
> + response["Content-Disposition"] = 'attachment; filename="pages.json"'
> + data = []
> + for page in queryset:
> + data.append(
> + {
> + "url": page.url,
> + "title": page.title,
> + "content": page.content,
> + "registration_required": page.registration_required,
> + "template_name": page.template_name,
> + }
> + )
> + response.write(json.dumps(data))
> + return response
> +
> +
> +class CustomFlatPageAdmin(FlatPageAdmin):
>
> Sorry to bother but wym by
>
> "but it's a tiny bit more stuff to care about. can see on access to prod."
>
> —
> Reply to this email directly, view it on GitHub
> <#194 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AK5PL6KUWFS5HZWLA2QAFBTWXFNGHANCNFSM6AAAAAAUYPURZ4>
> .
> You are receiving this because your review was requested.Message ID:
> ***@***.***>
>
|
Yeah yeah I get less code is better, But for something like this I don't really think that applies (I mean it obviously does but to a very very little extent) where it's a isolated piece of code that is very easy to tell what it does. Also please please PLEASE do not integrate assembly into this code base 😭 |
Yep.
Also please please PLEASE do not integrate assembly into this code base 😭
You have me a good idea ;)
2023年2月12日(日) 17:11 Jason ***@***.***>:
… Yeah yeah I get less code is better, But for something like this I don't
really think that applies (I mean it obviously does but to a very very
little extent) where it's a isolated piece of code that is very easy to
tell what it does.
Also please please PLEASE do not integrate assembly into this code base 😭
—
Reply to this email directly, view it on GitHub
<#194 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AK5PL6IS3APZ457SUXKYDSDWXFNY3ANCNFSM6AAAAAAUYPURZ4>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
Noooooooooo cries In simple python based dev |
Hehehe I already slipped some Perl ;)
2023年2月12日(日) 17:13 Jason ***@***.***>:
… Yep.
Also please please PLEASE do not integrate assembly into this code base 😭
You have me a good idea ;)
2023年2月12日(日) 17:11 Jason *@*.***>:
Yeah yeah I get less code is better, But for something like this I don't
really think that applies (I mean it obviously does but to a very very
little extent) where it's a isolated piece of code that is very easy to
tell what it does.
Also please please PLEASE do not integrate assembly into this code base 😭
—
Reply to this email directly, view it on GitHub
#194 (comment)
<#194 (comment)>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AK5PL6IS3APZ457SUXKYDSDWXFNY3ANCNFSM6AAAAAAUYPURZ4
.
You are receiving this because your review was requested.Message ID:
*@*.***>
Noooooooooo *cries In simple python based dev*
—
Reply to this email directly, view it on GitHub
<#194 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AK5PL6NTW7KWTF7AB5JG4FLWXFOCFANCNFSM6AAAAAAUYPURZ4>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
…y them Co-authored-by: UserBlackBox <userblackbox@tutanota.com>
@@ -100,11 +100,63 @@ hr { | |||
font-size: 0.8rem; | |||
font-family: 'Roboto Mono', monospace; | |||
} | |||
.tag:hover { |
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.
note to self, deduplicate this
added a load of new stuff including blog view counts to blog pages, alt tags on blog pages, tag filtering on all posts, improvements to timetable selections and a bunch of reformating