Commits

Kevin Veroneau committed 3cbfa43 Draft

Fixed a couple of minor bugs.

  • Participants
  • Parent commits 515d482

Comments (0)

Files changed (3)

File collection/admin.py

 from django.contrib import admin
-from collection.models import Genre, Movie, Director
+from collection.models import Genre, Movie, Director, Watchlist
 
 class GenreAdmin(admin.ModelAdmin):
     prepopulated_fields = {'slug': ('name',)}
     search_fields = ['title',]
     prepopulated_fields = {'slug': ('title',)}
 
+class WatchlistAdmin(admin.ModelAdmin):
+    filter_horizontal = ('movies', 'genres',)
+
 admin.site.register(Genre, GenreAdmin)
 admin.site.register(Movie, MovieAdmin)
 admin.site.register(Director)
+admin.site.register(Watchlist, WatchlistAdmin)

File collection/models.py

     owner = models.OneToOneField(User)
     movies = models.ManyToManyField(Movie)
     genres = models.ManyToManyField(Genre)
+    def __unicode__(self):
+        return u"%s's watchlist" % self.owner.get_full_name()

File collection/templates/collection/notifications/new_movie.txt

   Nick just added a {{movie.genre}} movie!  A little bird told me that you like these kind of movies.
   
   Movie title: {{movie}}
-  URL: {{movie.get_absolute_url}}
+  URL: http://www.cinema-nick.com{{movie.get_absolute_url}}
 
 See you at Nick's for the next exciting {{movie.genre}} movie!