wagtail-form-example | Django form on a Wagtail site | Form library

 by   gasman Python Version: Current License: No License

kandi X-RAY | wagtail-form-example Summary

kandi X-RAY | wagtail-form-example Summary

wagtail-form-example is a Python library typically used in User Interface, Form, Bootstrap, Wagtail applications. wagtail-form-example has no bugs, it has no vulnerabilities, it has build file available and it has low support. You can download it from GitHub.

An example of implementing a Django form on a Wagtail site, without using the wagtailforms module.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              wagtail-form-example has a low active ecosystem.
              It has 35 star(s) with 11 fork(s). There are 4 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 2 open issues and 6 have been closed. On average issues are closed in 14 days. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of wagtail-form-example is current.

            kandi-Quality Quality

              wagtail-form-example has 0 bugs and 0 code smells.

            kandi-Security Security

              wagtail-form-example has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              wagtail-form-example code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              wagtail-form-example does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              wagtail-form-example releases are not available. You will need to build from source code and install.
              Build file is available. You can build the component from source.
              wagtail-form-example saves you 158 person hours of effort in developing the same functionality from scratch.
              It has 392 lines of code, 3 functions and 34 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed wagtail-form-example and discovered the below as its top functions. This is intended to give you an instant insight into wagtail-form-example implemented functionality, and help decide if they suit your requirements.
            • Create a home page .
            • Display search results .
            • Serve suggestions .
            Get all kandi verified functions for this library.

            wagtail-form-example Key Features

            No Key Features are available at this moment for wagtail-form-example.

            wagtail-form-example Examples and Code Snippets

            No Code Snippets are available at this moment for wagtail-form-example.

            Community Discussions

            QUESTION

            Do I use a Wagtail form or a Django one?
            Asked 2018-May-12 at 15:39

            I want to add a simple form to my Wagtail site, which will enable some users (with suitable permissions perhaps) to create a new page, outlining a game scenario. Just a title field and a rich-text field in other words.

            Now I have read the docs at http://docs.wagtail.io/en/v1.10.1/reference/contrib/forms, which is close to what I need, except that the AbstractForm class or the like appears to be geared towards letting users design their own forms, which I do not want them to do. So the alternative is to use a standard Django form, as per the 'example' given at https://github.com/gasman/wagtail-form-example/commits/master. However I do not find that to be useful.

            So my question is this: do I use a Wagtail form which (I presume) has the 'correct' page-handling code, or I do I somehow shoe-horn a Django form into my Wagtail site and hope that it integates well with the Wagtail stuff?

            Alternatively, can I simply use the Wagtail form and prohibit users from modifying it?

            On reflection, all I need to do (I think) is to define a new Page type! That will be a form of sorts, which I have confirmed by examining the source of a 'Create Event' page in the demo.

            I still need a link/button to invoke an instance of the relevant model but that should not be a problem.

            As I indicated earlier, this is largely due to ignorance of Wagtail on my part but somehow the usage is not that well explained, IMO.

            ...

            ANSWER

            Answered 2017-Jun-04 at 12:17

            I would recommend going with Wagtail forms, here is why;

            • Great support out of the box, easy reporting on submissions and email alerts.
            • Good docs surrounding building a view for the form page and response pages, plus you can add some nice things to the form_page model like an intro paragraph.
            • Better page handling as you mentioned, no need to work around how to put the form page in your existing site structure.
            • All the benefits of normal pages such as searching, revisions/drafts, existing and using existing views.

            Even if you might only (as the super admin) create one form (Game Scenario) it would still be worth it.

            The page that is created can be viewed by anyone that views your site (or has access to viewing that page via the page permissions).

            You can also record the user that submitted the form by following the instructions here:

            http://docs.wagtail.io/en/v1.10.1/reference/contrib/forms/customisation.html#custom-form-submission-model

            Instructions on how to edit permissions, so that users with admin access cannot edit the form structure:

            http://docs.wagtail.io/en/v1.10.1/topics/permissions.html

            Additional Information

            In reply to your questions/comments, for the sake of future viewers;

            • Submitted data storage All form submissions (aka responses) get stored in a form. submissions table that comes as part of the Wagtail forms module. You can define your own form submissions table if you need to extend the basic functionality.

            • Why there is not a page wrapper for Django forms? I am not sure on this one, the main reason is probably to provide basic user defined forms as part of the Wagtail admin UI. Internally, Django form fields are used but defined dynamically on the fly and submissions stored as JSON. The purpose again is to have simple user defined forms.

            • Creating a Page Type. Yes, this is how Wagtail approachesthe forms problem, a Form is just a page. This form page can exist anywhere you want it to in the page heiracy. This is different to Snippets for example, which are models used separately from Pages.

            • Linking to Form Pages As each form page is also just a page, you can create a link to it anywhere you can link a Page.

            Source https://stackoverflow.com/questions/44144682

            QUESTION

            Issue with Page model when overriding serve()
            Asked 2017-Jul-23 at 09:53

            I followed the instructions on the Wagtail Form Example on Github to create standard Django forms outside of Wagtail. This worked perfectly, however there is a new issue now.

            On the pages where there are forms, the standard Page-related template code in base.html no longer works, namely:

            ...

            ANSWER

            Answered 2017-Jul-23 at 09:53

            You are using the variable self in your template code, but there is no self context variable being passed in the call to render - only page and form.

            Using self in templates is discouraged, as it's incompatible with some template engines such as Jinja2. You should use page instead:

            Source https://stackoverflow.com/questions/45164401

            QUESTION

            Wagtail: Passing Django form to WagtailAdmin (Sidebar: Forms)
            Asked 2017-Apr-01 at 17:58

            I have a very interesting task.

            • Wagtail Form with a FileField - For image upload (I guess this is not possible yet)

            From the point that this is not possible yet in Wagtail I've tried another thing.

            1. A Django Form (from this example django form in wagtail) that has actually a FileField.
            2. Generate the link to uploaded image (let's say '/media/pics/image_example.jpg')
            3. Somehow pass this link (a text field) to Wagtail Form and auto-submit it.

            So at the end, we have the Form Submissions in WagtailAdmin that has a field with the direct url to the uploaded image.

            But.. I don't really understand how this must work. Any ideas? Maybe there are better solutions for my problem.

            ...

            ANSWER

            Answered 2017-Apr-01 at 17:58

            Have a method as mentioned below

            Source https://stackoverflow.com/questions/43159794

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install wagtail-form-example

            You can download it from GitHub.
            You can use wagtail-form-example like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/gasman/wagtail-form-example.git

          • CLI

            gh repo clone gasman/wagtail-form-example

          • sshUrl

            git@github.com:gasman/wagtail-form-example.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link