File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,8 @@ def blueprint_name(name):
5353 """ set index automatically as home page """
5454 if "index" in name :
5555 name = str (name ).replace ("index" , "" )
56+ if "routes" in name :
57+ name = str (name ).replace ("routes" , "" )
5658
5759 """ remove the last . in the string it it ends with a .
5860 for the url structure must follow the flask routing format
@@ -61,6 +63,7 @@ def blueprint_name(name):
6163 if name [- 1 :] == "." :
6264 name = name [:- 1 ]
6365 http_name = str (name ).replace ("." , "/" )
66+ print (http_name )
6467 return http_name
6568
6669 @staticmethod
@@ -128,7 +131,6 @@ def add_blueprint(self, path):
128131 self .model_add_router (mod )
129132 root_module = self .root_path .replace ("." , "" )
130133 url_prefix_name = str (name ).replace (root_module , "" )
131-
132134 """ register to the blueprint if method attribute found """
133135 self .__app .register_blueprint (mod .__method__ , url_prefix = self .blueprint_name (url_prefix_name ))
134136
You can’t perform that action at this time.
0 commit comments