<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 15/06/2016 18:07, Chukwudi Nwachukwu
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAKBXtw8VCANqTeRJhTEoj_20VGPG2JiWmAn_ecVJVcQYcqjD9Q@mail.gmail.com"
      type="cite">
      <div class="gmail_quote"><br>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Iwan
          Vosloo <<a moz-do-not-send="true"
            href="mailto:iwan@reahl.org">iwan@reahl.org</a>><br>
          Date: Tue, 14 Jun 2016 20:06:00 +0200<br>
        </blockquote>
      </div>
    </blockquote>
    <blockquote
cite="mid:CAKBXtw8VCANqTeRJhTEoj_20VGPG2JiWmAn_ecVJVcQYcqjD9Q@mail.gmail.com"
      type="cite">
      <div class="gmail_quote">
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">On
          14/06/2016 10:10, Chukwudi Nwachukwu wrote:<br>
          <br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            I have seen it, well, I can only say that the GUI needs to
            be worked on.<br>
            <br>
          </blockquote>
          Not sure what you are referring to, since there's no GUI ?<br>
        </blockquote>
        <br>
        The widgets styling. Good day</div>
    </blockquote>
    <br>
    Ah, yes, of course. I agree. That is exactly what this release is
    about! If you read the link in my original post you will get more
    info:<br>
    <br>
    <blockquote type="cite">We are slowly moving to base styling and
      layout on Bootstrap, and this version is an experimental first
      step.
      <br>
      <br>
      You can find more details here: <a class="moz-txt-link-freetext"
        href="http://www.reahl.org/docs/3.2/whatchanged.d.html">
        http://www.reahl.org/docs/3.2/whatchanged.d.html</a></blockquote>
    <br>
    There's even more detail on: <a
      href="http://www.reahl.org/docs/3.2/tutorial/bootstrap/index.d.html"><a class="moz-txt-link-freetext" href="http://www.reahl.org/docs/3.2/tutorial/bootstrap/index.d.html">http://www.reahl.org/docs/3.2/tutorial/bootstrap/index.d.html</a></a><br>
    <br>
    We're programmers, not web designers, so it makes sense for us to
    outsource that side of things to the bootstrap project (like many
    others are doing).<br>
    <br>
    I posted about Reahl in this list because I want to encourage others
    in Africa to do the same: start their own projects and share their
    experiences about doing so with us on this list. <br>
    <br>
    A project is not magically born big and powerful and easy-to-use and
    complete. It is a lot of hard work to get to your goal and it takes
    time. A project starts with a manageable small implementation and is
    added on to, over time, to become more mature and feature-full. As
    an example: In previous releases we were not that concerned with
    what things looked like (in fact, people were meant to supply their
    own styling just like they have to do using django/flask/etc: <a
      href="http://www.reahl.org/docs/3.2/tutorial/styling.d.html#styling"><a class="moz-txt-link-freetext" href="http://www.reahl.org/docs/3.2/tutorial/styling.d.html#styling">http://www.reahl.org/docs/3.2/tutorial/styling.d.html#styling</a></a>
    ). It is only with this release that we can pay more attention to
    styling, with the addition of Bootstrap support.<br>
    <br>
    I would love to see more software (especially open source software)
    being exported from Africa instead of being imported. Wouldn't that
    be something to be proud of? If we want that to happen though, we
    must realise that every project has to start somewhere and grow -
    and we'll only get there if we actually help each other along these
    journeys. (Help which includes thoughtful critique too!) That is
    what the Python community is all about.<br>
    <br>
    <br>
    That said, understanding the goals of a project sometimes takes
    effort. With Reahl, for example, you'd have work through the
    tutorial to get an idea for where Reahl is headed (<a
      href="http://www.reahl.org/docs/3.2/tutorial/index.d.html"><a class="moz-txt-link-freetext" href="http://www.reahl.org/docs/3.2/tutorial/index.d.html">http://www.reahl.org/docs/3.2/tutorial/index.d.html</a></a>).
    (You may have to think differently about stuff you already know
    well.)<br>
    <br>
    There is an endless and growing list of things a programmer needs to
    care about when using a traditional web framework. With Reahl, we're
    trying to build a foundation based on Python which hides all that
    stuff and just handles it for you without your even needing to be
    aware of it happening. Of course, we still have some way to go
    before we can claim to handle it all for you, but that is what we're
    aiming for. <br>
    <br>
    Here are some examples (compare them with <a
      href="http://www.reahl.org/docs/3.2/tutorial/bootstrap/forms.d.html"><a class="moz-txt-link-freetext" href="http://www.reahl.org/docs/3.2/tutorial/bootstrap/forms.d.html">http://www.reahl.org/docs/3.2/tutorial/bootstrap/forms.d.html</a></a>)<br>
    <br>
    To deal with validation and form submission in django, for example,
    you do stuff like this many times in your project (from <a
      href="http://tutorial.djangogirls.org/en/django_forms/#saving-the-form"><a class="moz-txt-link-freetext" href="http://tutorial.djangogirls.org/en/django_forms/#saving-the-form">http://tutorial.djangogirls.org/en/django_forms/#saving-the-form</a></a>):<br>
    <br>
    <tt>def post_new(request):</tt><tt><br>
    </tt><tt>    if request.method == "POST":</tt><tt><br>
    </tt><tt>        form = PostForm(request.POST)</tt><tt><br>
    </tt><tt>        if form.is_valid():</tt><tt><br>
    </tt><tt>            post = form.save(commit=False)</tt><tt><br>
    </tt><tt>            post.author = request.user</tt><tt><br>
    </tt><tt>            post.published_date = timezone.now()</tt><tt><br>
    </tt><tt>            post.save()</tt><tt><br>
    </tt><tt>            return redirect('post_detail', pk=post.pk)</tt><tt><br>
    </tt><tt>    else:</tt><tt><br>
    </tt><tt>        form = PostForm()</tt><tt><br>
    </tt><tt>    return render(request, 'blog/post_edit.html', {'form':
      form})</tt><tt><br>
    </tt><br>
    <br>
    In contrast, with Reahl handling a POST vs a GET and checking that
    the form is valid are automatically dealt with (including
    validation). You just link your Button to the Action it should
    execute when clicked:<br>
    <br>
    <tt>btn = form.add_child(Button(self, new_address.events.save))</tt><br>
    <br>
    To be fair, you also have to create an Action on the equivalent of
    your blog post object above, with something like:<br>
    <tt><br>
    </tt><tt></tt><tt>    @exposed</tt><tt><br>
    </tt><tt>    def events(self, events):</tt><tt><br>
    </tt><tt>        events.save = Event(label='Save',
      action=Action(self.save))</tt><tt><br>
    </tt><br>
    Notice how there's no mention here of POST/GET/validation/committing
    or not etc.<br>
    <br>
    <br>
    Another example: if you want to use bootstrap with django, you have
    to do all kinds of things like:<br>
    <br>
     - Set up links to Bootstrap as explained at the start of: <a
      href="http://tutorial.djangogirls.org/en/css/"><a class="moz-txt-link-freetext" href="http://tutorial.djangogirls.org/en/css/">http://tutorial.djangogirls.org/en/css/</a></a><br>
     - Know how and where to use bootstrap classes in your html, as
    shown with class=container here: <a
href="http://tutorial.djangogirls.org/en/django_forms/#link-to-a-page-with-the-form"><a class="moz-txt-link-freetext" href="http://tutorial.djangogirls.org/en/django_forms/#link-to-a-page-with-the-form">http://tutorial.djangogirls.org/en/django_forms/#link-to-a-page-with-the-form</a></a> 
    (but for different widgets, you have to learn what to do in each
    case, for example: <a
      href="http://getbootstrap.com/components/#nav-tabs"><a class="moz-txt-link-freetext" href="http://getbootstrap.com/components/#nav-tabs">http://getbootstrap.com/components/#nav-tabs</a></a>).<br>
    <br>
    Even once you completed everything up to the end of <a
      href="http://tutorial.djangogirls.org/en/django_forms/"><a class="moz-txt-link-freetext" href="http://tutorial.djangogirls.org/en/django_forms/">http://tutorial.djangogirls.org/en/django_forms/</a></a>,
    your form will STILL not be styled like a bootstrap form (Bootstrap
    forms look like this one: <a
      href="http://www.reahl.org/docs/3.2/_images/bootstrapform.png"><a class="moz-txt-link-freetext" href="http://www.reahl.org/docs/3.2/_images/bootstrapform.png">http://www.reahl.org/docs/3.2/_images/bootstrapform.png</a></a>).<br>
    <br>
    If you want that look, you will probably have to install, link in
    and then use something like this: <a
      href="https://django-bootstrap3.readthedocs.io/en/latest/"><a class="moz-txt-link-freetext" href="https://django-bootstrap3.readthedocs.io/en/latest/">https://django-bootstrap3.readthedocs.io/en/latest/</a></a>
    (unless you want to do it yourself).<br>
    <br>
    In contrast, with Reahl, you literally only have to do something
    like this (for the form itself):<br>
    <br>
    <tt> from reahl.web.bootstrap.forms import FormLayout, TextInput</tt><tt><br>
    </tt><tt><br>
    </tt><tt> my_form.use_layout(FormLayout())</tt><tt><br>
    </tt><tt> my_form.layout.add_input(TextInput(self,
      new_address.fields.name))</tt><tt><br>
    </tt><tt> my_form.layout.add_input(TextInput(self,
      new_address.fields.email_address))</tt><tt><br>
    </tt><br>
    .. and, (to be equivalent to the djangogirls example for the page
    layout), something like this:<br>
    <br>
    <tt> from reahl.web.bootstrap.grid import Container</tt><tt><br>
    </tt><br>
    <tt> class MyCustomPage(HTML5Page):</tt><tt><br>
    </tt><tt>    def __init__(self, view, bookmarks):</tt><tt><br>
    </tt><tt>        super(MyCustomPage, self).__init__(view)</tt><tt><br>
    </tt><tt>        self.use_layout(Container())</tt><tt><br>
    </tt><br>
    <br>
    I know that we already have a lot of cool tools. Yet, we are
    imagining a future that is even better...<br>
    <br>
    - Iwan<br>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Reahl, the Python only web framework: <a class="moz-txt-link-freetext" href="http://www.reahl.org">http://www.reahl.org</a></pre>
  </body>
</html>