# 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):


from django.forms import ModelForm
from baobab.translate import models
# -*- coding: utf-8 -*-

"""
Re-define some default admin form
"""



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:

# 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
from django.forms import ModelForm
from baobab.translate import models

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

"""
Re-define some default admin form
"""



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