[GrandComicsDatabase/gcd-django] Add a filter to sequences to filter on universe (PR #690)

11 views
Skip to first unread message

Adam Knights

unread,
Jan 4, 2026, 1:16:21 AMJan 4
to GrandComicsDatabase/gcd-django, Subscribed

Tested with all sequence views, some examples:

Character sequences unfiltered
image.png (view on web)

with filter:
image.png (view on web)

Feature:
image.png (view on web)

Creator:
image.png (view on web)

Universe correctly pops it:
image.png (view on web)

For anything not involved in Marvel/DC, universes filter doesnt appear whenno sequences have a universe in data to filter:
image.png (view on web)

And then finally, the addition of story type filter I noticed meant we started to overhang on mobile, this would have made it worse, so added a wrap, example on mobile size:
image.png (view on web)


You can view, comment on, or merge this pull request online at:

  https://github.com/GrandComicsDatabase/gcd-django/pull/690

Commit Summary

  • 801ec4c Add a filter to sequences to filter on universe

File Changes

(3 files)

Patch Links:


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <GrandComicsDatabase/gcd-django/pull/690@github.com>

JochenGCD

unread,
Jan 7, 2026, 2:54:20 PMJan 7
to GrandComicsDatabase/gcd-django, Subscribed

@jochengcd commented on this pull request.

This is filtering on the story universe, not the character universe ? To clarify, we maybe should label this with 'Story Universe' and not 'Universe' ?

Another thing, in difference to the other filters, here 'None' is a valid selection, i.e. filter for those stories without a universe set. Can we look into adding that ? Not sure if feasible, but the question will come from users.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <GrandComicsDatabase/gcd-django/pull/690/review/3636558127@github.com>

JochenGCD

unread,
Jan 7, 2026, 3:54:20 PMJan 7
to GrandComicsDatabase/gcd-django, Subscribed
jochengcd left a comment (GrandComicsDatabase/gcd-django#690)

https://django-filter.readthedocs.io/en/latest/guide/tips.html


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <GrandComicsDatabase/gcd-django/pull/690/c3720748942@github.com>

Adam Knights

unread,
Jan 15, 2026, 10:52:05 AMJan 15
to GrandComicsDatabase/gcd-django, Push

@adam-knights pushed 2 commits.

  • a5b502b Add a filter to sequences to filter on universe
  • 04c856f Universe sequence filter says Story Universe


View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <GrandComicsDatabase/gcd-django/pull/690/before/801ec4caec1c7892542ddf4d11aa60f1638ad6e1/after/04c856f5de040897bebb163dcd3d6f445ac66831@github.com>

Adam Knights

unread,
Jan 15, 2026, 10:53:43 AMJan 15
to GrandComicsDatabase/gcd-django, Subscribed
adam-knights left a comment (GrandComicsDatabase/gcd-django#690)

This is filtering on the story universe, not the character universe ? To clarify, we maybe should label this with 'Story Universe' and not 'Universe' ?

Correct, have updated for that before I forget.

Another thing, in difference to the other filters, here 'None' is a valid selection, i.e. filter for those stories without a universe set. Can we look into adding that ? Not sure if feasible, but the question will come from users.

I will give it a try :)


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <GrandComicsDatabase/gcd-django/pull/690/c3755528570@github.com>

JochenGCD

unread,
Jan 16, 2026, 5:52:09 PMJan 16
to GrandComicsDatabase/gcd-django, Subscribed

@jochengcd commented on this pull request.


In apps/select/views.py:

> @@ -931,6 +932,15 @@ def __init__(self, *args, **kwargs):
         if publishers:
             qs = Publisher.objects.filter(id__in=publishers)
             self.form['publisher'].field.queryset = qs
+        if universe:

Looking further, I don't think that this should in CommonFilter, since it only applies to Sequences ?


In apps/select/views.py:

> @@ -931,6 +932,15 @@ def __init__(self, *args, **kwargs):
         if publishers:
             qs = Publisher.objects.filter(id__in=publishers)
             self.form['publisher'].field.queryset = qs
+        if universe:
+            universes = set(self.qs.values_list(universe, flat=True))
+            universes.discard(None) # Remove None before checking if set is empty
+            if universes:
+                qs = Universe.objects.filter(id__in=universes).select_related('verse')

style guide of code is less then 80 characters


In apps/select/views.py:

> @@ -931,6 +932,15 @@ def __init__(self, *args, **kwargs):
         if publishers:
             qs = Publisher.objects.filter(id__in=publishers)
             self.form['publisher'].field.queryset = qs
+        if universe:
+            universes = set(self.qs.values_list(universe, flat=True))
+            universes.discard(None) # Remove None before checking if set is empty

adding
null_label='No Universe',
to universe = ModelMultipleChoiceFilter(...) will do the filtering on no universe set, which we should support.

But then the universe filter will not show when selecting that, so unsetting only by going back, which is not ideal. Removing will show the universe box for characters without any, which we don't want either.
Can there be a different check ?


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <GrandComicsDatabase/gcd-django/pull/690/review/3673023397@github.com>

JochenGCD

unread,
Jan 16, 2026, 5:59:15 PMJan 16
to GrandComicsDatabase/gcd-django, Subscribed

@jochengcd commented on this pull request.


In apps/select/views.py:

> @@ -931,6 +932,15 @@ def __init__(self, *args, **kwargs):
         if publishers:
             qs = Publisher.objects.filter(id__in=publishers)
             self.form['publisher'].field.queryset = qs
+        if universe:
+            universes = set(self.qs.values_list(universe, flat=True))
+            universes.discard(None) # Remove None before checking if set is empty
        if 'null' not in self.data.getlist('universe'):
            universes.discard(None) # Remove None before checking if set is empty


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <GrandComicsDatabase/gcd-django/pull/690/review/3673089783@github.com>

JochenGCD

unread,
Jan 16, 2026, 6:02:52 PMJan 16
to GrandComicsDatabase/gcd-django, Subscribed
jochengcd left a comment (GrandComicsDatabase/gcd-django#690)

Another aspect to consider, universe will show on all sequence list, also for creators, features, ... Which I am not sure we want ?


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <GrandComicsDatabase/gcd-django/pull/690/c3762161291@github.com>

Adam Knights

unread,
Jan 17, 2026, 3:06:22 PMJan 17
to GrandComicsDatabase/gcd-django, Subscribed
adam-knights left a comment (GrandComicsDatabase/gcd-django#690)

I also wonder now if we want this at all, we have pages such as https://www.comics.org/character/6122/issues/character_universe/3/

and your story type filter solved my immediate need.

We also have https://www.comics.org/universe/3/sequences/

The more I think about it, the more i wonder if this is adds the cumbersome of a filter that the users won't really need.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <GrandComicsDatabase/gcd-django/pull/690/c3764281153@github.com>

JochenGCD

unread,
Jan 18, 2026, 6:42:44 AMJan 18
to GrandComicsDatabase/gcd-django, Subscribed
jochengcd left a comment (GrandComicsDatabase/gcd-django#690)

Maybe ask on main on use cases ?

We can:

  • find issues with sequences of a character set in a specific universe
  • find issues set in a specific universe
  • find sequences set in a specific universe

We cannot:

  • find sequences of a character set in a specific universe
  • find issues or sequences of a character set in one of selected universes

But can we make use of that ? Adding many filters (at least in the current way) can become unwidely.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <GrandComicsDatabase/gcd-django/pull/690/c3765202585@github.com>

Adam Knights

unread,
Jan 19, 2026, 11:29:59 AMJan 19
to GrandComicsDatabase/gcd-django, Subscribed
adam-knights left a comment (GrandComicsDatabase/gcd-django#690)

Yeah i'll ask the question - and we can find issues of a character set in a specific universe with https://www.comics.org/character/6261/issues/story_universe/2/ - so just boils down to if its worth it for 1) sequences only and 2) selecting multiple story universes.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <GrandComicsDatabase/gcd-django/pull/690/c3769223057@github.com>

Adam Knights

unread,
Jan 31, 2026, 9:58:51 AM (3 days ago) Jan 31
to GrandComicsDatabase/gcd-django, Subscribed

Closed #690.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <GrandComicsDatabase/gcd-django/pull/690/issue_event/22429882159@github.com>

Adam Knights

unread,
Jan 31, 2026, 9:58:52 AM (3 days ago) Jan 31
to GrandComicsDatabase/gcd-django, Subscribed
adam-knights left a comment (GrandComicsDatabase/gcd-django#690)

Closing in favor of the new screens (to come) - will revisit once those in place.


Reply to this email directly, view it on GitHub, or unsubscribe.

You are receiving this because you are subscribed to this thread.Message ID: <GrandComicsDatabase/gcd-django/pull/690/c3828674240@github.com>

Reply all
Reply to author
Forward
0 new messages