[mezzanine-users] Re: Field RichTextField sem ser Admin

2017-10-12 Thread Rainell Dilou Gómez
Hello,
if I write {{form.media}}, as in the following example, Mezzanine render 
the TinyMCE editor, but the contents of the field is saved only if the 
authenticated user is a superuser. If the authenticated user is not a 
superuser, the contents of the RichTextField type field after submit form 
is blank. This occurs only with the RichTextField type field.
Anyone know why?


{% csrf_token %}
{{ form.media }}
{{ form.as_p }}
{% trans "Submit" %}




Il giorno mercoledì 20 giugno 2012 19:27:09 UTC+2, Daniel França ha scritto:
>
> Olá, pessoa.
> Estou tentando utilizar o campo RichTextField em um formulário que estou 
> criando para o meu site, porém quando entro com um usuário que não é 
> superuser o campo aparece como textarea simples, tem alguma configuração 
> que preciso mexer ou algo que posso fazer para que mesmo os usuários 
> simples tenham acesso ao  RichTextField?
>
> Abs,
> Daniel França
>

-- 
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 mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Newbie user -- How do I change where `about/` goes to?

2017-10-12 Thread Joseph Mohan
http://mezzanine.jupo.org/docs/content-architecture.html#page-templates

You're missing the simplicity of this

So let's say you want a page "Cakes"

Go to Content/Pages and a create a new page (can be of any type,
Richtext/form etc) When you create the new page it will take the title you
entered and turn that into the Slug.

So if your page was called "Cakes" the URL would now be 127.0.0.1:8000/cakes
and you would create the template to be customised in
/templates/pages/cakes.html

In your case:  "About Canvas" | 127.0.0.1:8000/about-canvas.html  |
templates/pages/about-canvas.html

If you want the page to have a different Title to the Slug, you can edit
the Meta section of a page.

Joe



On Thu, Oct 12, 2017 at 1:57 AM, Tom Tanner 
wrote:

> Hm, I'm still doing something wrong. Here's what
> `PROJECT/myTheme/theme/templates/about/about-canvas.html` looks like now:
>
>
> {% extends "base.html" %}
> {% load mezzanine_tags i18n %}
>
>
> {% block meta_title %}
>  {% if page %}
>  {{ page.meta_title }}
>  {% else %}
>  {% trans "About" %}
>  {% endif %}
> {% endblock %}
>
>
> TESTING HERE
>
>
> {% include "includes/contact_form.html" %}
>
>
> `PROJECT/myTheme/theme/templates/about/includes/contact_form.html still
> looks the same, though I did change the hyphens in the filenames to
> underscores, as you may notice.
>
> I copied the contact form HTML from one of the core Mezzanine templates,
> so I'm not totally sure what I'm doing.
>
> To give you a better idea of what I'm trying to do... If you open the
> Admin section of a new Mezzanine site, check out the "Pages" section.
> There's a "Contact" page. I'm trying to change that page into my "About"
> page. I'd like the page to include info about the site, along with the
> contact form that comes along with it by default. I thought copying the
> template at `mezzanine/forms/templates/pages/form.html` would help with
> this.
>
> On Wednesday, October 11, 2017 at 3:35:40 AM UTC-4, Joseph Mohan wrote:
>>
>> Your url has to match the filename (or vise-versa)
>>
>> So in Content/Pages/About  In the Meta section, the Url should be 
>> /about-canvas
>> (http://127.0.0.1:8000/about-canvas)
>>
>> *or*
>>
>> Rename about-canvas.html to about.html
>>
>> Also, always make sure to restart the development server when adding new
>> files.
>>
>> Hope that helps
>>
>> On Tue, Oct 10, 2017 at 10:39 PM, Tom Tanner 
>> wrote:
>>
>>> Hello,
>>>
>>> I've started learning Mezzanine over the past few weeks. I'm making my
>>> own theme. I want to make an `about/` page containing the default "contact
>>> us" form Mezzanine comes with. Here's what part of my project looks like in
>>> directory. `PROJECT/myTheme/theme/templates/about`.
>>>
>>> In the `about/` folder, I have `about-canvas.html` and
>>> `includes/contact-form.html`.
>>>
>>> `about-canvas.html` looks like this.
>>>
>>> {% extends "base.html" %}
>>>
>>>
>>> {% load mezzanine_tags i18n %}
>>>
>>>
>>> TESTING HERE
>>>
>>>
>>> {% include "includes/contact-form.html" %}
>>>
>>> `includes/contact-form.html` looks like this
>>>
>>> {% load mezzanine_tags i18n %}
>>>
>>>
>>> {% block extra_head %}
>>>  {{ block.super }}
>>>  {{ form.media }}
>>> {% endblock %}
>>>
>>>
>>> {% block main %}
>>> {{ block.super }}
>>> {% if request.GET.sent %}
>>>  {% editable page.form.response %}
>>>  {{ page.form.response|richtext_filters|safe }}
>>>  {% endeditable %}
>>> {% else %}
>>>  {% with page.form as page_form %}
>>>  {% editable page_form.content %}
>>>  {{ page_form.content|richtext_filters|safe }}
>>>  {% endeditable %}
>>>  {% endwith %}
>>>
>>>
>>>  {% errors_for form %}
>>>  
>>>  >> enctype="multipart/form-data"{% endif %}>
>>>  {% fields_for form %}
>>>  
>>>  >>  value="{% if page.form.button_text %}{{ page.form.button_text }}{%
>>> else %}{% trans "Submit" %}{% endif %}">
>>>  
>>>  
>>>  
>>>
>>>
>>> {% endif %}
>>>
>>>
>>> {% endblock %}
>>>
>>>
>>>
>>>
>>> {% block extra_js %}
>>> {{ block.super }}
>>> 
>>> $(function() {$('.mezzanine-form :input:visible:enabled:first')
>>> .focus();});
>>> 
>>> {% endblock %}
>>>
>>>
>>> Yet when I fire up `python manage.py runserver`, and head to "
>>> http://127.0.0.1:8000/about/;, it does not appear anything changed. I
>>> don't see the phrase "TESTING HERE" on the page to indicate that Mezzanine
>>> reads from my custom template.
>>>
>>> What must I change so that Mezzanine will read `about-canvas.html` when
>>> I go to "http://127.0.0.1:8000/about/;?
>>>
>>> --
>>> 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 mezzanine-use...@googlegroups.com.
>>> 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, 

[mezzanine-users] Re: How to use mezzanine.forms?

2017-10-12 Thread Rainell Dilou Gómez
Understood, thank you very much Eduardo.

Il giorno mercoledì 11 ottobre 2017 18:10:43 UTC+2, Rainell Dilou Gómez ha 
scritto:
>
> Hello everyone,
> in the project that I am doing I will start working with forms. I know 
> what I can and should do if I work with django.forms, and I suppose 
> mezzanine.forms can help me even more, but how? In the Mezzanine 
> documentation there are no explanations and examples on how to use 
> mezzanine.forms. 
> Can anyone tell me where to find explanations and examples about using 
> mezzanine.forms?
>

-- 
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 mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.