I think it's possible, but you won't be able to use much of Mezzanine's
built-in capabilities, or at least you'll have to modify them quite a
bit. I'm not very familiar with the media library code to be honest, so
I encourage you to dive in an assess the situation.
When I want non-admins to upload images, I provide a formset to upload a
bunch of images with descriptions (kinda like Mezzanine's gallery),
instead of allowing them to upload through the Rich Text editor. I then
present the images as a gallery (with a lightbox and all). That's pretty
easy with Django's built-in form capabilities. It looks like you really
need them to include the images inline with the text, so this approach
might not be viable for you.
On 2017-06-04 4:13 PM, Diego Castro wrote:
It really is necessary for my project that users
(non-administrators) can upload images when they use
richtextfield, I am creating a platform to publish low-cost
science experiments and I need registered users could easily
contribute to the platform.
I would like to have a separate media library for each user, is it
possible to do this on mezzanine?
El domingo, 4 de junio de 2017, 16:18:42 (UTC-5), Eduardo Rivas escribió:
Hmm, I would assume that the media library is not going to work
for non admin users. You'll have to implement file uploads
yourself. I would start by checking how Mezzanine handles file
uploads in TinyMCE and emulating that without the admin checks.
But first make sure you want non admin users uploading files to
your server. I would recommend implementing a regular file field
in the form and using the rich text editor for text only.
On Jun 4, 2017 3:12 PM, "Diego Castro" <[email protected]
<javascript:>> wrote:
Thank you for your answer Eduardo. No, I had not included
{{form.media}}. Now the richtextfield is displayed correctly,
thank you very much. But there is a problem, if I want to load
an image the following error appears
|
Pagenotfound (404)
RequestMethod: GET
RequestURL:
http://127.0.0.1:8000/fisica/undefined/?pop=5&type=image
<http://127.0.0.1:8000/fisica/undefined/?pop=5&type=image>
Raised by: mezzanine.pages.views.page
|
I am putting in the template the following:
|
<formmethod="POST"enctype="multipart/form-data">
|
{% csrf_token %}
{{ form.media }}
{{ form.as_p }}
<button type="submit" class="save btn
btn-default">Crear</button>
</form>
I am doing something wrong?
--
You received this message because you are subscribed to the
Google Groups "Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from
it, send an email to [email protected]
<javascript:>.
For more options, visit https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.
--
You received this message because you are subscribed to the Google
Groups "Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Mezzanine
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.