forked from rc/aircox
		
	nc
This commit is contained in:
		@ -484,6 +484,7 @@ class ProgramPage(Publication):
 | 
				
			|||||||
    def save(self, *args, **kwargs):
 | 
					    def save(self, *args, **kwargs):
 | 
				
			||||||
        # set publish_as
 | 
					        # set publish_as
 | 
				
			||||||
        if self.program and not self.pk:
 | 
					        if self.program and not self.pk:
 | 
				
			||||||
 | 
					            super().save()
 | 
				
			||||||
            self.publish_as = self
 | 
					            self.publish_as = self
 | 
				
			||||||
        super().save(*args, **kwargs)
 | 
					        super().save(*args, **kwargs)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -67,6 +67,10 @@ ul {
 | 
				
			|||||||
    padding: 0.4em;
 | 
					    padding: 0.4em;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.menu:empty {
 | 
				
			||||||
 | 
					    display: none;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    body > .top *,
 | 
					    body > .top *,
 | 
				
			||||||
    body > .header * {
 | 
					    body > .header * {
 | 
				
			||||||
        vertical-align: middle;
 | 
					        vertical-align: middle;
 | 
				
			||||||
@ -123,6 +127,9 @@ body > .header {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.page_left { margin-right: 2em; }
 | 
				
			||||||
 | 
					.page_right { margin-right: 2em; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.page_left, .page_right {
 | 
					.page_left, .page_right {
 | 
				
			||||||
    max-width: 16em;
 | 
					    max-width: 16em;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -82,7 +82,7 @@ a:hover > .small_icon {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
main {
 | 
					main {
 | 
				
			||||||
    background-color: rgba(255,255,255,0.9);
 | 
					    background-color: rgba(255,255,255,0.9);
 | 
				
			||||||
    margin: 0em 2em;
 | 
					    margin: 0em 0em;
 | 
				
			||||||
    box-shadow: 0em 0em 0.2em black;
 | 
					    box-shadow: 0em 0em 0.2em black;
 | 
				
			||||||
    width: 60%;
 | 
					    width: 60%;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@ -110,6 +110,7 @@ main .post_content section {
 | 
				
			|||||||
/** detail view **/
 | 
					/** detail view **/
 | 
				
			||||||
main.detail {
 | 
					main.detail {
 | 
				
			||||||
    padding: 0em;
 | 
					    padding: 0em;
 | 
				
			||||||
 | 
					    margin: 0em;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    main > .content {
 | 
					    main > .content {
 | 
				
			||||||
 | 
				
			|||||||
@ -12,13 +12,17 @@ class TemplateMixin(models.Model):
 | 
				
			|||||||
    Template to use for the mixin. If not given, use
 | 
					    Template to use for the mixin. If not given, use
 | 
				
			||||||
    "app_label/sections/section_class.html"
 | 
					    "app_label/sections/section_class.html"
 | 
				
			||||||
    """
 | 
					    """
 | 
				
			||||||
 | 
					    snake_name = None
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					    Used in template as class
 | 
				
			||||||
 | 
					    """
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @classmethod
 | 
					    @classmethod
 | 
				
			||||||
    def get_template_name(cl):
 | 
					    def get_template_name(cl):
 | 
				
			||||||
        if not cl.template_name:
 | 
					        if not cl.template_name:
 | 
				
			||||||
            snake_name = camelcase_to_underscore(cl.__name__)
 | 
					            cl.snake_name = camelcase_to_underscore(cl.__name__)
 | 
				
			||||||
            cl.template_name = '{}/sections/{}.html'.format(
 | 
					            cl.template_name = '{}/sections/{}.html'.format(
 | 
				
			||||||
                cl._meta.app_label, snake_name
 | 
					                cl._meta.app_label, cl.snake_name
 | 
				
			||||||
            )
 | 
					            )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if snake_name != 'section_item':
 | 
					            if snake_name != 'section_item':
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user