| | 291 | class PageArchiv(models.Model): |
| | 292 | """ |
| | 293 | A simple archiv for old cms page content. |
| | 294 | """ |
| | 295 | # Explicite id field, so we can insert a help_text ;) |
| | 296 | id = models.AutoField(primary_key=True, help_text="The internal page ID.") |
| | 297 | |
| | 298 | content = models.TextField(blank=True, help_text="The CMS page content.") |
| | 299 | |
| | 300 | parent = models.ForeignKey( |
| | 301 | "self", null=True, blank=True, |
| | 302 | to_field="id", help_text="the higher-ranking father page", |
| | 303 | ) |
| | 304 | position = models.IntegerField( |
| | 305 | default = 0, |
| | 306 | help_text = "ordering weight for sorting the pages in the menu." |
| | 307 | ) |
| | 308 | |
| | 309 | name = models.CharField(max_length=150, help_text="A short page name") |
| | 310 | |
| | 311 | shortcut = models.CharField( |
| | 312 | max_length=150, help_text="shortcut to built the URLs" |
| | 313 | ) |
| | 314 | title = models.CharField( |
| | 315 | blank=True, max_length=150, help_text="A long page title" |
| | 316 | ) |
| | 317 | |
| | 318 | template = models.ForeignKey( |
| | 319 | "Template", to_field="id", help_text="the used template for this page" |
| | 320 | ) |
| | 321 | style = models.ForeignKey( |
| | 322 | "Style", to_field="id", help_text="the used stylesheet for this page" |
| | 323 | ) |
| | 324 | markup = models.ForeignKey("Markup", |
| | 325 | related_name="pageachiv_markup", |
| | 326 | help_text="the used markup language for this page" |
| | 327 | ) |
| | 328 | |
| | 329 | keywords = models.CharField( |
| | 330 | blank=True, max_length=255, |
| | 331 | help_text="Keywords for the html header. (separated by commas)" |
| | 332 | ) |
| | 333 | description = models.CharField( |
| | 334 | blank=True, max_length=255, |
| | 335 | help_text="Short description of the contents. (for the html header)" |
| | 336 | ) |
| | 337 | |
| | 338 | createtime = models.DateTimeField( |
| | 339 | auto_now_add=True, help_text="Create time", |
| | 340 | ) |
| | 341 | lastupdatetime = models.DateTimeField( |
| | 342 | auto_now=True, help_text="Time of the last change.", |
| | 343 | ) |
| | 344 | createby = models.ForeignKey( |
| | 345 | User, editable=False, related_name="pageachiv_createby", |
| | 346 | help_text="User how create the current page.", |
| | 347 | ) |
| | 348 | lastupdateby = models.ForeignKey( |
| | 349 | User, editable=False, related_name="pageachiv_lastupdateby", |
| | 350 | help_text="User as last edit the current page.", |
| | 351 | ) |
| | 352 | |
| | 353 | showlinks = models.BooleanField(default=True, |
| | 354 | help_text="Put the Link to this page into Menu/Sitemap etc.?" |
| | 355 | ) |
| | 356 | permitViewPublic = models.BooleanField(default=True, |
| | 357 | help_text="Can anonymous see this page?" |
| | 358 | ) |
| | 359 | |
| | 360 | permitViewGroup = models.ForeignKey( |
| | 361 | Group, related_name="pageachiv_permitViewGroup", null=True, blank=True, |
| | 362 | help_text="Limit viewable to a group?" |
| | 363 | ) |
| | 364 | |
| | 365 | permitEditGroup = models.ForeignKey( |
| | 366 | Group, related_name="pageachiv_permitEditGroup", null=True, blank=True, |
| | 367 | help_text="Usergroup how can edit this page." |
| | 368 | ) |
| | 369 | |
| | 370 | original = models.ForeignKey("Page") |
| | 371 | |
| | 372 | class Admin: |
| | 373 | list_display = ( |
| | 374 | "id", "shortcut", "name", "title", "description", |
| | 375 | "lastupdatetime", "lastupdateby" |
| | 376 | ) |
| | 377 | |
| | 378 | #______________________________________________________________________________ |
| | 379 | |