[TurboGears] Is it possible to not use a database?

24 views
Skip to first unread message

jeg

unread,
Apr 18, 2012, 1:31:39 PM4/18/12
to turbo...@googlegroups.com

All of the Turbogears examples I have found illustrate building applications
using a database. Instead, we would like to use various web services of ours
for data persistence. Can this be done with TurboGears and ToscaWidgets? If
so, can someone point me to an example?
Thanks, Jerome.
--
View this message in context: http://old.nabble.com/Is-it-possible-to-not-use-a-database--tp33709401p33709401.html
Sent from the Turbogears General mailing list archive at Nabble.com.

Alessandro Molina

unread,
Apr 18, 2012, 2:36:06 PM4/18/12
to turbo...@googlegroups.com
TurboGears projects can be quickstarted without database and auth,
just run the quickstart with -x -n options:

$ paster quickstart -x -n myproject

Then you will get a project without database and authentication, you
can now setup your own backend, call your own web services and provide
your authentication based on those remote calls.

> --
> You received this message because you are subscribed to the Google Groups "TurboGears" group.
> To post to this group, send email to turbo...@googlegroups.com.
> To unsubscribe from this group, send email to turbogears+...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.
>

jeg

unread,
Apr 18, 2012, 6:26:26 PM4/18/12
to turbo...@googlegroups.com

I tried this with http://turbogears.org/2.0/docs/main/ToscaWidgets/forms.html
and it looked ok until I viewed the ".../new" page in the browser. The
generated HTML is broken:

<div id="content">
<div class="currentpage">
Now Viewing: ToscaSample New Movie
</div>
<h1>New Movie</h1>
&lt;form xmlns="http://www.w3.org/1999/xhtml" id="create_movie_form"
action="" method="post" class="required movieform"&gt;
&lt;table border="0" cellspacing="0" cellpadding="2"&gt;
&lt;tr id="create_movie_form_title.container" class="even"
title=""&gt;
&lt;td class="labelcol"&gt;
&lt;label id="create_movie_form_title.label"
for="create_movie_form_title"
-------- MORE OF THE SAME SORT OF CODE WITH &lt; and &gt; ----------------
&lt;/form&gt;
<!-- End of main_content -->
<div id="footer">

Any idea what could cause this?


Alessandro Molina-2 wrote:
>
> TurboGears projects can be quickstarted without database and auth,
> just run the quickstart with -x -n options:
>
> $ paster quickstart -x -n myproject
>
>

--
View this message in context: http://old.nabble.com/Is-it-possible-to-not-use-a-database--tp33709401p33711080.html

Moritz Schlarb

unread,
Apr 19, 2012, 3:56:12 AM4/19/12
to turbo...@googlegroups.com
That looks like you didn't tell your template engine that you want to output literal html from your form.
You need to make sure, that it doesn't get html-escaped again.

If you use Mako:
${form() | n}

In Genshi it doesn't seem to be required if you use py:replace.

Also, you should propably use the more up-to-date version of the docs: http://turbogears.org/2.1/docs/main/ToscaWidgets/forms.html , assuming you are also using the current TG version.
Reply all
Reply to author
Forward
0 new messages