Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

from django.db import models 

from django.conf import settings 

from django.contrib.sites.models import Site 

 

 

if getattr(settings, 'GOOGLE_ANALYTICS_MODEL', False): 

    class Analytics(models.Model): 

        site = models.ForeignKey(Site) 

        analytics_code = models.CharField(blank=True, max_length=100) 

 

        def __unicode__(self): 

            return u"%s" % (self.analytics_code)