Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(678)

Unified Diff: charmworld/forms/featured.py

Issue 65550043: Promulgate bundles owned by ~charmers.
Patch Set: Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: charmworld/forms/featured.py
=== modified file 'charmworld/forms/featured.py'
--- charmworld/forms/featured.py 2013-04-17 15:03:35 +0000
+++ charmworld/forms/featured.py 2014-02-18 15:59:26 +0000
@@ -10,7 +10,23 @@
SchemaNode,
)
+from charmworld.search import BUNDLE
+
+
+def get_schema(kind):
+ """Based on the kind return the right schema."""
+ if kind == BUNDLE:
+ return BundleFeaturedness()
+ return CharmFeaturedness()
+
class CharmFeaturedness(MappingSchema):
- is_featured = SchemaNode(Boolean(), title='Feature this charm',
- missing=False)
+ is_featured = SchemaNode(
+ Boolean(), title='Feature this charm',
+ missing=False)
+
+
+class BundleFeaturedness(MappingSchema):
+ is_featured = SchemaNode(
+ Boolean(), title='Feature this bundle',
+ missing=False)
« no previous file with comments | « [revision details] ('k') | charmworld/jobs/ingest.py » ('j') | charmworld/jobs/lp.py » ('J')

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b