Exemplo n.º 1
0
def index_function():
    this_domain = common.get_domain()
    if this_domain in COMMONCONSTANTS.BASE_DOMAIN:
        return render_template("common/index.html")
    else:
        if Blog.objects(domain=this_domain).count() == 1:
            this_blog = Blog.objects(domain=this_domain).first()
            return member_page_function(username=this_blog.belong.username)
        else:
            return "Blog Not Found", 404
Exemplo n.º 2
0
 def decorated_function(*args, **kwargs):
     if not get_domain() in BASECONSTANT.BASE_DOMAIN:
         return "404 page", 404
     return f(*args, **kwargs)
Exemplo n.º 3
0
 def decorated_function(*args, **kwargs):
     if not get_domain() in BASECONSTANT.BASE_DOMAIN:
         return "404 page", 404
     return f(*args, **kwargs)