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

Improve Ordering of Homepage Birthday Banners #170

Open
LatidoReMe opened this issue Oct 11, 2018 · 1 comment
Open

Improve Ordering of Homepage Birthday Banners #170

LatidoReMe opened this issue Oct 11, 2018 · 1 comment
Labels
good first issue Easy to implement and a good way to introduce users to the MagiCircles framework. low priority optimization

Comments

@LatidoReMe
Copy link
Contributor

Currently on BanPa, we have birthday banners that generate about 12 days before their birthday.

While everything works, I noticed that Himari's banner was in front of Rinko's, even though her birthday was later. Since Rinko's birthday is coming up sooner, it'd make more sense for her to be up front since her date is closer.

I believe the way to do this is simple too! In this section:

for member in models.Member.objects.filter(
birthdays_within(days_after=12, days_before=1, field_name='birthday')
):

you just need to add something like: .order_by('birthday')

One more thing I wanted to suggest was adding logic so that the trained forms of cards can be used for birthday banners too! Currently it is only taking into account the untrained art, as shown here:

'background': card.art_original_url,

If you modified the above and this:

card = models.Card.objects.filter(member=member).filter(show_art_on_homepage=True).order_by('-i_rarity', '-release_date')[0]

you should be able to get it to allow the trained cards to be used too! Whether it's preferred or only used as a backup for when a card's untrained art doesn't work is unimportant to me, but I think people generally like seeing the newer cards, so it might help with that.

@LatidoReMe LatidoReMe added low priority optimization good first issue Easy to implement and a good way to introduce users to the MagiCircles framework. labels Oct 11, 2018
@violet-r
Copy link
Contributor

violet-r commented Mar 8, 2019

I would also like birthday banners to be the correct size as everything else on the carousel. Currently, they are smaller and create a fluctuation in size. It's not a big deal, but it upsets my core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Easy to implement and a good way to introduce users to the MagiCircles framework. low priority optimization
Projects
None yet
Development

No branches or pull requests

2 participants