Commits

Adam Gomaa committed 82ce455

Remove no-longer-needed code for retriving static files

  • Participants
  • Parent commits d46a480

Comments (0)

Files changed (2)

webmusic/__init__.py

                           self.config["MONGO_URI"],
                           self.config["MONGO_COLLECTION"])
 
-    def get_template_source(self, path):
-        source, fname, uptodate = self.jinja_env.loader.get_source(None, path)
-        return source
 
 app = WebMusic(__name__)
 

webmusic/views.py

     track _id is passed in the pathname, look up the path for the
     track in the index and return the file.
 
-    Special dunder-ids are used for app files for the web ui.
-
     """
-    # magic values for app files (which aren't really media, but whatever)
-    if path in ['__music.js', '__music.css', '__body.html', '__artists.html']:
-        return get_app_file(path)
-
     return get_media_by_id(path)
 
 def get_media_by_id(_id):
         response.stream.write(open(fpath, 'r').read())
     return response
 
-
-def get_app_file(fpath):
-    if fpath == '__music.js':
-        return Response(
-            app.get_template_source('music.js'),
-            mimetype='application/javascript')
-    elif fpath == '__music.css':
-        return Response(
-            app.get_template_source('music.css'),
-            mimetype='text/css')
-    elif fpath == '__body.html':
-        return Response(
-            app.get_template_source('music-body.html'),
-            mimetype='text/html')
-