Flask Folder Structure
Refer this page to understand the folder structure of our project, so that you can navigate and make changes in the project easily.
- Cuba
- cuba
- static
- assets
- ajax
- audio
- css
- vendors
- bootstrap
- bootstrap
- vendors
- fonts
- calendar
- feather
- flag-icon
- font-awesome
- ico
- ionic-icon
- material-design-icon
- pe7-icon
- simple-line-icon
- summernote
- themify
- typicon-icon
- images
- appointment
- avtar
- banner
- big-lightgallry
- big-masonry
- blog
- button_builder
- calender
- checkout
- dashboard
- dashboard-2
- ecommerce
- email-template
- faq
- job-search
- landing
- lightgallry
- logo
- masonry
- notification
- other-images
- product
- range-slider
- sidebar-image
- sidebar-pattern
- slider
- slider-auto-width
- social-app
- tree
- user
- user-card
- welcome
- js
- animation
- aos
- scroll-reveal
- tilt
- wow
- aos
- bookmark
- bootstrap
- button-builder
- calendar
- chart
- apex-chart
- chartist
- chartjs
- flot-chart
- google
- knob
- morris-chart
- peity-chart
- sparkline
- apex-chart
- clipboard
- contacts
- counter
- custom-card
- dashboard
- datatable
- datatable-extension
- datatables
- datatable-extension
- datepicker
- date-picker
- daterange-picker
- date-time-picker
- date-picker
- dragable
- drilldown
- dropzone
- editor
- ace-editor
- ckeditor
- adapters
- lang
- plugins
- skins
- adapters
- simple-mde
- summernote
- ace-editor
- form-builder
- form-builder-1
- form-builder-2
- form-builder-1
- form-wizard
- icons
- feather-icon
- feather-icon
- image-cropper
- internationalization
- jarallax_libs
- jsgrid
- map-js
- notify
- owlcarousel
- page-builder
- lang
- skins
- photoswipe
- prism
- range-slider
- rating
- scrollable
- select2
- sticky
- sweet-alert
- task
- theme-customizer
- timeline
- timeline-v-1
- timeline-v-2
- timeline-v-1
- time-picker
- todo
- touchspin
- tour
- tree
- typeahead
- data
- vector-map
- map
- animation
- json
- datatable-extension
- datatable-extension
- scss
- base
- components
- layout
- pages
- themes
- utils
- vendors
- chartist
- feather-icon
- flag-icon
- font-awesome
- icoicon
- image-cropper
- ionic-icon
- page-builder
- scrollable
- select2
- simple-line-icon
- simple-mde
- sticky
- summernote
- svg-icon
- sweetalert2-master
- themify
- time-picker
- todo
- tour
- tree
- typicon-icon
- vector-map
- whether-icon
- chartist
- base
- video
- ajax
- assets
- template
- application
- bookmark
- components
- components
- calendar
- components
- components
- bookmark
- chat
- components
- components
- contacts
- components
- components
-
- components
- components
- email
- components
- components
- file-manager
- components
- components
- kanban
- components
- components
- projects
- components
- components
- search
- components
- components
- social-app
- components
- components
- task
- components
- components
- to-do
- components
- components
- user
- components
- components
- application
- components
- animation
- bonus-ui
- builder
- buttons
- charts
- icons
- ui-kits
- forms-table
- forms
- table
- general
- dashboard
- page-layout
- widget
- layout
- miscellaneous
- blog
- editors
- FAQ
- gallery
- job-search
- knowledgebase
- learning
- maps
- support-ticket
- pages
- internationalization
- landing-page
- others
- sample-page
- static
- cuba
app.py
This file contains the code which is responsible for running the server, it imports the app from the init file in the cuba folder and runs the server by using it
cuba
This folder contains all the other files and folders related to the project. Information regarding those folders is given below.
Static
Apart from the html we require many other files to make our website more interative and attractive. These type of files are stored in this folder. It contains all the scss files , images, and the javascript files. We recommend you keep the name of the folder "static" as it is saved as the default path in the flask for accessing the static files.
templates
Similar to the static file, "templates " is saved as the default folder name from where the html files will be accessed. So we advice that you do not change the name of this folder as well. This folder contains all the html files, if you need to make changes in the html, you will have to find that file in this folder.
__init__.py
This is the main settings file where we configure all the settings for our project. When we install any external package,for example: 'flask_sqlalchemy', we will initialize the package in this file. This way managing package becomes more easier.
auth.py
As the name suggests, this files contains all the code for the user authentication.
cuba.db
When we create table in the models.py file, and run the command db.create_all() in the python terminal ,this file is created automatically. It is a local database file and store all the data entered in the tables.
forms.py
When creating an admin side websites, there will be many instances where we need to use the forms to get the user input. We use the inbuild feature of the flask to create the forms in the backend and use the necessary fields in the frontend template.
models.py
Here we create all the table which will store the data in the database. Each Table is called models, hence the name models.py.
routes.py
This files contains all the routes for different pages and other actions like database modification