- Create Economist SubmissionTracking package correctly: * mainArticle = full blog post content * coverLetter = 216-word SIR— letter * Links to blog post via blogPostId - Archive 'Letter to The Economist' from blog posts (it's the cover letter) - Fix date display on article cards (use published_at) - Target publication already displaying via blue badge Database changes: - Make blogPostId optional in SubmissionTracking model - Economist package ID: 68fa85ae49d4900e7f2ecd83 - Le Monde package ID: 68fa2abd2e6acd5691932150 Next: Enhanced modal with tabs, validation, export 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
25 lines
754 B
Python
25 lines
754 B
Python
"""Private utility methods used by the subset modules"""
|
|
|
|
|
|
def _add_method(*clazzes):
|
|
"""Returns a decorator function that adds a new method to one or
|
|
more classes."""
|
|
|
|
def wrapper(method):
|
|
done = []
|
|
for clazz in clazzes:
|
|
if clazz in done:
|
|
continue # Support multiple names of a clazz
|
|
done.append(clazz)
|
|
assert clazz.__name__ != "DefaultTable", "Oops, table class not found."
|
|
assert not hasattr(
|
|
clazz, method.__name__
|
|
), "Oops, class '%s' has method '%s'." % (clazz.__name__, method.__name__)
|
|
setattr(clazz, method.__name__, method)
|
|
return None
|
|
|
|
return wrapper
|
|
|
|
|
|
def _uniq_sort(l):
|
|
return sorted(set(l))
|