Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
Register base event for ICEKitURLField
Browse files Browse the repository at this point in the history
Make ICEkit Event items available in the `ICEKitURLField` customisation
of `AnyUrlField`.
  • Loading branch information
jmurty committed Nov 24, 2016
1 parent cb4c5f1 commit a82f071
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions icekit_events/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
from django.apps import AppConfig
from django.utils.module_loading import autodiscover_modules

from any_urlfield.forms import SimpleRawIdWidget

from icekit.fields import ICEkitURLField


class AppConfig(AppConfig):
name = '_'.join(__name__.split('.')[:-1])
Expand All @@ -17,3 +21,7 @@ class AppConfig(AppConfig):
def ready(self):
# look through installed apps to see what event types are registered
autodiscover_modules('event_type_plugins')

from .models import EventBase
ICEkitURLField.register_model(
EventBase, widget=SimpleRawIdWidget(EventBase), title='Event')

0 comments on commit a82f071

Please sign in to comment.