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

Fix RecurringRule and OccurringRule model __str__ method #2166

Merged
merged 5 commits into from
Sep 13, 2024

Conversation

saadmk11
Copy link
Contributor

  1. Django admin raises error on RecurringRule model admin page (change_list). This is caused by the __str__ method.

    Traceback:

    pythondotorg-web-1       |   File "/code/events/models.py", line 287, in __str__
    pythondotorg-web-1       |     return f'{self.event.title} every {timedelta_nice_repr(self.interval)} since {date(self.dt_start.strftime, strftime)}'
    pythondotorg-web-1       |   File "/code/events/utils.py", line 50, in timedelta_nice_repr
    pythondotorg-web-1       |     raise TypeError('First argument must be a timedelta.')
    pythondotorg-web-1       | TypeError: First argument must be a timedelta.
  2. RecurringRule and OccurringRule model admin page (change_list) does not display the expected __str__.

    Expected: Djangocon Europe 2014 05/13/2014 midnight - 05/17/2014 midnight
    Actual: Djangocon Europe 2014 -

events/models.py Outdated Show resolved Hide resolved
events/models.py Outdated Show resolved Hide resolved
@JacobCoffee
Copy link
Member

Will test tomorrow and if all goes well we can merge after #2520 has settled for a little bit

@JacobCoffee
Copy link
Member

Confirmed that events fall off of the https://www.python.org/events/python-events/ page, there was an event that started today I saw yesterday that is gone.

@JacobCoffee
Copy link
Member

Closing in favor of #2556, I wasnt able to get this to work :\

@JacobCoffee JacobCoffee reopened this Sep 13, 2024
@JacobCoffee
Copy link
Member

Think i got confused on your other PR 🙃

@JacobCoffee
Copy link
Member

Before: image

After:
image

@JacobCoffee JacobCoffee merged commit 30f3cb4 into python:main Sep 13, 2024
5 checks passed
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.

2 participants