def connect(): # TODO catch other cases, too (eg project.pre_delete post_update_rlstats.connect(visit_url) project_form_init.connect(add_web_hook_field) post_proj_save_m2m.connect(save_web_hook)
""" content = CompressedTextField(null=False, blank=False, help_text=_("This is the actual content of the template")) resource = models.OneToOneField(Resource, verbose_name=_("Resource"),unique=True, blank=False, null=False,related_name="source_file_template", help_text=_("This is the template of the imported source file which is" " used to export translation files from the db to the user.")) class Meta: verbose_name = _('Template') verbose_name_plural = _('Templates') ordering = ['resource'] post_update_rlstats.connect(check_and_notify_resource_full_reviewed) class ReviewHistory(models.Model): """Keep a log of who reviewed what and when.""" REVIEW_ACTIONS = ( ('R', 'Reviewed'), ('U', 'Unreviewed'), ) translation_id = models.IntegerField('Translation', blank=True, null=True, help_text='The ID of the translation under review.') project_id = models.IntegerField('Project ID', blank=False, null=False, db_index=True, help_text='The project that this translation belongs to.')
Update the last update and last committer. """ self.last_update = datetime.datetime.now() if user: self.last_committer = user class Template(models.Model): """ Source file template for a specific resource. This model holds the source file template in a compressed textfield to save space in the database. All translation strings are changed with the md5 hashes of the SourceEntity string which enables us to do a quick search and replace each time we want to recreate the file. """ content = CompressedTextField(null=False, blank=False, help_text=_("This is the actual content of the template")) resource = models.OneToOneField(Resource, verbose_name=_("Resource"),unique=True, blank=False, null=False,related_name="source_file_template", help_text=_("This is the template of the imported source file which is" " used to export translation files from the db to the user.")) class Meta: verbose_name = _('Template') verbose_name_plural = _('Templates') ordering = ['resource'] post_update_rlstats.connect(check_and_notify_resource_full_reviewed)
def connect(): # TODO catch other cases, too (eg project.pre_delete post_update_rlstats.connect(visit_url) project_form_init.connect(add_web_hook_field) post_proj_save_m2m.connect(save_web_hook)