wlmac / metropolis

William Lyon Mackenzie's online hub for announcements, calendar events, clubs, and timetables
https://maclyonsden.com
GNU Affero General Public License v3.0
21 stars 7 forks source link

Develop -> master #194

Closed JasonLovesDoggo closed 1 year ago

JasonLovesDoggo commented 1 year ago

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

nyiyui commented 1 year ago

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 https://github.com/wlmac/metropolis/pull/194#discussion_r1103883894:

@.***(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 https://github.com/wlmac/metropolis/pull/194#discussion_r1103883894, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK5PL6KUWFS5HZWLA2QAFBTWXFNGHANCNFSM6AAAAAAUYPURZ4 . You are receiving this because your review was requested.Message ID: @.***>

nyiyui commented 1 year ago

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 https://github.com/wlmac/metropolis/pull/194#discussion_r1103883894:

@.***(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 https://github.com/wlmac/metropolis/pull/194#discussion_r1103883894, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK5PL6KUWFS5HZWLA2QAFBTWXFNGHANCNFSM6AAAAAAUYPURZ4 . You are receiving this because your review was requested.Message ID: @.***>

JasonLovesDoggo commented 1 year ago

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 😭

nyiyui commented 1 year ago

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 https://github.com/wlmac/metropolis/pull/194#issuecomment-1427145714, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK5PL6IS3APZ457SUXKYDSDWXFNY3ANCNFSM6AAAAAAUYPURZ4 . You are receiving this because your review was requested.Message ID: @.***>

JasonLovesDoggo commented 1 year ago

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 https://github.com/wlmac/metropolis/pull/194#issuecomment-1427145714, 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

nyiyui commented 1 year ago

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)

https://github.com/wlmac/metropolis/pull/194#issuecomment-1427145714, 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 https://github.com/wlmac/metropolis/pull/194#issuecomment-1427146204, or unsubscribe https://github.com/notifications/unsubscribe-auth/AK5PL6NTW7KWTF7AB5JG4FLWXFOCFANCNFSM6AAAAAAUYPURZ4 . You are receiving this because your review was requested.Message ID: @.***>