pep-dortmund / member-database

Our member database application
Other
9 stars 1 forks source link

add (short) link functionality for event #165

Closed The-Ludwig closed 1 year ago

The-Ludwig commented 1 year ago

Fixes #82

codecov-commenter commented 1 year ago

Codecov Report

Merging #165 (2b7e502) into main (40170ac) will increase coverage by 0.54%. The diff coverage is 100.00%.

:exclamation: Current head 2b7e502 differs from pull request most recent head d3624c3. Consider uploading reports for the commit d3624c3 to get more accurate results

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main     #165      +/-   ##
==========================================
+ Coverage   76.01%   76.55%   +0.54%     
==========================================
  Files          23       23              
  Lines        1034     1058      +24     
==========================================
+ Hits          786      810      +24     
  Misses        248      248              
Impacted Files Coverage Δ
member_database/admin_views.py 83.52% <100.00%> (+0.19%) :arrow_up:
member_database/events/__init__.py 65.85% <100.00%> (+3.18%) :arrow_up:
member_database/events/models.py 100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

The-Ludwig commented 1 year ago

Found a bug when creating a new event, should be fixed now

The-Ludwig commented 1 year ago

I implemented your suggestions. I am unsure if the query should change with the unique contraint, or if filter_by is still the way to go. I accidentilly run black... Should I revert?

The-Ludwig commented 1 year ago

@maxnoe I hope this should be ready to merge. I added your suggestions, except that I still make a default "short"link available, which can be deactivated if not wanted by the admin (check out the information on the shortlink field in the admin view). I also changed the db type from text to string.

The-Ludwig commented 1 year ago

Oh and, if a shortlink is available the event listing refers to the short link, rather than the id link (via new template function url_for_event)

maxnoe commented 1 year ago

Can you rebase this vs. master? To make the black changes and the merge commits disappear here