The Modern And Developer Centric Python Web Framework. Be sure to read the documentation and join the Slack channel questions: http://slack.masoniteproject.com

Overview

Python Version License License License All Contributors

NOTE: Masonite 2.3 is no longer compatible with the masonite-cli tool. Please uninstall that by running pip uninstall masonite-cli. If you do not uninstall masonite-cli you will have command clashes

About Masonite

The modern and developer centric Python web framework that strives for an actual batteries included developer tool with a lot of out of the box functionality with an extremely extendable architecture. Masonite is perfect for beginner developers getting into their first web applications as well as experienced devs that need to utilize the full potential of Masonite to get their applications done.

Masonite works hard to be fast and easy from install to deployment so developers can go from concept to creation in as quick and efficiently as possible. Use it for your next SaaS! Try it once and you’ll fall in love.

  • Having a simple and expressive routing engine
  • Extremely powerful command line helpers called craft commands
  • A simple migration system, removing the "magic" and finger crossing of migrations
  • A great Active Record style ORM called Orator
  • A great filesystem architecture for navigating and expanding your project
  • An extremely powerful Service Container (IOC Container)
  • Service Providers which makes Masonite extremely extendable

Learning Masonite

Masonite strives to have extremely comprehensive documentation. All documentation can be Found Here and would be wise to go through the tutorials there. If you find any discrepencies or anything that doesn't make sense, be sure to comment directly on the documentation to start a discussion!

If you are a visual learner you can find tutorials here: MasoniteCasts

Also be sure to join the Slack channel!

Contributing

Contributing to Masonite is simple:

Requirements

In order to use Masonite, you’ll need:

  • Python 3.5+
  • Latest version of OpenSSL
  • Pip3

All commands of python and pip in this documentation is assuming they are pointing to the correct Python 3 versions. For example, anywhere you see the python command ran it is assuming that is a Python 3.5+ Python installation. If you are having issues with any installation steps just be sure the commands are for Python 3.5+ and not 2.7 or below.

Linux

If you are running on a Linux flavor, you’ll need the Python dev package and the libssl package. You can download these packages by running:

Debian and Ubuntu based Linux distributions

$ sudo apt-get install python-dev libssl-dev python3-pip

Or you may need to specify your python3.x-dev version:

$ sudo apt-get install python3.6-dev libssl-dev python3-pip

Enterprise Linux based distributions (Fedora, CentOS, RHEL, ...)

# dnf install python-devel openssl-devel

Windows

With windows you MAY need to have the latest OpenSSL version. Install OpenSSL 32-bit or 64-bit.

Mac

If you do not have the latest version of OpenSSL you will encounter some installation issues with creating new applications since we need to download a zip of the application via GitHub.

With Mac you can install OpenSSL through brew.

brew install openssl

Python 3.6 does not come preinstalled with certificates so you may need to install certificates with this command:

/Applications/Python\ 3.6/Install\ Certificates.command

You should now be good to install new Masonite application of Mac :)

Python 3.7 and Windows

If you are using Python 3.7, add it to your PATH Environment variable.

Open Windows PowerShell and run: pip install masonite-cli

Add C:\Users\%USERNAME%\.AppData\Programs\Python\Python37\Scripts\ to PATH Environment variable.

Note: PATH variables depend on your installation folder

Quick Install:

Here is the quick and dirty of what you need to run. More step by step instructions are found below.

    $ python3 -m venv venv
    $ source venv/bin/activate
    $ pip install masonite
    $ craft new
    $ craft serve

Go to http://localhost:8000/


* * * *

Not all computers are made the same so you may have some trouble installing Masonite depending on your machine. If you have any issues be sure to read the Known Installation Issues Documentation.

* * * *


Contributing

Please read the Contributing Documentation here. Development will be on the current releasing branch of the Core Repository (typically the develop branch) so check open issues, the current Milestone and the releases in that repository. Ask any questions you like in the issues so we can have an open discussion about the framework, design decisions and future of the project.

Contributors

Joseph Mancuso
Joseph Mancuso

💻 🐛 💬 🤔
Vaibhav Mule
Vaibhav Mule

💻 🐛 💬 🤔
Martín Peveri
Martín Peveri

💻 🐛 💬 🤔
Tony Hammack
Tony Hammack

💻 🐛 💬 🤔
Abram C. Isola
Abram C. Isola

💻 🐛 💬 🤔
Mitch Dennett
Mitch Dennett

💻 🐛 💬 🤔
Marlysson Silva
Marlysson Silva

💻 🐛 💬 🤔
Christopher Byrd
Christopher Byrd

💻 🐛 💬 🤔
Björn Theart
Björn Theart

💻 🐛 💬 🤔
Junior Gantin
Junior Gantin

💻 🐛 💬 🤔

Thank you for those who have contributed to Masonite!

License

The Masonite framework is open-sourced software licensed under the MIT license.

Hello World

Getting started is very easy. Below is how you can get a simple Hello World application up and running.

Installation

Be sure to join the Slack Channel for help or guidance.

Masonite excels at being simple to install and get going. If you are coming from previous versions of Masonite, the order of some of the installation steps have changed a bit.

Firstly, open a terminal and head to a directory you want to create your application in. You might want to create it in a programming directory for example:

$ cd ~/programming
$ mkdir myapp
$ cd myapp

If you are on windows you can just create a directory and open the directory in the Powershell.

Activating Our Virtual Environment (optional)

Although this step is technically optional, it is highly recommended. You can create a virtual environment if you don't want to install all of masonite's dependencies on your systems Python. If you use virtual environments then create your virtual environment by running:

$ python -m venv venv
$ source venv/bin/activate

or if you are on Windows:

$ python -m venv venv
$ ./venv/Scripts/activate

The pythoncommand here is utilizing Python 3. Your machine may run Python 2 (typically 2.7) by default for UNIX machines. You may set an alias on your machine for Python 3 or simply run python3anytime you see the pythoncommand.

For example, you would run python3 -m venv venv instead of python -m venv venv

Installing Masonite

Now we can install Masonite. This will give us access to a craft command we can use to finish the install steps for us:

$ pip install masonite

Once Masonite installs you will now have access to the craft command line tool. Craft will become your best friend during your development. You will learn to love it very quickly :).

You can ensure Masonite and craft installed correctly by running:

$ craft

You should see a list of a few commands like install and new

Creating Our Project

Great! We are now ready to create our first project. We should have the new craft command. We can check this by running:

$ craft

We are currently only interested in the craft new command. To create a new project just run:

$ craft new

This command will also run craft install which will install our dependencies.

This will get the latest Masonite project template and unzip it for you. We just need to go into our new project directory and install the dependencies in our requirements.txt file.

Additional Commands

Now that Masonite installed fully we can check all the new commands we have available. There are many :).

$ craft

We should see many more commands now.

Running The Server

After it’s done we can just run the server by using another craft command:

$ craft serve

Congratulations! You’ve setup your first Masonite project! Keep going to learn more about how to use Masonite to build your applications.

{% hint style="success" %} You can learn more about craft by reading The Craft Command documentation or continue on to learning about how to create web application by first reading the Routing documentation {% endhint %}

{% hint style="info" %} Masonite uses romantic versioning instead of semantic versioning. Because of this, all minor releases (2.0.x) will contain bug fixes and fully backwards compatible feature releases. Be sure to always keep your application up to date with the latest minor release to get the full benefit of Masonite's romantic versioning. {% endhint %}

Hello World

All web routes are in routes/web.py. In this file is already the route to the welcome controller. To start your hello world example just add something like:

Get('/hello/world', 'HelloWorldController@show'),

our routes constant file should now look something like:

ROUTES = [
    Get('/', 'WelcomeController@show'),
    Get('/hello/world', 'HelloWorldController@show'),
]

* * * *

NOTE: Notice this new interesting string syntax in our route. This will grant our route access to a controller (which we will create below)

* * * *


Since we used a string controller we don't have to import our controller into this file. All imports are done through Masonite on the backend.

You'll notice that we have a reference to the HelloWorldController class which we do not have yet. This framework uses controllers in order to separate the application logic. Controllers can be looked at as the views.py in a Django application. The architectural standard here is 1 controller per file.

In order to make the HelloWorldController we can use a craft command:

$ craft controller HelloWorld

This will scaffold the controller for you and put it in app/http/controllers/HelloWorldController.py. This new file will have all the imports for us.

Inside the HelloWorldController we can make our show method like this:

def show(self, view: View):
    """ Show Hello World Template """
    return view.render('helloworld')

As you see above, we are returning a helloworld template but we do not have that yet. All templates are in resources/templates. We can simply make a file called helloworld.html or run the craft command:

$ craft view helloworld

Which will create the resources/templates/helloworld.html template for us.

Lastly all templates run through the Jinja2 rendering engine so we can use any Jinja2 code inside our template like:

inside the resources/views/helloworld.html

{{ 'Hello World' }}

Now just run the server:

$ craft serve

And navigate to localhost:8000/hello/world and you will see Hello World in your browser.

Happy Crafting!

Comments
  • Init install fails - [CommandNotFound] Command

    Init install fails - [CommandNotFound] Command "key" is not defined.

    Trying the initial test setup as displayed on the wiki I get the following;

    PY3.6, $ craft -V; Craft Version: 2.0.2

    patrick@patrick-P506:~/tmp$ craft new project
    Crafting Application ...
    
    Application Created Successfully!
    
    Now just cd into your project and run
    
        $ craft install
    
    to install the project dependencies.
    
    Create Something Amazing!
    patrick@patrick-P506:~/tmp$ cd project/
    patrick@patrick-P506:~/tmp/project$ craft install
    
                                     
      [CommandNotFound]              
      Command "key" is not defined.  
                                     
    
    bug 
    opened by patvdleer 42
  • Issue while running Craft Command

    Issue while running Craft Command

    Describe the bug If you use any command with craft it gives an error.

    Traceback (most recent call last):
      File "craft", line 12, in <module>
        from wsgi import container
      File "/Users/yubarajshrestha/Python Projects/blog/wsgi.py", line 36, in <module>
        located_provider.load_app(container).register()
      File "/Users/yubarajshrestha/Python Projects/blog/venv/lib/python3.8/site-packages/masonite/providers/AppProvider.py", line 58, in register
        self._autoload(config("application.autoload"))
      File "/Users/yubarajshrestha/Python Projects/blog/venv/lib/python3.8/site-packages/masonite/providers/AppProvider.py", line 67, in _autoload
        Autoload(self.app).load(directories)
      File "/Users/yubarajshrestha/Python Projects/blog/venv/lib/python3.8/site-packages/masonite/autoload.py", line 49, in load
        self._get_module_members(module_loader, name)
      File "/Users/yubarajshrestha/Python Projects/blog/venv/lib/python3.8/site-packages/masonite/autoload.py", line 173, in _get_module_members
        return importlib.import_module(
      File "/usr/local/Cellar/[email protected]/3.8.10/Frameworks/Python.framework/Versions/3.8/lib/python3.8/importlib/__init__.py", line 122, in import_module
        raise TypeError(msg.format(name))
    TypeError: the 'package' argument is required to perform a relative import for '.Users.yubarajshrestha.Python Projects.blog.app.User'
    

    Desktop (please complete the following information):

    • OS: Mac

    Additional context Python Version: 3.8.10 M3 (Masonite v3)

    bug help wanted 
    opened by ghost 25
  • Fix issue with cookies failing on new projects

    Fix issue with cookies failing on new projects

    Describe the bug

    I have done a clean install of masonite (and had to additionally pip install masonite-orm as a module error was thrown)

    Ran python craft serve then visited local host to see a TypeError - token must be in bytes.

    Expected behaviour

    Some sort of initial landing page loads without errors after clean install

    Steps to reproduce the bug

    No response

    Screenshots

    image

    OS

    macOS

    OS version

    Monterey 12.2.1

    Browser

    Chrome Version 100.0.4896.60 (Official Build) (arm64)

    Masonite Version

    4.6.1

    Anything else ?

    No response

    bug 
    opened by dwedigital 21
  • Generated Auth Errs on Register Route

    Generated Auth Errs on Register Route

    When a user tries to register for a user account in the browser, the generated authentication system throws an error resulting in a 500 response code. However, it appears as though the user is correctly created and saved in the database. Stack trace is below.

    Misc Info: Ubuntu 14.04 Python 3.4.3 Everything is pip installed into a virtualenv.

    Reproduction steps:

    • Generate new project and cd into it
    • Run python3 -m venv venv and source venv/bin/activate
    • Run pip install -r requirements
    • Run craft auth
    • Run craft migrate
    • Run craft serve
    • Go to localhost:8000/register and try to create user. I used the following details: username = demo, email = [email protected], password = password.

    Full console output, including stack trace:

    GET Route: /register
    POST Route: /register
    ERROR:waitress:Exception when serving /register
    Traceback (most recent call last):
      File "/home/acisola/workspace/python3/test-project/bootstrap/start.py", line 49, in app
        container.resolve(located_provider.boot)
      File "/home/acisola/workspace/python3/test-project/venv/lib/python3.4/site-packages/masonite/app.py", line 65, in resolve
        return obj(*provider_list)
      File "/home/acisola/workspace/python3/test-project/venv/lib/python3.4/site-packages/masonite/providers/RouteProvider.py", line 113, in boot
        response = self.app.resolve(route.output)
      File "/home/acisola/workspace/python3/test-project/venv/lib/python3.4/site-packages/masonite/app.py", line 65, in resolve
        return obj(*provider_list)
      File "/home/acisola/workspace/python3/test-project/app/http/controllers/RegisterController.py", line 32, in store
        if Auth(Request).login(Request.input(auth.AUTH['model'].__auth__), Request.input('password')):
      File "/home/acisola/workspace/python3/test-project/venv/lib/python3.4/site-packages/masonite/facades/Auth.py", line 52, in login
        raise exception
      File "/home/acisola/workspace/python3/test-project/venv/lib/python3.4/site-packages/masonite/facades/Auth.py", line 44, in login
        if model and bcrypt.checkpw(bytes(password, 'utf-8'), bytes(model.password, 'utf-8')):
    TypeError: encoding or errors without a string argument
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/home/acisola/workspace/python3/test-project/venv/lib/python3.4/site-packages/waitress/channel.py", line 338, in service
        task.service()
      File "/home/acisola/workspace/python3/test-project/venv/lib/python3.4/site-packages/waitress/task.py", line 169, in service
        self.execute()
      File "/home/acisola/workspace/python3/test-project/venv/lib/python3.4/site-packages/waitress/task.py", line 399, in execute
        app_iter = self.channel.server.application(env, start_response)
      File "/home/acisola/workspace/python3/test-project/venv/lib/python3.4/site-packages/whitenoise/base.py", line 66, in __call__
        return self.application(environ, start_response)
      File "/home/acisola/workspace/python3/test-project/bootstrap/start.py", line 51, in app
        container.make('ExceptionHandler').load_exception(e)
      File "/home/acisola/workspace/python3/test-project/venv/lib/python3.4/site-packages/masonite/exception_handler.py", line 28, in load_exceptio
    n
        self._render()
      File "/home/acisola/workspace/python3/test-project/venv/lib/python3.4/site-packages/masonite/exception_handler.py", line 48, in _render
        'open': open
      File "/home/acisola/workspace/python3/test-project/venv/lib/python3.4/site-packages/masonite/view.py", line 79, in render
        self.dictionary)
      File "/home/acisola/workspace/python3/test-project/venv/lib/python3.4/site-packages/jinja2/environment.py", line 1008, in render
        return self.environment.handle_exception(exc_info, True)
      File "/home/acisola/workspace/python3/test-project/venv/lib/python3.4/site-packages/jinja2/environment.py", line 780, in handle_exception
        reraise(exc_type, exc_value, tb)
      File "/home/acisola/workspace/python3/test-project/venv/lib/python3.4/site-packages/jinja2/_compat.py", line 37, in reraise
        raise value.with_traceback(tb)
      File "/home/acisola/workspace/python3/test-project/venv/lib/python3.4/site-packages/masonite/snippets/exception.html", line 62, in top-level 
    template code
        {% for i, line in enumerate(open(stack.filename)) %}
    TypeError: Can't convert 'Undefined' object to str implicitly```
    bug 
    opened by aisola 17
  • Missing validation error messages due to time offset

    Missing validation error messages due to time offset

    I used the craft auth command to create the standard auth controllers, templates, and routes. When testing it, the error messages never appeared. A hint in the documentation about session messages disappearing after 2 minutes led me to suspect that the messages were not appearing due to the time offset.

    To Reproduce Steps to reproduce the behavior:

    1. Set the clock on the client computer 3 minutes after the server time.
    2. Run craft serve
    3. Go to localhost:8000/login
    4. Enter "guest" in the email address
    5. Do not enter a password
    6. Click Login

    Expected behavior You should see a message that the password is required and that the email must be a valid email address. (See the auth.LoginController.py for the messages)

    Actual error The messages do not appear at all. You get the same login form as before. It seems that the cookies are considered expired before they are set, and therefore omitted. Once the time of the client is corrected, the errors appear as expected. The lack of errors is quite confusing to users.

    Desktop Client:

    • MacOS
    • Safari
    • Version 12.1
    bug 
    opened by tpow 14
  • Support for SPA/RESTful APIs (with proper JWT Authentication)

    Support for SPA/RESTful APIs (with proper JWT Authentication)

    Hi.

    A few weeks back I moved over to this project from Laravel, since I wanted to start writing my project backends in Python. I have also previously used Flask and FastAPI but did not like the way those libraries structure web applications. This project however does it in a very clean way and is one of the reasons why I like it and want to use it.

    However, I have spent countless hours now trying to figure out how to get proper JWT authentication for my Single Page Application, where I will not use views. It is not starting to get tiring trying to get the framework to work the way I want it to and it's putting my development to a halt.

    What I am trying to achieve, is simply getting a working and stable web application with the following routes:

    ROUTES = [
    
        # Server Side Rendered routes - WILL BE HIDDEN CLIENT SIDE
    
        RouteGroup(
            prefix="/ssr",
            routes=[
                GET('/test',           'HomeController@show').name('ssr.test'),
                POST('/login',         'JWTAuthController@login').name('ssr.login'),
                POST('/register',      'JWTAuthController@register').name('ssr.register'),
            ]
        ),
        RouteGroup(
            prefix="/ssr",
            middleware=['jwt'], # Requires a valid Authorization Bearer Token (JWT)
            routes=[
                POST('/logout',        'JWTAuthController@logout').name('ssr.logout'),
                POST('/refresh',       'JWTAuthController@refresh').name('ssr.refresh'),
                GET('/profile',        'JWTAuthController@me').name('ssr.profile'),
                GET('/getkey',         'APIKeyController@show').name('ssr.getkey'),
                GET('/search/data',    'DataController@show').name('ssr.data.search'),
            ]
        ),
    
       
        # Public facing API - should only be accessible with an API KEY generated from users profile, and NOT JWT.
        RouteGroup( 
            prefix="/v1",
            middleware=['apikey'], # Requires a valid X-API-KEY header.
            routes=[
                GET('/',             'HomeController@show').name('api.usage'),
                GET('/search/data',  'DataController@show').name('api.data.search'),
            ]
        ),
    

    It would be amazing if something like this could be crafted by doing craft auth:jwt for JWT authentication and craft auth:apikey for API Key authentication.

    enhancement 
    opened by nicolaipre 12
  • Command Not Found

    Command Not Found

    Describe the bug I have the latest openssl, python 3.6.5, and I am using masonite 2.3. I am using pipenv for my virtual environment. The craft command works like a charm with creating the project, but when I run the "craft serve" command. I receive the command "serve is not defined" error.

    Image Image 5-16-20 at 4 14 PM

    ** OS ** I am using the MacOS 10.15.4

    opened by jmsfrancies 12
  • Consider removing Libsass requirement and make sass support optional

    Consider removing Libsass requirement and make sass support optional

    right now the SASS support is built in but the libsass library takes a long time to install.

    consider either:

    • sticking it out as the only time the dev has to wait is when creating a project
    • make an environment variable to set SASS to a bool so the masonite.storage.compile_sass method is not ran without the package installed

    OR only run if the libsass package is installed. This could be really good since the developer just needs to pip install libsass and nothing else to unlock full support of sass

    opened by josephmancuso 12
  • No module named 'orator'

    No module named 'orator'

    Hello, i am just getting start with it via following the documentation, when creating migration for post table as per the documentation "craft migration create_posts_table --create posts" this gives the error No module named 'orator'.

    I have verified installation for orator using pip3 install orator and also pip3 install --upgrade masonite-cli It say's

    "Requirement already satisfied." so i am stuck here on the documentation no-way to proceed further.

    Please suggest.

    opened by ashfaqahmed 11
  • Add Masonite API back to core

    Add Masonite API back to core

    Need to look at the Masonite API package and merge that into this one as we did with Masonite-scheduler.

    This will need to be spec'd out though in order to make sure we hit all the core requirements when we do the back port.

    Feature Spec

    Masonite API

    This product spec details the feature requirements and technical specifications for the adding an API feature to Masonite.

    Summary

    Masonite 2 had very minimal API support. It was primary designed to be used because a small group of people needed a few features and I built it for them. The Masonite features used to be inside the Masonite codebase but was removed to be its own package. Ever since we moved it to its own package, it has caused more issues than it helped. Because of this, will be moving Masonite API features back into the codebase for the Masonite 4 release.

    Summary of features include:

    • [ ] Authentication classes (for getting tokens)
    • [ ] API Guard
    • [ ] Authentication Middleware to verify token
    • [ ] Resource classes
    • [ ] Authentication Drivers (token)
    • [ ] Hashing tokens

    Technical Specifications

    Resource Class - Resource classes will basically be controllers that return a user model. A user model will then be serialized by the response class. We should be able to support resource methods which are:

    • Index - show a collection of all routes
    • Show - Show an individual record
    • Store - Create a new record
    • Update - Updates an existing record
    • Delete - Deletes a record

    Authentication Controller - Possibly may skip this. Low priority. Class to be used to pass an email and password which, if good, saves an API Token in the users table and returns the token as a response. Can be a basic controller with a single method.

    API Guard - This is a guard which will be used to fetch the user by API token and attach it to the request class. We may need to put the authentication stuff in this guard as well.

    Authentication Drivers - These drivers should return a boolean if the user should continue. We can use this in a middleware to check if we need to throw some kind of authentication error.

    Hashing tokens - Anytime we store a token in the database we may want to hash it inside the database. Just an added security measure.

    Authentication Middleware - We should be able to add a middleware, possibly in a new api middleware stack. This middleware will return an authorized error or continue to the request.

    opened by josephmancuso 10
  • Authorization feature

    Authorization feature

    Masonite handles authentication nicely (user identification and log in), but needs a way to authorize access (permission to do something) and define roles. Rather than having apps build their own authorization layer, it would be nice if the framework provided a basis for it.

    Ideally this would be middleware that handles database model and controller access as well as various helpers for checking if users can or can't do something.

    As a scenario, once this is built it would be nice to expand Masonite's blog tutorial with the addition of several user roles such as Administrator (can do anything), Editor (can change other's posts, and potentially create new ones) and Writer (can only create and edit their own posts).

    enhancement question 
    opened by tpow 10
  • Compact helper - Allow strings to be assigned regardless of content

    Compact helper - Allow strings to be assigned regardless of content

    This PR fixes the issue where strings that contain the same content could not be assigned to multiple variables when using compact().

    example: This will throw the error "Cannot contain variables with multiple of the same object in scope" Due to data2 and data3 having the exact same string content

            data1 = {"item1": 10}
            data2 = json.dumps([])
            data3 = json.dumps([])
    
            return self.view.render(
                "path.to.index",
                compact(data1, data2, data3),
            )
    
    opened by circulon 0
  • remember me password

    remember me password

    Is your feature request related to a problem?

    remember me password

    What do we currently have to do now?

    remember me password

    Describe the solution you'd like

    remember me password checkbox functionality. how will i implement on login page. any doc for this.

    Describe alternatives you've considered

    No response

    Would this be a breaking change ?

    • [ ] Yes

    Anything else ?

    No response

    enhancement 
    opened by ssestantech 0
  •  masonite api not working on subdomain

    masonite api not working on subdomain

    Describe the bug

    masonite api not working on subdomain

    Expected behaviour

    No response

    Steps to reproduce the bug

    No response

    Screenshots

    No response

    OS

    Linux

    OS version

    centos

    Browser

    No response

    Masonite Version

    4.6.1

    Anything else ?

    No response

    bug 
    opened by ssestantech 1
  • masonite api

    masonite api

    Describe the bug

    i am using masonite api . its working perfect on localhost. but when i go to production then its showing api routes not found 404.

    Expected behaviour

    i am using masonite api . its working perfect on localhost. but when i go to production then its showing api routes not found 404.

    Steps to reproduce the bug

    No response

    Screenshots

    No response

    OS

    Linux

    OS version

    Linux

    Browser

    No response

    Masonite Version

    4.6.1

    Anything else ?

    No response

    bug 
    opened by ssestantech 6
  • how to get value from form with multiple inputs with same name and save in db.

    how to get value from form with multiple inputs with same name and save in db.

    Describe the bug

    how to get value from form with multiple inputs with same name and save in db.

    Expected behaviour

    how to get value from form with multiple inputs with same name and save in db.

    Steps to reproduce the bug

    No response

    Screenshots

    No response

    OS

    Windows

    OS version

    window 11

    Browser

    No response

    Masonite Version

    4.6.1

    Anything else ?

    how to get value from form with multiple inputs with same name and save in db.

    question 
    opened by ssestantech 2
Releases(v4.17.4)
  • v4.17.4(Oct 13, 2022)

    Change Log

    Added

    • Added a new uuid route compiler by @circulon in https://github.com/MasoniteFramework/masonite/pull/706
    • Added is_ajax() method to request by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/717
    • Added host and port options for Pusher driver to be able to choose from different service providers by @if4lcon in https://github.com/MasoniteFramework/masonite/pull/709

    Changed

    • Improved display of error message if import error in a controller by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/721

    Fixed

    • Fixed loading cookies on Linux environments by @BooStudio in https://github.com/MasoniteFramework/masonite/pull/703

    New Contributors

    • @BooStudio made their first contribution in https://github.com/MasoniteFramework/masonite/pull/703

    Full Changelog: https://github.com/MasoniteFramework/masonite/compare/v4.16.4...v4.17.4

    Source code(tar.gz)
    Source code(zip)
  • v4.16.4(Aug 10, 2022)

    Change Log

    • docs: Fix a few typos by @timgates42 in https://github.com/MasoniteFramework/masonite/pull/699
    • Fixed errors not showing in default auth templates

    Full Changelog: https://github.com/MasoniteFramework/masonite/compare/v4.16.3...v4.16.4

    Source code(tar.gz)
    Source code(zip)
  • v4.16.3(Jul 31, 2022)

    Change Log

    Fixed

    • Fixed numeric validation rule to accepts floats by @if4lcon in https://github.com/MasoniteFramework/masonite/pull/694

    Full Changelog: https://github.com/MasoniteFramework/masonite/compare/v4.16.2...v4.16.3

    Source code(tar.gz)
    Source code(zip)
  • v4.16.2(Jul 10, 2022)

  • v4.16.1(Jul 10, 2022)

    Change Log

    Changed

    • Change redis connection to use exists for the has method by @goophps in https://github.com/MasoniteFramework/masonite/pull/684

    Fixed

    • Fixed auth by @josephmancuso in https://github.com/MasoniteFramework/masonite/pull/629
    • Fixed unreachable code in container.py by @filippetrovicAT in https://github.com/MasoniteFramework/masonite/pull/688
    • Fixed Redis Cache - Use internal cache for performance & bug fixes by @circulon in https://github.com/MasoniteFramework/masonite/pull/686
    • Fixed missing comment for singleton method in container.py by @filippetrovicAT in https://github.com/MasoniteFramework/masonite/pull/690
    • Fixed messagebag by @josephmancuso in https://github.com/MasoniteFramework/masonite/pull/691

    New Contributors

    • @goophps made their first contribution in https://github.com/MasoniteFramework/masonite/pull/684
    • @filippetrovicAT made their first contribution in https://github.com/MasoniteFramework/masonite/pull/688

    Full Changelog: https://github.com/MasoniteFramework/masonite/compare/v4.16.0...v4.16.1

    Source code(tar.gz)
    Source code(zip)
  • v4.16.0(Jun 26, 2022)

    Change Log

    Added

    • Added more features to CORS by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/577

    Fixed

    • Fixed session drivers default options ignored by @circulon in https://github.com/MasoniteFramework/masonite/pull/653
    • Fixed validation by @josephmancuso in https://github.com/MasoniteFramework/masonite/pull/681
    • Fixed default connection by @josephmancuso in https://github.com/MasoniteFramework/masonite/pull/682
    • Fixed setup.py with missing packages by @rfschubert in https://github.com/MasoniteFramework/masonite/pull/679

    Full Changelog: https://github.com/MasoniteFramework/masonite/compare/v4.15.0...v4.16.0

    Source code(tar.gz)
    Source code(zip)
  • v4.15.0(Jun 13, 2022)

    Change Log

    Added

    • Added boolean validation rule by @if4lcon in https://github.com/MasoniteFramework/masonite/pull/664
    • Added better docstring and typehints by @josephmancuso in https://github.com/MasoniteFramework/masonite/pull/668
    • Added docstring to orm provider by @josephmancuso in https://github.com/MasoniteFramework/masonite/pull/669
    • Added Masonite ORM to install requires

    Fixed

    • Fixed crafted Masonite classes to init.py by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/658
    • Fixed getting MessageBag from session by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/657
    • Fixed migration publishing by @josephmancuso in https://github.com/MasoniteFramework/masonite/pull/666
    • Fixed encoding of chinese characters in response by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/665

    New Contributors

    • @if4lcon made their first contribution in https://github.com/MasoniteFramework/masonite/pull/664

    Full Changelog: https://github.com/MasoniteFramework/masonite/compare/v4.14.3...v4.15.0

    Source code(tar.gz)
    Source code(zip)
  • v4.14.3(Jun 2, 2022)

    Change Log

    Fixed

    • Fixed Mailgun driver broken when region option has been introduced in #628 by @girardinsamuel

    Added

    • Updated GitHub actions dependencies by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/656

    Full Changelog: https://github.com/MasoniteFramework/masonite/compare/v4.14.2...v4.14.3

    Source code(tar.gz)
    Source code(zip)
  • v4.14.2(Jun 1, 2022)

    Change Log

    Fixed

    • Fixed route not found error when sending emails inside jobs by @josephmancuso in https://github.com/MasoniteFramework/masonite/pull/652

    Full Changelog: https://github.com/MasoniteFramework/masonite/compare/v4.14.1...v4.14.2

    Source code(tar.gz)
    Source code(zip)
  • v4.14.1(May 28, 2022)

    Change Log

    Fixed

    • Fixed bytes not being allowed on the local storage driver by @josephmancuso in https://github.com/MasoniteFramework/masonite/pull/650

    Full Changelog: https://github.com/MasoniteFramework/masonite/compare/v4.14.0...v4.14.1

    Source code(tar.gz)
    Source code(zip)
  • v4.14.0(May 27, 2022)

    Change Log

    Added

    • Allow unbound class resolution from container by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/624
    • Adding support to define custom region in mailgun endpoint. by @Marlysson in https://github.com/MasoniteFramework/masonite/pull/628
    • Added ability to handle correctly OPTIONS and HEAD requests by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/578
    • Added more options to strong validator, added newnot_exists_in_db validator and fixed phone validator by @circulon in https://github.com/MasoniteFramework/masonite/pull/636
    • Added Redis Session driver by @circulon in https://github.com/MasoniteFramework/masonite/pull/621
    • Added more tests for Container by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/637
    • Added explicit type casting for route parameters by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/639

    Fixed

    • Fixed json payload in SlackDriver by @os-nikita in https://github.com/MasoniteFramework/masonite/pull/626
    • Fixed exceptionite possible solutions for InvalidCSRFToken and ModelNotFoundException by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/634
    • Fixed file, image and video validators when validating files from request by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/623
    • Fixed UploadFile ModuleNotFound Error by @circulon in https://github.com/MasoniteFramework/masonite/pull/640
    • Fixed route group prefix by @josephmancuso in https://github.com/MasoniteFramework/masonite/pull/647

    New Contributors

    • @os-nikita made their first contribution in https://github.com/MasoniteFramework/masonite/pull/620
    • @circulon made their first contribution in https://github.com/MasoniteFramework/masonite/pull/636

    Full Changelog: https://github.com/MasoniteFramework/masonite/compare/v4.13.0...v4.14.0

    Source code(tar.gz)
    Source code(zip)
  • v4.13.0(May 5, 2022)

    Change Log

    Added

    • Add Rate Limiting feature by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/527
    • Added dd helper to views by @josephmancuso in https://github.com/MasoniteFramework/masonite/pull/617
    • Added Route Views by @josephmancuso in https://github.com/MasoniteFramework/masonite/pull/616

    Full Changelog: https://github.com/MasoniteFramework/masonite/compare/4.12.1...v4.13.0

    Source code(tar.gz)
    Source code(zip)
  • 4.12.1(May 2, 2022)

    Change Log

    Fixed

    • Fixed jwt tokens by @josephmancuso in https://github.com/MasoniteFramework/masonite/pull/611

    Full Changelog: https://github.com/MasoniteFramework/masonite/compare/v4.12.0...4.12.1

    Source code(tar.gz)
    Source code(zip)
  • v4.12.0(Apr 29, 2022)

    Change Log

    Added

    • Added missing remember() method on main Cache instance by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/603
    • Added possibility to add method to controller instances by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/605
    • Added method view helper to change request method in HTML forms by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/602
    • Added database validation rules exists_in_db and unique_in_db by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/596
    • Added feature to share individual input validation errors in session by @yubarajshrestha in https://github.com/MasoniteFramework/masonite/pull/553

    Fixed

    • Fixed order of published package migrations by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/604

    Changed

    • Switched to werkzeug development server by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/608

    Full Changelog: https://github.com/MasoniteFramework/masonite/compare/v4.11.0...v4.12.0

    Source code(tar.gz)
    Source code(zip)
  • v4.11.0(Apr 23, 2022)

    Change Log

    Fixed

    • Fixed actingAs, withCookies, withHeaders, assertAuthenticated, assertGuest in TestCase and fixed Auth which was not persisting user by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/588
    • Fixed cryptography dependency version and use their new version scheme by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/595
    • Fixed getting extension such as .tar.gz from files in filesystem feature by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/594

    Added

    • Added Handling of ModelNotFound exceptions as HTTP 404 errors by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/509
    • Added ability to resolve simple instance as controller in routes by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/598
    • Added stop and dump features to TestCase by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/599

    Full Changelog: https://github.com/MasoniteFramework/masonite/compare/v4.10.3...v4.11.0

    Source code(tar.gz)
    Source code(zip)
  • v4.10.3(Apr 16, 2022)

    Change Log

    Fixed

    • Fixed route ending with a / throwing error by @josephmancuso in https://github.com/MasoniteFramework/masonite/pull/592
    • Fixed minimum Exceptionite version

    Full Changelog: https://github.com/MasoniteFramework/masonite/compare/v4.10.2...v4.10.3

    Source code(tar.gz)
    Source code(zip)
  • v4.10.2(Apr 16, 2022)

    Change Log

    Fixed

    • fixed home route and added solution for it by @josephmancuso in https://github.com/MasoniteFramework/masonite/pull/591

    Full Changelog: https://github.com/MasoniteFramework/masonite/compare/v4.10.1...v4.10.2

    Source code(tar.gz)
    Source code(zip)
  • v4.10.1(Apr 16, 2022)

  • v4.10.0(Apr 13, 2022)

    Change Log

    Added

    • Added more config options to AMQP driver by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/576
    • Added ability to pass query parameters to url and route helpers and to redirect method by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/575
    • Added type hinting to codebase by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/526

    Fixed

    • Fixed optional helper by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/580
    • Fixed ExceptionHandler by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/583
    • Fixed setting session when middleware redirects instead of continuing request flow by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/581

    Security

    • Bumped waitress version to a 2.1.1+ to cover a security release

    Full Changelog: https://github.com/MasoniteFramework/masonite/compare/v4.9.0...v4.10.0

    Source code(tar.gz)
    Source code(zip)
  • v4.9.0(Apr 10, 2022)

    Change Log

    Added

    • Added new exceptionite debugging screen. Upgraded to Exceptionite 2

    Full Changelog: https://github.com/MasoniteFramework/masonite/compare/v4.8.3...v4.9.0

    Source code(tar.gz)
    Source code(zip)
  • v4.8.3(Mar 30, 2022)

    Change Log

    Fixed

    • Fixed query string use by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/569
    • Fixed has method in sessions by @josephmancuso in https://github.com/MasoniteFramework/masonite/pull/571

    Full Changelog: https://github.com/MasoniteFramework/masonite/compare/v4.8.2...v4.8.3

    Source code(tar.gz)
    Source code(zip)
  • v4.8.2(Mar 24, 2022)

    Change Log

    Fixed

    • Fixed environment overriding issue by @josephmancuso in https://github.com/MasoniteFramework/masonite/pull/570

    Full Changelog: https://github.com/MasoniteFramework/masonite/compare/v4.8.1...v4.8.2

    Source code(tar.gz)
    Source code(zip)
  • v4.8.1(Mar 22, 2022)

  • v4.8.0(Mar 22, 2022)

    Change Log

    Fixed

    • Fixed parsing post data by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/559
    • Fixed merging Mailable options with general mail options by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/561
    • Fixed deprecation warning for distutils module in craft auth command by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/563
    • Fixed command capsule to work on uwsgi by @josephmancuso in https://github.com/MasoniteFramework/masonite/pull/567

    Added

    • Added the Broadcast facade. by @Marlysson in https://github.com/MasoniteFramework/masonite/pull/565
    • Added new testing assertions to test console output and errors by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/560

    Full Changelog: https://github.com/MasoniteFramework/masonite/compare/v4.7.2...v4.8.0

    Source code(tar.gz)
    Source code(zip)
  • v4.7.2(Mar 8, 2022)

    Change Log

    Fixed

    • Fixed accessing nested input from requests with application/json and application/x-www-form-urlencoded content type by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/556 and https://github.com/MasoniteFramework/masonite/pull/557

    Full Changelog: https://github.com/MasoniteFramework/masonite/compare/v4.7.1...v4.7.2

    Source code(tar.gz)
    Source code(zip)
  • v4.7.1(Mar 7, 2022)

    Change Log

    Fixed

    • Fixed running task by allowing to use name or class name by @Marlysson in https://github.com/MasoniteFramework/masonite/pull/546
    • Added correct default value [] when using [] in inputs by @josephmancuso in https://github.com/MasoniteFramework/masonite/pull/547
    • Fixed nested validation in lists by @yubarajshrestha in https://github.com/MasoniteFramework/masonite/pull/542

    Full Changelog: https://github.com/MasoniteFramework/masonite/compare/v4.7.0...v4.7.1

    Source code(tar.gz)
    Source code(zip)
  • v4.7.0(Feb 26, 2022)

    Change Log

    Added

    • Add support for multiple file input uploads by @cercos in https://github.com/MasoniteFramework/masonite/pull/543

    New Contributors

    • @cercos made their first contribution in https://github.com/MasoniteFramework/masonite/pull/543

    Full Changelog: https://github.com/MasoniteFramework/masonite/compare/v4.6.4...v4.7.0

    Source code(tar.gz)
    Source code(zip)
  • v4.6.4(Feb 23, 2022)

    Change Log

    Fixed

    • Fixed creating events, listeners and tasks on Linux by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/540

    Full Changelog: https://github.com/MasoniteFramework/masonite/compare/v4.6.3...v4.6.4

    Source code(tar.gz)
    Source code(zip)
  • v4.6.3(Feb 22, 2022)

    Change Log

    Fixed

    • Fixed PackageProvider root configuration when Python package name contains package module name by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/538

    Full Changelog: https://github.com/MasoniteFramework/masonite/compare/v4.6.2...v4.6.3

    Source code(tar.gz)
    Source code(zip)
  • v4.6.2(Feb 19, 2022)

    Change Log

    Fixed

    • Added correct instructions to run (project install) when project is created by @girardinsamuel in https://github.com/MasoniteFramework/masonite/pull/536

    Full Changelog: https://github.com/MasoniteFramework/masonite/compare/v4.6.1...v4.6.2

    Source code(tar.gz)
    Source code(zip)
Owner
Masonite
The Masonite Organization. Home Of The Modern And Developer Centric Python Web Framework.
Masonite
Asynchronous HTTP client/server framework for asyncio and Python

Async http client/server framework Key Features Supports both client and server side of HTTP protocol. Supports both client and server Web-Sockets out

aio-libs 13.2k Jan 5, 2023
A familiar HTTP Service Framework for Python.

Responder: a familiar HTTP Service Framework for Python Powered by Starlette. That async declaration is optional. View documentation. This gets you a

Taoufik 3.6k Dec 27, 2022
web.py is a web framework for python that is as simple as it is powerful.

web.py is a web framework for Python that is as simple as it is powerful. Visit http://webpy.org/ for more information. The latest stable release 0.62

null 5.8k Dec 30, 2022
Daniel Vaz Gaspar 4k Jan 8, 2023
CherryPy is a pythonic, object-oriented HTTP framework. https://docs.cherrypy.org/

Welcome to the GitHub repository of CherryPy! CherryPy is a pythonic, object-oriented HTTP framework. It allows building web applications in much the

CherryPy 1.6k Dec 29, 2022
Asita is a web application framework for python based on express-js framework.

Asita is a web application framework for python. It is designed to be easy to use and be more easy for javascript users to use python frameworks because it is based on express-js framework.

Mattéo 4 Nov 16, 2021
Free and open source full-stack enterprise framework for agile development of secure database-driven web-based applications, written and programmable in Python.

Readme web2py is a free open source full-stack framework for rapid development of fast, scalable, secure and portable database-driven web-based applic

null 2k Dec 31, 2022
Bionic is Python Framework for crafting beautiful, fast user experiences for web and is free and open source

Bionic is fast. It's powered core python without any extra dependencies. Bionic offers stateful hot reload, allowing you to make changes to your code and see the results instantly without restarting your app or losing its state.

 ⚓ 0 Mar 5, 2022
Fast, asynchronous and elegant Python web framework.

Warning: This project is being completely re-written. If you're curious about the progress, reach me on Slack. Vibora is a fast, asynchronous and eleg

vibora.io 5.7k Jan 8, 2023
Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed.

Tornado Web Server Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed. By using non-blocking ne

null 20.9k Jan 1, 2023
bottle.py is a fast and simple micro-framework for python web-applications.

Bottle: Python Web Framework Bottle is a fast, simple and lightweight WSGI micro web-framework for Python. It is distributed as a single file module a

Bottle Micro Web Framework 7.8k Dec 31, 2022
Sierra is a lightweight Python framework for building and integrating web applications

A lightweight Python framework for building and Integrating Web Applications. Sierra is a Python3 library for building and integrating web applications with HTML and CSS using simple enough syntax. You can develop your web applications with Python, taking advantage of its functionalities and integrating them to the fullest.

null 83 Sep 23, 2022
Flask Sugar is a web framework for building APIs with Flask, Pydantic and Python 3.6+ type hints.

Flask Sugar is a web framework for building APIs with Flask, Pydantic and Python 3.6+ type hints. check parameters and generate API documents automatically. Flask Sugar是一个基于flask,pyddantic,类型注解的API框架, 可以检查参数并自动生成API文档

null 162 Dec 26, 2022
Fast⚡, simple and light💡weight ASGI micro🔬 web🌏-framework for Python🐍.

NanoASGI Asynchronous Python Web Framework NanoASGI is a fast ⚡ , simple and light ?? weight ASGI micro ?? web ?? -framework for Python ?? . It is dis

Kavindu Santhusa 8 Jun 16, 2022
Dazzler is a Python async UI/Web framework built with aiohttp and react.

Dazzler is a Python async UI/Web framework built with aiohttp and react. Create dazzling fast pages with a layout of Python components and bindings to update from the backend.

Philippe Duval 17 Oct 18, 2022
APIFlask is a lightweight Python web API framework based on Flask and marshmallow-code projects

APIFlask APIFlask is a lightweight Python web API framework based on Flask and marshmallow-code projects. It's easy to use, highly customizable, ORM/O

Grey Li 705 Jan 4, 2023
Async Python 3.6+ web server/framework | Build fast. Run fast.

Sanic | Build fast. Run fast. Build Docs Package Support Stats Sanic is a Python 3.6+ web server and web framework that's written to go fast. It allow

Sanic Community Organization 16.7k Jan 8, 2023
The Python micro framework for building web applications.

Flask Flask is a lightweight WSGI web application framework. It is designed to make getting started quick and easy, with the ability to scale up to co

The Pallets Projects 61.5k Jan 6, 2023
Async Python 3.6+ web server/framework | Build fast. Run fast.

Sanic | Build fast. Run fast. Build Docs Package Support Stats Sanic is a Python 3.6+ web server and web framework that's written to go fast. It allow

Sanic Community Organization 16.7k Dec 28, 2022