A search interface for the Performing Patents Otherwise publication as part of the Politics of Patents case study (part of Copim WP6): this parses data from the archive of RTF files and provides additional data from the European Patent Office OPS API. https://patents.copim.ac.uk
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

__init__.py 1.2KB

2 years ago
2 years ago
2 years ago
1234567891011121314151617181920212223242526272829303132333435363738
  1. # @name: __init__.py
  2. # @creation_date: 2022-09-07
  3. # @license: The MIT License <https://opensource.org/licenses/MIT>
  4. # @author: Simon Bowie <ad7588@coventry.ac.uk>
  5. # @purpose: Initialises the app, SQLAlchemy, and configuration variables
  6. # @acknowledgements:
  7. # https://www.digitalocean.com/community/tutorials/how-to-add-authentication-to-your-app-with-flask-login
  8. # Config stuff adapted from https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-iii-web-forms
  9. from flask import Flask
  10. from flask_moment import Moment
  11. import os
  12. # initiate Moment for datetime functions
  13. moment = Moment()
  14. def create_app():
  15. app = Flask(__name__)
  16. moment.init_app(app)
  17. # blueprint for main parts of app
  18. from .main import main as main_blueprint
  19. app.register_blueprint(main_blueprint)
  20. # blueprint for search parts of app
  21. from .search import search as search_blueprint
  22. app.register_blueprint(search_blueprint)
  23. # blueprint for interventions parts of app
  24. from .interventions import interventions as interventions_blueprint
  25. app.register_blueprint(interventions_blueprint)
  26. # blueprint for data parts of app
  27. from .data import data as data_blueprint
  28. app.register_blueprint(data_blueprint)
  29. return app