예제 #1
0
 def validatesite(self, sitename):
     if lexicon.anstr(sitename) & (sitename == 'summary'):
         return True
     if lexicon.tier(sitename):
         sitelist = popCommonDB.getSitesList(DBUSER)
         if sitename in sitelist:
             return True
     raise Paramvalidationexception('sitename', 'param must be a valid site name')
예제 #2
0
 def validatesite(self, sitename):
     if lexicon.anstr(sitename) & (sitename == 'summary'):
         return True
     if lexicon.tier(sitename):
         sitelist = popCommonDB.getSitesList(DBUSER)
         if sitename in sitelist:
             return True
     raise Paramvalidationexception('sitename',
                                    'param must be a valid site name')
예제 #3
0
from django.conf.urls import *
from Apps.popCommon.database import popCommonDB
from Apps.popCommon.utils.confSettings import confSettings

#from popularity.views import data_views
#from popularity.views import rendering_views
#from Popularity.apps.popularity.views import rendering_views
from Apps.popularity.views import data_collection as getter
from Apps.popularity.views import rendering_views as render



popsettings = confSettings()
DBUSER = popsettings.getSetting("popularity", "DBUSER")
sitelist = popCommonDB.getSitesList(DBUSER)

urlpatterns = patterns('',

                       #url(r'^$', views.index, {}, "popularityindex"),
                       url(r'^$'    , render.renderTemplate, {'tmplPath': 'popularity/index.html', 'contextRequests': {"siteslist": popCommonDB.getSitesList(DBUSER)}    }, "popularityindex"    ),
                       
                       # Plots
                       url(r'^dataTier$'       , render.renderTemplate, {'tmplPath': 'popularity/dataTierPlot.html'   , 'contextRequests': {"siteslist": sitelist}    }, "datatierplot"   ),
                       url(r'^dataSetPlot$'    , render.renderTemplate, {'tmplPath': 'popularity/dataSetPlot.html'    , 'contextRequests': {"siteslist": sitelist}    }, "datasetplot"    ),
                       url(r'^dataSetNamePlot$', render.renderTemplate, {'tmplPath': 'popularity/dataSetNamePlot.html', 'contextRequests': {"siteslist": sitelist}    }, "datasetnameplot"),

                       url(r'^customDSPlot$'          , render.renderTemplate, {'tmplPath': 'popularity/customDataSetPlot.html'         , 'contextRequests': {"siteslist": sitelist}    }, "customdsplot" ),
                       url(r'^customDTPlot$'          , render.renderTemplate, {'tmplPath': 'popularity/customDataTierPlot.html'        , 'contextRequests': {"siteslist": sitelist}    }, "customdtplot" ),
                       url(r'^customProcessedDSPlot$' , render.renderTemplate, {'tmplPath': 'popularity/customProcessedDataSetPlot.html', 'contextRequests': {"siteslist": sitelist}    }, "customdsnplot"),

                       url(r'^dataTierBar$'    , render.renderTemplate, {'tmplPath': 'popularity/dataTierBar.html', 'contextRequests': {"siteslist": sitelist}    }, "datatierbarplot"    ),
예제 #4
0
from django.conf.urls import *
from Apps.popCommon.database import popCommonDB
from Apps.popCommon.utils.confSettings import confSettings

#from popularity.views import data_views
#from popularity.views import rendering_views
#from Popularity.apps.popularity.views import rendering_views
from Apps.popularity.views import data_collection as getter
from Apps.popularity.views import rendering_views as render

popsettings = confSettings()
DBUSER = popsettings.getSetting("popularity", "DBUSER")
sitelist = popCommonDB.getSitesList(DBUSER)

urlpatterns = patterns(
    '',

    #url(r'^$', views.index, {}, "popularityindex"),
    url(
        r'^$', render.renderTemplate, {
            'tmplPath': 'popularity/index.html',
            'contextRequests': {
                "siteslist": popCommonDB.getSitesList(DBUSER)
            }
        }, "popularityindex"),

    # Plots
    url(
        r'^dataTier$', render.renderTemplate, {
            'tmplPath': 'popularity/dataTierPlot.html',
            'contextRequests': {
예제 #5
0
def validateSite(sitename):
    #return re.match(r'^T[0-9]_[A-Z]+_[a-z,A-Z]+|summary$', sitename) != None
    sitelist = popCommonDB.getSitesList()
    sitelist.append("summary")
    return sitename in sitelist
예제 #6
0
def validateSite(sitename):
    #return re.match(r'^T[0-9]_[A-Z]+_[a-z,A-Z]+|summary$', sitename) != None
    sitelist = popCommonDB.getSitesList()
    sitelist.append("summary")
    return sitename in sitelist