예제 #1
0
def make_site(environment):
    site = Site(environment.site_name, finished_create=False)
    create_site_task.apply_async(args=(site,))
    return jsonify({'success': 'Multisite environment {} created.'
                    .format(environment.site_name)})
예제 #2
0
 def create_model(self, form):
     # Sites start not having their data finished.
     site = Site(form.name.data, form.display_name.data, finished_create=False)
     result = create_site_task.apply_async(args=(site,))
     site.result = result
     return site