Jump to content


Photo

No Support For Djangoforms In Appenfine For Python2.7


  • Please log in to reply
5 replies to this topic

#1 sumn

sumn

    New Member

  • Members
  • Pip
  • 2 posts

Posted 08 April 2013 - 07:13 AM

hi ,
When I run the code on pg 372 ,I get an error which says djangoforms not supported .
When i googled i found that GAE doesnt support django forms any more .Instead there is a mention of wtf forms .

I googled and couldnt find a suitable example to create a form using a data model from wtf


Any help here .

#2 stevenengelen

stevenengelen

    New Member

  • Members
  • Pip
  • 2 posts

Posted 11 April 2013 - 12:48 AM

hi ,
When I run the code on pg 372 ,I get an error which says djangoforms not supported .
When i googled i found that GAE doesnt support django forms any more .Instead there is a mention of wtf forms .

I googled and couldnt find a suitable example to create a form using a data model from wtf


Any help here .


Hello,

I've got the same issue.
I temporarely "solved" the forms problem by copying the django directory in the root google app engine directory like this:

cp -R lib/django-1.4/django/ . (pwd is the google_appengine directory)

and then adapting the code of p 372 like this:

from google.appengine.ext.webapp import template
# from google.appengine.ext.db import djangoforms
from django.forms import forms
import birthDB

class BirthDetailsForm(forms.Form) :
class Meta :
.........

However, if I'm not mistaken templates aren't no longer supported as well. I think best is to read the google/django documentation to find the solution.
If I make any progress, I'll post it here.

#3 paulbarry

paulbarry

    Advanced Member

  • O'Reilly Author
  • PipPipPipPipPipPipPipPip
  • 307 posts

Posted 16 April 2013 - 05:14 AM

This is the price of progress. The latest version of GAE does not support DjangoForms... which is a pity, as I liked them. The templating support has also changed, with Google now preferring Jijna2 templates...

Why did they do this...? I've no idea, but I share your frustration that they did it. :-(

--Paul.

#4 stevenengelen

stevenengelen

    New Member

  • Members
  • Pip
  • 2 posts

Posted 16 April 2013 - 06:44 AM

Well, we try to become developers, so we have to figure out how to pay the price of progress, right :) ?

At the moment, I'm looking at this piece of code:

https://code.google....review/views.py

I hope to find the answer there.

Btw., thanks for the great book Paul!

#5 sumn

sumn

    New Member

  • Members
  • Pip
  • 2 posts

Posted 16 April 2013 - 07:36 AM

Thanks steve for the suggestions .Let me try them .
And also I couldnt agree more with you on the book.
Thanks paul for a great book :)

#6 paulbarry

paulbarry

    Advanced Member

  • O'Reilly Author
  • PipPipPipPipPipPipPipPip
  • 307 posts

Posted 16 April 2013 - 12:41 PM

Hi folks.

Delighted to hear you are all enjoying my book. :-) That means a lot to me (especially as I slave away on the second edition).

Tell all your friends how much fun you're having... (wink).

Regards,

--Paul.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users