Test coverage report: multilingual_events.forms

# multilingual_events.forms: 14 total statements, 0.0% covered

Generated: Thu 2013-02-28 16:32 SGT

Source file: /Users/martin/Repos/django-multilingual-events/multilingual_events/forms.py

Stats: 0 executed, 10 missed, 4 excluded, 17 ignored

1. `"""Forms for the ``multilingual_events`` app."""`
2. `from django.contrib import admin`
3. `from django.contrib.admin.widgets import ForeignKeyRawIdWidget`
4. `from django.forms.models import ModelForm`
5. ``
6. `from .models import EventAgendaSession, EventAgendaTalk`
7. ``
8. ``
9. `class EventAgendaAdminWithDocumentMixin(object):`
10. `"""`
11. `Mixin for cms plugins that have a FK to ``document_library.Document``.`
12. ``
13. `"""`
14. `def __init__(self, *args, **kwargs):`
15. `super(EventAgendaAdminWithDocumentMixin, self).__init__(`
16. `*args, **kwargs)`
17. `self.fields['document'].widget = ForeignKeyRawIdWidget(`
18. `self._meta.model._meta.get_field('document').rel, admin.site,`
19. `)`
20. ``
21. ``
22. `class EventAgendaSessionForm(EventAgendaAdminWithDocumentMixin, ModelForm):`
23. `"""Admin form for the ``EventAgendaSession`` plugin."""`
24. `class Meta:`
25. `model = EventAgendaSession`
26. ``
27. ``
28. `class EventAgendaTalkForm(EventAgendaAdminWithDocumentMixin, ModelForm):`
29. `"""Admin form for the ``EventAgendaSession`` plugin."""`
30. `class Meta:`
31. `model = EventAgendaTalk`