Quick way to set up a faceted search/database using Django?

62 views
Skip to first unread message

Ari Davidow

unread,
Jun 7, 2020, 5:30:03 PM6/7/20
to 'Lance Ellinghaus' via Django users
One response to the #blacklivesmatter protests in response to the
murder of George Floyd and so many others could be to put up a web
page - links to local protests/vigils, videos to watch (especially
if white and learning about "white privilege", organizations who can
use donations specifically right now, legislative initiatives and
local town initiatives to reform policing, etc.

In the old days, I would put the whole kit and caboodle up onto a
long static web page (or cms page) and edit the thing manually,
maintaining a host of links to the different sections and maybe even
repeating information so that people could find it in different
sections, etc.

This is a basic database/facets question, I think. What is the
easiest way to put together a database noting a few common things
(link field, title, description, tags) and then put together
something that helps people construct a narrative - "what is
happening today" or "who is working on this issue" or "what is
available on video" and requires minimum maintenance (put stuff in
the db once) and maximum support for those narratives.

It feels pretty basic, but I have always done it manually before.
There is no way I can usefully maintain something when so much
changes so quickly if I have to edit each appearance of each link -
and no way to make it easy for people to find things if I work that
way.

Suggestions? What is like this that I might study and make suit?
What do developers call this such that I can (relatively) quickly
figure out how to set this up in, say, Django or React.js or
whatever appropriate Framework? What would the relevant modules, or the relevant approach be?
TIA for any advice,
ari

Cam

unread,
Jun 7, 2020, 10:21:59 PM6/7/20
to django...@googlegroups.com
Unsubscribe

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/E45B3A8C-7ECE-460E-92B3-77D78E2F91D3%40gmail.com.

nei...@nein09.com

unread,
Jun 7, 2020, 11:08:10 PM6/7/20
to django...@googlegroups.com
Ari,

If I were going to do this in Django, I think what I’d do is have a database table with the things you mention in it like ‘link’, ’title’, etc, and a ManyToManyField to a tags table or a “sections” table - “sections” being the “what is happening” /“who is working on this” things you mentioned.

Then you could make a view that gets all of the things in that table, grouped by section, and template that displays each section by looping through the groups (or using the regroup tag).

I feel like there must be some kind of out-of-the-box CMS that can do this though, because it sounds like something that a lot people would probably want! But I don’t know of one, myself.

Good luck!
Melinda
Reply all
Reply to author
Forward
0 new messages