viewfunction for example) but the craft command tool is used for speeding up development and cutting down on mundane development time.
installcommands. Other commands such as commands for creating controllers or models are loaded in from the Masonite project itself.
app/http/controllers/DashboardController.py. By convention, all controllers should have an appended “Controller” and therefore Masonite will append "Controller" to the controller created.
MasoniteFramework/masoniterepository and unzip it into your current working directory. This command will default to the latest release of the repo.
--versionoption will create a new project depending on the releases from the
requirements.txtfile with all of the projects dependencies. In addition to this file, you will also have a
.env-examplefile which contains a boilerplate of a
.envfile. In order to install the dependencies, as well as copy the example environment file to a
.envfile, just run:
craft installcommand will also run
craft key --storeas well which generates a secret key and places it in the
--createflag like so:
app/ModelNameand import everything needed.
appfolder, then just run:
resources/templatesand can be created easily from running the command:
resources/templates/auth/home.htmlbut keep in mind that it will not create the directory for you. If the
authdirectory does not exist, this command will fail.
integrations.pyfile which is specific to Masonite. You can learn more about packages by reading the Creating Packages documentation. To create a package boilerplate, just run:
app/commands/HelloCommand.pyfile with the
-band/or a port using
keyto encrypt and decrypt data. Read the Encryption documentation for more information on encryption.
key, we can run:
.envfile under the
--storeflag which will automatically add the key to your
tests/directory and you can move it to wherever you like from there.