| 368 | | class PagesInternal(models.Model): |
| 369 | | name = models.CharField(primary_key=True, max_length=150) |
| 370 | | plugin = models.ForeignKey( |
| 371 | | "Plugin", #to_field="id", |
| 372 | | help_text="The associated plugin" |
| 373 | | ) |
| 374 | | markup = models.ForeignKey("Markup", |
| 375 | | related_name="page_internal_markup", |
| 376 | | help_text="the used markup language for this page" |
| 377 | | ) |
| 378 | | |
| 379 | | createtime = models.DateTimeField(auto_now_add=True) |
| 380 | | lastupdatetime = models.DateTimeField(auto_now=True) |
| 381 | | createby = models.ForeignKey( |
| 382 | | User, related_name="page_internal_createby", |
| 383 | | null=True, blank=True, |
| 384 | | ) |
| 385 | | lastupdateby = models.ForeignKey( |
| 386 | | User, related_name="page_internal_lastupdateby", |
| 387 | | null=True, blank=True, |
| 388 | | ) |
| 389 | | |
| 390 | | content_html = models.TextField() |
| 391 | | content_js = models.TextField(blank=True) |
| 392 | | content_css = models.TextField(blank=True) |
| 393 | | description = models.TextField() |
| 394 | | |
| 395 | | class Admin: |
| 396 | | list_display = ("name", "description") |
| 397 | | #ordering = ('plugin',"name") |
| 398 | | list_filter = ("plugin",) |
| 399 | | date_hierarchy = 'lastupdatetime' |
| 400 | | search_fields = ["name", "content_html", "content_js", "content_css"] |
| 401 | | |
| 402 | | def __unicode__(self): |
| 403 | | return self.name |
| | 368 | #class PagesInternal(models.Model): |
| | 369 | # # Obsolete! |
| | 370 | # pass |