src/p4l/settings.py
changeset 16 19fe06edb58d
parent 9 3bc55f57b2b1
child 20 fa466993084a
equal deleted inserted replaced
15:be595253ced5 16:19fe06edb58d
   129     'django.contrib.sites',
   129     'django.contrib.sites',
   130     'django.contrib.messages',
   130     'django.contrib.messages',
   131     'django.contrib.staticfiles',
   131     'django.contrib.staticfiles',
   132     'django.contrib.admin',
   132     'django.contrib.admin',
   133     'south',
   133     'south',
       
   134     'rest_framework',
   134     'p4l'
   135     'p4l'
   135 )
   136 )
   136 
   137 
   137 # A sample logging configuration. The only tangible logging
   138 # A sample logging configuration. The only tangible logging
   138 # performed by this configuration is to send an email to
   139 # performed by this configuration is to send an email to
   164 }
   165 }
   165 
   166 
   166 NB_RECORDS_BY_PAGE = 20
   167 NB_RECORDS_BY_PAGE = 20
   167 SPARQL_QUERY_ENDPOINT = "http://localhost:8080/openrdf-sesame/repositories/plan4learning"
   168 SPARQL_QUERY_ENDPOINT = "http://localhost:8080/openrdf-sesame/repositories/plan4learning"
   168 
   169 
       
   170 REST_FRAMEWORK = {
       
   171     # Use hyperlinked styles by default.
       
   172     # Only used if the `serializer_class` attribute is not set on a view.
       
   173     'DEFAULT_MODEL_SERIALIZER_CLASS':
       
   174         'rest_framework.serializers.HyperlinkedModelSerializer',
       
   175 
       
   176     # Use Django's standard `django.contrib.auth` permissions,
       
   177     # or allow read-only access for unauthenticated users.
       
   178     'DEFAULT_PERMISSION_CLASSES': [
       
   179         'rest_framework.permissions.DjangoModelPermissionsOrAnonReadOnly'
       
   180     ],
       
   181                   
       
   182     'PAGINATE_BY': 20,
       
   183     'PAGINATE_BY_PARAM': 'page_size' 
       
   184 }
       
   185 
   169 from config import *  # @UnusedWildImport
   186 from config import *  # @UnusedWildImport
   170 
   187 
   171 if not "SRC_BASE_URL" in locals():
   188 if not "SRC_BASE_URL" in locals():
   172     SRC_BASE_URL = BASE_URL + __name__.split('.')[0] + '/'     
   189     SRC_BASE_URL = BASE_URL + __name__.split('.')[0] + '/'