mirror of
https://github.com/pacnpal/thrillwiki_django_no_react.git
synced 2025-12-20 17:31:09 -05:00
Add comments app with models, views, and tests; integrate comments into existing models
This commit is contained in:
@@ -41,6 +41,10 @@ class RideModel(HistoricalModel):
|
||||
)
|
||||
created_at = models.DateTimeField(auto_now_add=True)
|
||||
updated_at = models.DateTimeField(auto_now=True)
|
||||
comments = GenericRelation('comments.CommentThread',
|
||||
related_name='ride_model_threads',
|
||||
related_query_name='comments_thread'
|
||||
)
|
||||
|
||||
class Meta:
|
||||
ordering = ['manufacturer', 'name']
|
||||
@@ -179,6 +183,10 @@ class Ride(HistoricalModel):
|
||||
updated_at = models.DateTimeField(auto_now=True)
|
||||
photos = GenericRelation('media.Photo')
|
||||
reviews = GenericRelation('reviews.Review')
|
||||
comments = GenericRelation('comments.CommentThread',
|
||||
related_name='ride_threads',
|
||||
related_query_name='comments_thread'
|
||||
)
|
||||
|
||||
class Meta:
|
||||
ordering = ['name']
|
||||
|
||||
Reference in New Issue
Block a user