# Path: baobab/utils/admin.py
# class TabularInline(DjangoTabularInline):
# 
#     def get_formset(self, request, obj=None, **kwargs):
#         formset = super(DjangoTabularInline, self).get_formset(request,
#                                                                obj=obj,
#                                                                **kwargs)
#         formset.form.request = request
#         return formset
# 
# Path: baobab/translate/models.py
# class Lang(models.Model):
# class EventData(models.Model):
#     class Meta:
# class EventLogData(models.Model):
#     class Meta:
# class Event(BackOfficeEvent):
#     class Meta:
# class EventLog(BackOfficeEventLog):
#     class Meta:
#     def __unicode__(self):
# 
# Path: baobab/translate/adminform.py
# class EventDataForm(ModelForm):
# 
#     def save(self, commit=True):
#         if not self.instance:
#             self.instance.user = self.request.user
#         return super(EventDataForm, self).save(commit)
# 
#     class Meta:
#         model = models.EventData
# 
# class EventLogDataForm(ModelForm):
# 
#     def save(self, commit=True):
#         if self.instance:
#             self.instance.user = self.request.user
#         return super(EventLogDataForm, self).save(commit)
# 
#     class Meta:
#         model = models.EventLogData


from baobab.utils.admin import TabularInline
from baobab.translate import models
from baobab.translate.adminform import EventDataForm, EventLogDataForm
# -*- coding: utf-8 -*-

"""
all the inline class
"""



class EventDataInline(TabularInline):
    form = EventDataForm
    model = models.EventData
    fields = ['lang', 'title', 'summary']
    extra = models.Lang.objects.count()
    max_num = extra

    # XXX for safety
    def has_delete_permission(self, request, obj=None):
        return False



# Path: baobab/utils/admin.py
# class TabularInline(DjangoTabularInline):
# 
#     def get_formset(self, request, obj=None, **kwargs):
#         formset = super(DjangoTabularInline, self).get_formset(request,
#                                                                obj=obj,
#                                                                **kwargs)
#         formset.form.request = request
#         return formset
# 
# Path: baobab/translate/models.py
# class Lang(models.Model):
# class EventData(models.Model):
#     class Meta:
# class EventLogData(models.Model):
#     class Meta:
# class Event(BackOfficeEvent):
#     class Meta:
# class EventLog(BackOfficeEventLog):
#     class Meta:
#     def __unicode__(self):
# 
# Path: baobab/translate/adminform.py
# class EventDataForm(ModelForm):
# 
#     def save(self, commit=True):
#         if not self.instance:
#             self.instance.user = self.request.user
#         return super(EventDataForm, self).save(commit)
# 
#     class Meta:
#         model = models.EventData
# 
# class EventLogDataForm(ModelForm):
# 
#     def save(self, commit=True):
#         if self.instance:
#             self.instance.user = self.request.user
#         return super(EventLogDataForm, self).save(commit)
# 
#     class Meta:
#         model = models.EventLogData


# Path: baobab/translate/admininline.py
from baobab.utils.admin import TabularInline
from baobab.translate import models
from baobab.translate.adminform import EventDataForm, EventLogDataForm

# -*- coding: utf-8 -*-

"""
all the inline class
"""



class EventDataInline(TabularInline):
    form = EventDataForm
    model = models.EventData
    fields = ['lang', 'title', 'summary']
    extra = models.Lang.objects.count()
    max_num = extra

    # XXX for safety
    def has_delete_permission(self, request, obj=None):
        return False



class EventLogDataInline(TabularInline):