Make sure articles are unique
Closed this issue · 6 comments
bartaelterman commented
- Option 1: Set a unique constraint on the articles url. Problem: articles scraped before 2013 don't have a url. (see also #53)
- Option 2: Set a unique constraint on a combination of the fields
news_journal
,published_at
andtitle
bartaelterman commented
niconoe commented
Yes, it can be implemented using unique_together, and Django will create constraint at the database level. Does that looks good?
bartaelterman commented
Excellent!
peterdesmet commented
Since URLs are still mandatory, I cannot test if articles without URL are displayed nicely on the front end. Don't close this issue until this has been tested.
niconoe commented
peterdesmet commented
Frontend works: only shows newspaper name, without link if no URL is available.