Closed guilherme-funchal closed 4 years ago
Please take a look at issue #11. Is sweetalert installed correctly?
Hello, thank for you reply.
It includes installation in the generation of the docker container and apparently everything is OK.
I need to install the sweetify2 or just sweetify (pip install sweetify) ?
In my code I inserted: sweetify.sweetalert(request, 'Title', button=True)
Error : The view aries_community.views.handle_credential_offer didn't return an HttpResponse object. It returned None instead.
As stated in the README "Note: This package does not provide the client-side files of SweetAlert. You have to provide them yourself." you have to install the client-side part yourself. So you need to install both sweetify and sweetalert2.
Regarding your error: Did you read the README at all? You still have to redirect at the end.
Take a look
sweetify.success(request, 'test')
return redirect('/connections')
Nothing happens...
Did you try this https://github.com/Atrox/sweetify-django/issues/11#issuecomment-562600746?
Did you try this?
The Django is running inside a container, how do I do this?
This has nothing to do with your container. Open your browser, navigate to your site and execute the line?
VM129:1 Uncaught ReferenceError: Swal is not defined
at
Sorry, but not is clear to me where I must install the lib sweetalert2.
Should I generate the Django container with the library or load it on the base page of the site?
I try to execute in console of Chrome and I get the error:
Uncaught ReferenceError: Swal is not defined
Yeah, so you are missing the sweetalert2 library. Include it in your base template to load it.
How I do this ?
Put <script src="https://cdn.jsdelivr.net/npm/sweetalert2@9"></script>
into your base template
Its works, thanks a lot for your help.
Glad to hear :)
Why doesn't the image appear?
I can't help you if you give me no information whatsoever.
Thanks a lot again...Its works...just pass icon='error' for example in thes command.
Hi, I followed all the steps to install on Django and I was not successful.
Inside my views.py I inserted :
import sweetify
sweetify.fire('Good job!', 'You clicked the button!', 'success')
No message appears.