Beispiel #1
0
def edit_app(domain):
    app = Application.get(domain=domain, author=warden.current_user())
    form = EditAppForm(request.form, name=app.domain, description=app.description)
    if form.validate_on_submit():
        file = request.files['zipfile']
        if zipfile.is_zipfile(file):
            with zipfile.ZipFile(file) as _zipfile:
                os.umask(022)
                path2appfiles = apps_files_path(app.author.nickname, app.domain)
                _zipfile.extractall(path2appfiles)
    return render_template('developer/edit_app.html', form=form)
Beispiel #2
0
 def validate_domain(self, field):
     app = Application.get(domain=field.data, author=warden.current_user())
     if app:
         raise ValidationError("Domain already taken")
Beispiel #3
0
def app_details(domain):
    app = Application.get(domain=domain, author=warden.current_user())
    return render_template('developer/app_details.html', app=app)
Beispiel #4
0
def details(nickname, domain):
    app = Application.get(domain, nickname)
    return render_template('appstore/details.html', app=app)