BTC Simple Wizard
A simple application with some classes and scripts for wizard implementation.
Detailed documentation is in the “docs” directory.
Quick start
Add wizard app to project app list in project settings:
INSTALLED_APPS = [ ... 'simple_wizard' ]Add wizard modal to base template:
{% include 'simple_wizard/wizard_modal.html' %}Construct management view with steps like this:
class WizardManagementView(WizardBaseView): """ View for creating wizard with 3 steps """ management_url_pattern = 'test_app:wizard_management' common_title = 'Common Title' # for steps without own title class FirstStep(WizardModalStepMixin, TemplateView): """ First step - simple modal with text message and continue button. """ unique_name = 'message_step' template_name = 'simple_wizard/wizard_modal_message.html' message = 'Simple message step' cache_step = False # step doesn't ask server on repeat show (if it already fetched) buttons = [ LoadWizardStepButton( load_step='form_step', # next step (get request) title='Continue', css_classes=['btn btn-primary'] ) ] class SecondStep(WizardModalStepWithFormMixin, FormView): """ Second step - modal with form (can be form or model form), validation supported. """ unique_name = 'form_step' template_name = 'simple_wizard/wizard_modal_form.html' form_class = SecondStepForm redirect_to_step_if_valid = 'third_step' buttons = [ LoadWizardStepPostButton( load_step='form_step', title='Continue', css_classes=['btn btn-primary'] ) ] def form_valid(self, form): test_model = TestModel.objects.filter(pk=self.kwargs.ger('pk')).first() test_model.field_1 = form.cleaned_data.get('field_1') test_model.save() return super().form_valid(self, form): class ThirdStep(WizardModalStepWithFormMixin, TemplateView): """ Third step - just a template modal """ unique_name = 'third_step' template_name = 'third_step.html' buttons = [ CloseWizardModalButton( title='Finish', css_classes=['btn btn-primary'] ) ]Setups urls:
app_name = 'test_app' ... urlpatterns = [ ... path('wizard-management/<step_to_load>/<int:pk>/', WizardManagementView.as_view(), name='wizard_management') ]Add static files for wizard work:
<script src="{% static 'simple_wizard/wizard.js' %}"></script>Initialize wizard handler:
$(document).ready(function () { const django_modal_wizard = new DjangoModalWizard( '#wizard-modal', '.js-wizard_modal_content', '.js-load_wizard', '.js-close_wizard' ); django_modal_wizard.initSignals(); });
Metadata
Release files for btc-simple-wizard 0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| btc-simple-wizard-0.4.tar.gz | 8.5 kB | Without provenance | Details for btc-simple-wizard-0.4.tar.gz |
Release files / btc-simple-wizard-0.4.tar.gz
| Download URL | btc-simple-wizard-0.4.tar.gz |
|---|---|
| Size | 8.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c972fa05fdf9b64132f75c004da2dac4806bc77b9dc4d82f0af25670ff57474e
|
|
BLAKE2b-256 checksum How to use checksums |
a869372429fe377d2db9c27c5ecc07982f1462afd1ded7361ee670ec83c009fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.7.14
|
Security for btc-simple-wizard 0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.