예제 #1
0
파일: views.py 프로젝트: Saberlion/Bearnote
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
예제 #2
0
파일: decorators.py 프로젝트: ii0/Bearnote
 def decorated_function(*args, **kwargs):
     if not get_domain() in BASECONSTANT.BASE_DOMAIN:
         return "404 page", 404
     return f(*args, **kwargs)
예제 #3
0
 def decorated_function(*args, **kwargs):
     if not get_domain() in BASECONSTANT.BASE_DOMAIN:
         return "404 page", 404
     return f(*args, **kwargs)