Revision 47394a46

b/cloudcms/migrations/0004_auto__add_field_application_index_url.py
1
# encoding: utf-8
2
import datetime
3
from south.db import db
4
from south.v2 import SchemaMigration
5
from django.db import models
6

  
7
class Migration(SchemaMigration):
8
    
9
    def forwards(self, orm):
10
        
11
        # Adding field 'Application.index_url'
12
        db.add_column('cloudcms_application', 'index_url', self.gf('django.db.models.fields.CharField')(default='/', max_length=255), keep_default=False)
13
    
14
    
15
    def backwards(self, orm):
16
        
17
        # Deleting field 'Application.index_url'
18
        db.delete_column('cloudcms_application', 'index_url')
19
    
20
    
21
    models = {
22
        'cloudcms.application': {
23
            'Meta': {'object_name': 'Application'},
24
            'app_url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
25
            'code': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
26
            'extra_styles': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
27
            'facebook_username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
28
            'footer_bottom': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
29
            'footer_top': ('django.db.models.fields.TextField', [], {'default': "''", 'blank': 'True'}),
30
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
31
            'index_url': ('django.db.models.fields.CharField', [], {'default': "'/'", 'max_length': '255'}),
32
            'linked_in_username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'}),
33
            'logo': ('feincms.module.medialibrary.fields.MediaFileForeignKey', [], {'to': "orm['medialibrary.MediaFile']", 'null': 'True', 'blank': 'True'}),
34
            'show_twitter_feed_on_top': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'blank': 'True'}),
35
            'site': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['sites.Site']"}),
36
            'title': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
37
            'twitter_username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'blank': 'True'})
38
        },
39
        'medialibrary.category': {
40
            'Meta': {'object_name': 'Category'},
41
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
42
            'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['medialibrary.Category']"}),
43
            'slug': ('django.db.models.fields.SlugField', [], {'max_length': '150', 'db_index': 'True'}),
44
            'title': ('django.db.models.fields.CharField', [], {'max_length': '200'})
45
        },
46
        'medialibrary.mediafile': {
47
            'Meta': {'object_name': 'MediaFile'},
48
            'categories': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': "orm['medialibrary.Category']", 'null': 'True', 'blank': 'True'}),
49
            'copyright': ('django.db.models.fields.CharField', [], {'max_length': '200', 'blank': 'True'}),
50
            'created': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
51
            'file': ('django.db.models.fields.files.FileField', [], {'max_length': '255'}),
52
            'file_size': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
53
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
54
            'type': ('django.db.models.fields.CharField', [], {'max_length': '12'})
55
        },
56
        'sites.site': {
57
            'Meta': {'object_name': 'Site', 'db_table': "'django_site'"},
58
            'domain': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
59
            'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
60
            'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
61
        }
62
    }
63
    
64
    complete_apps = ['cloudcms']
b/cloudcms/models.py
52 52
    site = models.ForeignKey(sites_models.Site)
53 53
    app_url = models.URLField(help_text="The url of the application UI (not "\
54 54
            "the cms", verify_exists=False, blank=True, null=True)
55

  
55
    index_url = models.CharField(max_length=255, default="/", blank=False,
56
            null=False)
56 57
    linked_in_username = models.CharField(max_length=255, blank=True)
57 58
    twitter_username = models.CharField(max_length=255, blank=True)
58 59
    facebook_username = models.CharField(max_length=255, blank=True)
b/cloudcms/templates/cms/base.html
50 50
  {{ feincms_page.content.media }}
51 51
  {% endblock %}
52 52

  
53

  
54 53
  {% block page.scripts.cloudbar %}
55 54
      {% if CLOUDBAR_ACTIVE %} {{ CLOUDBAR_CODE }} {% endif %}
56 55
  {% endblock %}
......
72 71
</head>
73 72

  
74 73
<body class='cms-page-{{ feincms_page.slug }}'>
74
    {% block page.mainbody %}
75 75
    <div class='container'>
76 76
        <div class='header'>
77 77
            <div class="mainlogo">
78 78
                    {% if APP.logo %}
79
                        <a href="/" title="{{ APP.title }}">
79
                        <a href="{{ APP.index_url }}" title="{{ APP.title }}">
80 80
                            <img src="{{ APP.logo.get_absolute_url }}" alt="{{ APP.title }}" />
81 81
                        </a>
82 82
                    {% else %}
......
123 123
    <div class="footer">
124 124
        {% include "cms/footer.html" %}
125 125
    </div>
126
    {% endblock page.mainbody %}
126 127
</body>
127 128
</html>

Also available in: Unified diff