def create(self, form): category = Category( category=form.category.data, slug=Service.slugify(form.category.data)) return category.put()
def create(self, form): category = Category(category=form.category.data, slug=Service.slugify(form.category.data)) return category.put()
def update(self, key, form): category = Service.get_by_urlsafe_key(key) category.category = form.category.data category.slug = Service.slugify(form.category.data) return category.put()