コード例 #1
0
ファイル: views.py プロジェクト: felipecvalentim/poppet
def admin_clients():
    user_form = UserForm()    
    site_form = WifiSiteForm()
    site_form.populate()
    newuser_form = UserForm()
    newuser_form.populate()    
    return render_template('admin/clients.html',user_form=user_form,site_form=site_form,newuser_form=newuser_form)
コード例 #2
0
ファイル: views.py プロジェクト: felipecvalentim/poppet
def admin_admins():
    user_form = UserForm()    
    site_form = WifiSiteForm()
    site_form.populate()
    admin_form = UserForm()
    admin_form.populate()    
    return render_template('admin/admins.html',user_form=user_form,site_form=site_form,admin_form=admin_form)
コード例 #3
0
def client_vouchers_designer(site_id=None):
    #Validate SiteID
    wifisite = Wifisite.query.filter_by(id=site_id).first()
    if not wifisite:
        current_app.logger.debug(
            "Site Manage URL called with invalid paramters site_id:%s userid:%s"
            % (site_id, current_user.id))
        abort(404)

    user_form = UserForm()
    voucherdesign_form = VoucherDesignForm()
    fakevoucher = Voucher(bytes_t=1000,
                          voucher='GSG#A$#S$',
                          duration_t="1 Hr",
                          speed_dl=256,
                          speed_ul=100)
    voucherdesign = Voucherdesign.query.filter_by(site_id=site_id).first()
    site_form = WifiSiteForm()
    site_form.populate()
    voucherfilesform = VoucherFilesForm()
    return render_template("admin/voucher_designer.html",
                           site_id=site_id,
                           site_form=site_form,
                           user_form=user_form,
                           wifisite=wifisite,
                           voucherdesign_form=voucherdesign_form,
                           voucherfilesform=voucherfilesform,
                           fakevoucher=fakevoucher,
                           voucherdesign=voucherdesign)
コード例 #4
0
ファイル: views.py プロジェクト: felipecvalentim/poppet
def admin_site(site_id):
    wifisite = Wifisite.query.filter_by(id=site_id).first()
    if not wifisite:
        current_app.logger.error("Trying to access unknown site ID:%s"%request.url)
        abort(404)
    user_form = UserForm()    
    site_form = WifiSiteForm()
    site_form.populate()
    return render_template('admin/site.html',user_form=user_form,site_form=site_form,site_id=site_id,wifisite=wifisite)
コード例 #5
0
ファイル: views.py プロジェクト: felipecvalentim/poppet
def admin_settings( ):
    #get all the sites
    settingsform = SettingsForm()
    settingsform.populate()    

    user_form = UserForm()
    site_form = WifiSiteForm()
    site_form.populate()    
    return render_template('admin/settings.html',settingsform=settingsform,user_form=user_form,site_form=site_form)
コード例 #6
0
ファイル: views.py プロジェクト: vlf1991/poppet-1
def admin_admins():
    user_form = UserForm()
    site_form = WifiSiteForm()
    site_form.populate()
    admin_form = UserForm()
    admin_form.populate()
    return render_template('admin/admins.html',
                           user_form=user_form,
                           site_form=site_form,
                           admin_form=admin_form)
コード例 #7
0
ファイル: views.py プロジェクト: vlf1991/poppet-1
def admin_clients():
    user_form = UserForm()
    site_form = WifiSiteForm()
    site_form.populate()
    newuser_form = UserForm()
    newuser_form.populate()
    return render_template('admin/clients.html',
                           user_form=user_form,
                           site_form=site_form,
                           newuser_form=newuser_form)
コード例 #8
0
ファイル: views.py プロジェクト: felipecvalentim/poppet
def client_data(site_id=None):
    #Validate SiteID
    wifisite        = Wifisite.query.filter_by(id=site_id).first()
    if not wifisite:
        current_app.logger.debug("Site Manage URL called with invalid paramters site_id:%s userid:%s"%(site_id,current_user.id))
        abort(404)
    
    user_form = UserForm()
    site_form = WifiSiteForm()
    site_form.populate()    
    return render_template("admin/data.html",site_id=site_id,site_form=site_form,user_form=user_form,wifisite=wifisite)
コード例 #9
0
ファイル: views.py プロジェクト: crypex/poppet
def admin_index( ):
    #get all the sites

    #get APs

    #get users

    user_form = UserForm()
    site_form = WifiSiteForm()
    site_form.populate()
    return render_template('admin/dashboard.html',user_form=user_form,site_form=site_form)
コード例 #10
0
ファイル: views.py プロジェクト: vlf1991/poppet-1
def admin_settings():
    #get all the sites
    settingsform = SettingsForm()
    settingsform.populate()

    user_form = UserForm()
    site_form = WifiSiteForm()
    site_form.populate()
    return render_template('admin/settings.html',
                           settingsform=settingsform,
                           user_form=user_form,
                           site_form=site_form)
コード例 #11
0
ファイル: views.py プロジェクト: vlf1991/poppet-1
def admin_index():
    #get all the sites

    #get APs

    #get users

    user_form = UserForm()
    site_form = WifiSiteForm()
    site_form.populate()
    return render_template('admin/dashboard.html',
                           user_form=user_form,
                           site_form=site_form)
コード例 #12
0
ファイル: views.py プロジェクト: vlf1991/poppet-1
def admin_site(site_id):
    wifisite = Wifisite.query.filter_by(id=site_id).first()
    if not wifisite:
        current_app.logger.error("Trying to access unknown site ID:%s" %
                                 request.url)
        abort(404)
    user_form = UserForm()
    site_form = WifiSiteForm()
    site_form.populate()
    return render_template('admin/site.html',
                           user_form=user_form,
                           site_form=site_form,
                           site_id=site_id,
                           wifisite=wifisite)
コード例 #13
0
ファイル: views.py プロジェクト: crypex/poppet
def admin_sessions(site_id=None):
    #Validate SiteID
    wifisite        = Wifisite.query.filter_by(id=site_id).first()
    if not wifisite:
        current_app.logger.debug("Site Manage URL called with invalid paramters site_id:%s userid:%s"%(site_id,current_user.id))
        abort(404)
    
    user_form = UserForm()
    site_form = WifiSiteForm()
    site_form.populate()    
    today     = arrow.now()
    startdate = today.replace(days=1 - today.day).format('DD/MM/YYYY')
    enddate   = today.format('DD/MM/YYYY')    
    return render_template("admin/sessions.html",site_id=site_id,site_form=site_form,user_form=user_form,wifisite=wifisite,
        enddate=enddate,startdate=startdate)
コード例 #14
0
ファイル: views.py プロジェクト: vlf1991/poppet-1
def client_data(site_id=None):
    #Validate SiteID
    wifisite = Wifisite.query.filter_by(id=site_id).first()
    if not wifisite:
        current_app.logger.debug(
            "Site Manage URL called with invalid paramters site_id:%s userid:%s"
            % (site_id, current_user.id))
        abort(404)

    user_form = UserForm()
    site_form = WifiSiteForm()
    site_form.populate()
    return render_template("admin/data.html",
                           site_id=site_id,
                           site_form=site_form,
                           user_form=user_form,
                           wifisite=wifisite)
コード例 #15
0
ファイル: views.py プロジェクト: felipecvalentim/poppet
def admin_landing(site_id):
    wifisite = Wifisite.query.filter_by(id=site_id).first()
    if not wifisite:
        current_app.logger.error("Trying to access unknown site ID:%s"%request.url)
        abort(404)
    user_form = UserForm()    
    site_form = WifiSiteForm()
    site_form.populate()
    landingpageform = LandingPageForm()
    landingpageform.populate(site_id)    
    landingpageid = wifisite.default_landing
    simplelandingpageform = SimpleLandingPageForm()
    simplelandingpageform.populate()
    landingfilesform = LandingFilesForm()
    return render_template('admin/landing.html',user_form=user_form,site_form=site_form,site_id=site_id,
        landingpageform=landingpageform,landingpageid=landingpageid,simplelandingpageform=simplelandingpageform,
        landingfilesform=landingfilesform,wifisite=wifisite)
コード例 #16
0
def admin_sessions(site_id=None):
    #Validate SiteID
    wifisite = Wifisite.query.filter_by(id=site_id).first()
    if not wifisite:
        current_app.logger.debug(
            "Site Manage URL called with invalid paramters site_id:%s userid:%s"
            % (site_id, current_user.id))
        abort(404)

    user_form = UserForm()
    site_form = WifiSiteForm()
    site_form.populate()
    today = arrow.now()
    startdate = today.replace(days=1 - today.day).format('DD/MM/YYYY')
    enddate = today.format('DD/MM/YYYY')
    return render_template("admin/sessions.html",
                           site_id=site_id,
                           site_form=site_form,
                           user_form=user_form,
                           wifisite=wifisite,
                           enddate=enddate,
                           startdate=startdate)
コード例 #17
0
ファイル: views.py プロジェクト: vlf1991/poppet-1
def admin_landing(site_id):
    wifisite = Wifisite.query.filter_by(id=site_id).first()
    if not wifisite:
        current_app.logger.error("Trying to access unknown site ID:%s" %
                                 request.url)
        abort(404)
    user_form = UserForm()
    site_form = WifiSiteForm()
    site_form.populate()
    landingpageform = LandingPageForm()
    landingpageform.populate(site_id)
    landingpageid = wifisite.default_landing
    simplelandingpageform = SimpleLandingPageForm()
    simplelandingpageform.populate()
    landingfilesform = LandingFilesForm()
    return render_template('admin/landing.html',
                           user_form=user_form,
                           site_form=site_form,
                           site_id=site_id,
                           landingpageform=landingpageform,
                           landingpageid=landingpageid,
                           simplelandingpageform=simplelandingpageform,
                           landingfilesform=landingfilesform,
                           wifisite=wifisite)