GithubHelp home page GithubHelp logo

sebastian-ardila / google-app-engine-django Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 320 KB

Automatically exported from code.google.com/p/google-app-engine-django

License: Apache License 2.0

Makefile 0.37% Python 99.63%

google-app-engine-django's Introduction

GOOGLE APP ENGINE HELPER FOR DJANGO
===================================

This package provides a helper that eases the process of developing a Django
project to run on the Google App Engine. The helper is structured as a Django
application that should be installed inside your project. See below for
detailed usage instructions.

The helper provides the following functionality:

  * The ability to use most manage.py commands
    - Additional manage.py commands (update, rollback, and vacuum_indexes) that
      operate identically to the appcfg.py equivalents.
  * A BaseModel class that appears the same as the standard Django Model class.
  * The ability to serialize and deserialize model instances to JSON, YAML and
    XML.
  * Access to Django's test framework with a test datastore and support for
    fixtures.
  * The ability to send email via the App Engine mail API using the standard
    Django mail functions.
  * An App Engine compatible implementation of the Django authentication
    framework. Only users are supported at this time. Group and Permission
    support is not implemented.
  * Support for the Django memcache cache backend module.
  * Support for the db and cache session backed modules.

The helper is provided in the context of a blank Django project, very
similar to what would be provided by the django-admin.py startproject command.
This project contains minor customisations to manage.py and settings.py that
demonstrate how to integrate the helper with a Django project.

To use the helper you have two choices:

1) Copy the entire project provided with the helper and modify it to bootstrap
   your project.
2) Copy the appengine_django application into your existing project and modify
   the settings appropriately.

Instructions for both cases are provided below.


Obtaining the helper
--------------------

You can download the latest released version of the helper from the Google Code
project at: http://code.google.com/p/google-app-engine-django

The helper will be unzipped into a directory named appengine_helper_for_django.

Alternatively you can check out the latest version of the helper directly from
the SVN repository with the following command:

svn co http://google-app-engine-django.googlecode.com/svn/trunk/ \
  appengine_helper_for_django


Required Software
-----------------

You will need the Google App Engine SDK and its dependencies installed on your
computer. Additionally if you are developing on a Windows machine you will need
to install the Python for Windows extensions from
http://sourceforge.net/projects/pywin32/

This version of the helper requires Django 1.0beta_1 or greater. If you would
prefer to use the stable version of Django (0.96) that is bundled with the App
Engine SDK then you can download revision 53 or earlier of the helper from the
address in the previous section. You must place Django in a directory named
django/ instead your project, or provide a django.zip file containing the
zipped Django source. See below for details.


Using the helper to bootstrap a new project
-------------------------------------------

1) Copy the appengine_helper_for_django directory to a new location named after
   your project

2) Edit the application line in app.yaml to match the name you registered your
   application under in the Admin Console.

3) If you have installed the Google App Engine SDK using the Windows or MacOS
   installers provided by Google you may skip this step.

   Create a symlink from the location of the extracted SDK zipfile to the
   '.google_appengine' directory inside your project. E.g:

   ln -s /home/me/google_appengine /home/me/myproject/.google_appengine

   If you like to stay up to date see the 'SDK via SVN' section below for an
   alternative setup.

4) Download and copy Django into the django/ subdirectory of your project.
   Alternatively you can create a zipfile of the Django code and place it at
   django.zip inside your project. E.g.

   /home/me/myproject/django          (directory method)
   /home/me/myproject/django.zip      (zipfile method)

5) Run manage.py to start a new application for your code:

   python manage.py startapp myapplication

6) Add your code!


Installing the helper into an existing project
----------------------------------------------

1) Copy the appengine_django application from within the helper into your
   project.

2) Copy app.yaml and main.py from within the helper into your project.

3) Edit the application line in app.yaml to match the name you registered your
   application under in the Admin Console.

4) Add the following two lines to the top of manage.py::

       from appengine_django import InstallAppengineHelperForDjango
       InstallAppengineHelperForDjango()

5) If you have installed the Google App Engine SDK using the Windows or MacOS
   installers provided by Google you may skip this step.

   Create a symlink from the location of the extracted SDK zipfile to the
   '.google_appengine' directory inside your project. E.g:

   ln -s /home/me/google_appengine /home/me/myproject/.google_appengine

   If you like to stay up to date see the 'SDK via SVN' section below for an
   alternative setup.

6) Ensure Django is available within your project as described in Step 4 of the
   instructions for bootstrapping new porjects above.

7) Remove incompatible settings from your settings.py file.

   The helper can warn you about some settings that it knows to be
   incompatible, you can see these warnings by running::

       python manage.py diffsettings

   For the rest you'll just have to experiment by trial and error. The main
   problem here is usually loading middleware that attempts to import modules
   that are banned by the appserver.

8) Port your models and code over to the appengine_django.model.BaseModel
   class.


SDK via SVN
-----------

If you are using SVN to manage your project and you would like to keep up to
date with the latest SDK without having to download and install it regularly
you can use an svn:external to include the SDK in our project.

Once you have commited the basic structure of your project to your repository
change to the base directory and add the following line to the svn:externals
property using svn propset or svn propedit.

.google_appengine http://googleappengine.googlecode.com/svn/trunk/python/

Then run svn update and a copy of the SDK will be installed into the
'.google_appengine' subdirectory. This copy of the SDK will be updated with the
latest changes from the Google Code repository every time you run svn update.


Contributing to the helper
--------------------------

We would be happy to consider any additions or bugfixes that you would like to
add to the helper. Please add them as a patch, in unified diff format to the
Issue Tracker at: http://code.google.com/p/google-app-engine-django/issues/list

Before we can accept your code you will need to have signed the Google
Contributer License. You can find this at:

http://code.google.com/legal/individual-cla-v1.0.html
or
http://code.google.com/legal/corporate-cla-v1.0.html

If you are an Individual contributor you will be able to electronically sign
and submit the form at the URL above. Please ensure that you use the same email
address to submit your patch as you used to sign the CLA.


Reporting Bugs and Requesting Features
--------------------------------------

Please see the KNOWN_ISSUES file and the existing list of issues at
http://code.google.com/p/google-app-engine-django/issues to see if your problem
has already been reported.

If you find a bug or would like to request a feature you may do so at the
Google Code issue tracker for this project:

http://code.google.com/p/google-app-engine-django/issues/entry

google-app-engine-django's People

Watchers

 avatar

google-app-engine-django's Issues

Django helper does not find SDK

What steps will reproduce the problem?
1. Install the App engine SDK
2. Download the Google App Engine Helper for Django
3. Create a project, copy the appengine_django helper into it, start the
test server


What is the expected output? What do you see instead?

I expect it to find the App Engine SDK, but that is not the case, I did NOT
like the suggested workarounds mentioned in the README.


What version of the product are you using? On what operating system?

Mac OS X, initial versions of SDK and google-app-engine-django. 


Please provide any additional information below.

To work around the issue I set in appengine_django/__init__.py the SDK_PATH
to the actual value (/usr/local/google_appengine for my OS)

Original issue reported on code.google.com by rsaccon on 15 Apr 2008 at 1:53

Error serving 404.html template if debug = False in settings.py

What steps will reproduce the problem?
1. create template/404.html
2. set DEBUG = False in settings.py@line 19
3. browse to a page not supported by urls.py 

Should see whatever is contained in the 404.html template, instead get a
"<type 'exceptions.AttributeError'>" error page.

This error is avoided if you override TEMPLATE_CONTEXT_PROCESSORS in
settings.py and comment out 'django.core.context_processors.auth':

TEMPLATE_CONTEXT_PROCESSORS = (
#    'django.core.context_processors.auth',
    'django.core.context_processors.debug',
    'django.core.context_processors.i18n',
#    'django.core.context_processors.request',
)

I don't know what new side effects this change might cause though.

Original issue reported on code.google.com by [email protected] on 13 Apr 2008 at 4:20

Read-only files generated by manage.py startapp

When using the manage.py startapp <name> command the generated files are read 
only:

-r-xr-xr-x   1 alex  alex   0 May  3 11:06 __init__.py
-r-xr-xr-x   1 alex  alex  57 May  3 11:06 models.py
-r-xr-xr-x   1 alex  alex  26 May  3 11:06 views.py



Original issue reported on code.google.com by [email protected] on 3 May 2008 at 8:11

Test Failures on Windows

What steps will reproduce the problem?
1. run "python manage.py test" on standard app-engine-helper

What is the expected output? What do you see instead?
The expected output is all tests completing successfully.

The actual output is 7 failed tests from commands_test.py. All of them fail
with a message stating that "%1 is not a valid win32 application".

What version of the product are you using? On what operating system?
appengine_helper_for_django-r30, Windows XP, python 2.5

Please provide any additional information below.

It appears that out of the box you cannot call subprocess.Popen on a py
file directly. A simple change to add python as the executable will work on
windows:

    child = subprocess.Popen(["python", "./manage.py", command] + args,
stdin=infd,
                             stdout=fd, stderr=fd, cwd=os.getcwdu())

this of course requires that python is also in the path. If this is changed
 then there is still an error with the test "testRunserver(self)" because
os.kill is not implemented in python on Windows. 

Also, testLoadData is defined twice in that file.

Original issue reported on code.google.com by [email protected] on 13 Jun 2008 at 10:28

DeserializedObject's save() method does not save appengine models on 0.97-pre

What steps will reproduce the problem?
1. create some fixtures and load them with testserver
2. attempt to access the data
3. not there

What is the expected output? What do you see instead?

the data you added

Please use labels and text to provide additional information.

the problem appears to be that 0.96 calls

    def save(self, save_m2m=True):
        self.object.save()
        if self.m2m_data and save_m2m:
            for accessor_name, object_list in self.m2m_data.items():
                setattr(self.object, accessor_name, object_list)

while 0.97-pre calls:

    def save(self, save_m2m=True):
        # Call save on the Model baseclass directly. This bypasses any 
        # model-defined save. The save is also forced to be raw.
        # This ensures that the data that is deserialized is literally 
        # what came from the file, not post-processed by pre_save/save
        # methods.
        models.Model.save(self.object, raw=True)
        if self.m2m_data and save_m2m:
            for accessor_name, object_list in self.m2m_data.items():
                setattr(self.object, accessor_name, object_list)

this second approach does not actually save the data (and mysteriously
throws no errors)

a workaround is to have appengine_django.serializer.python use it's own
version of DeserializedObject that overrides save() to use the technique
from 0.96, I'm not sure what other issues arise there though

Original issue reported on code.google.com by andyster on 10 Apr 2008 at 9:24

additional code required to make local copy of django work on appengine

What steps will reproduce the problem?
1. using the existing code upload an app that depends on 0.97-pre, or any
local version of django
2. access your app

What is the expected output? What do you see instead?

expected is the app output, what you get is an error related to loading the
standard appengine django library

Please use labels and text to provide additional information.

the following (from the docs) is necessary to remove the appengine version
of django from the module search path

# Remove the standard version of Django.
for k in [k for k in sys.modules if k.startswith('django')]:
  del sys.modules[k]

Original issue reported on code.google.com by andyster on 11 Apr 2008 at 2:10

python deserializer requires base64 encoded Key instance for pk

generating a base64 of a key that doesn't exist is rather difficult and
poorly portable during development and testing, being able to use just the
"name" part of the key in a fixture is very useful

What version of the product are you using? On what operating system?

svn rev 1


Please provide any additional information below.

by adding a check for failure and falling back on the Key.from_path
function we can let the deserializer build keys from regular strings

diff -abr ./serializer/python.py
/Users/termie/p/fredku/appengine_django/serializer/python.py
77a78
>     try:
78a80,83
>     except datastore_types.datastore_errors.BadKeyError, e:
>       # the string probably wasn't urlencoded, make a key from path
>       key = db.Key.from_path(d['model'], d['pk'])
> 

Original issue reported on code.google.com by andyster on 10 Apr 2008 at 12:47

find GAE SDK path from system(XP) "PATH"

What steps will reproduce the problem?
1. XP os and  GAE installed not in disk c:

What is the expected output? What do you see instead?
bellow code will find the sdk path if added sdk in path
[i for i in os.environ['PATH'].split(";") if i.endswith("google_appengine") ]

What version of the product are you using? On what operating system?
r30

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 12 Jun 2008 at 3:12

Attachments:

Move TEMPLATE_CONTEXT_PROCESSORS to settings.py

What steps will reproduce the problem?

With the current configuration any view that uses RequestContext will fail. 
Example:

    render_to_response('entry.html', {'entry': entry}, RequestContext(request))

because django.core.context_processors.auth is not supported (depends on User 
models). If TEMPLATE_CONTEXT_PROCESSORS is copied from the global_settings.py 
to settings.py with  
django.core.context_processors.auth  disabled, then RequestContext will work 
for the other 
processors (MEDIA_URL, etc)


Original issue reported on code.google.com by [email protected] on 26 Apr 2008 at 2:55

Attachments:

add basic skip_files to app.yaml or README

to skip google_appengine if it is there, the django contrib stuff is less
important though certainly is useful if you've brought in trunk

skip_files: |
 ^(.*/)?(
 (app\.yaml)|
 (app\.yml)|
 (index\.yaml)|
 (index\.yml)|
 (#.*#)|
 (.*~)|
 (.*\.py[co])|
 (.*/RCS/.*)|
 (\..*)|
 (google_appengine.*)|
 (django/test.*)|
 (django/contrib/(?!(contenttypes|__init__)).*)|
 (django/conf/locale.*)|
 (django/bin.*)|
 )$

Original issue reported on code.google.com by andyster on 14 May 2008 at 7:11

Add memcache support

App engine supports memcache now, so should we

Needed to patch sys.modules so that django.middleware.cache.CacheMiddleware
works out of the box

Original issue reported on code.google.com by andyster on 28 May 2008 at 8:05

Attachments:

Replace django mail functions with app engine compatible versions

What steps will reproduce the problem?
1. set APPEND_SLASH=True in settings (this should be default condition)
2. uncomment 'django.middleware.common.CommonMiddleware', line in settings.py
3. go to a url that does not end in a slash, where a slash is required by
your urls.py.  For example go to http://localhost:8080/mypath. 
append_slash should redirect this to http://localhost:8080/mypath/ if
needed.  it does not.

I looked through the code and all django middleware and installed apps are
yanked out.  CommonMiddleware seems to work fine in Google App Engine
except for the mail_manager notification on 404s - i *assume* that is not
consistent with the Google Mail api.  This should be pretty easy to fix (or
even not so horrible a thing to let fail) in favor of nice functionality in
commonmiddleware

Options (assuming email is the reason CommonMiddleware is removed):
1 Force settings.SEND_BROKEN_LINK_EMAILS to be false.
2 Create new implementation of commonmiddleware that doesnt send emails
3 Create new implementation of commonmiddleware that uses Google's email API.

Let me know if this syncs with what y'all know and I can send code for #3.

BTW - I am using django trunk.

Original issue reported on code.google.com by [email protected] on 15 Apr 2008 at 12:18

Doesn't work with newforms-admin branch @r7631

What steps will reproduce the problem?
1. Copy or link a recent checkout (r7631 in my case) into your project
2. Try running ./manage.py shell
3. Get errors and traceback.

What is the expected output? What do you see instead?
Expecting python shell, get errors and traceback:

Traceback (most recent call last):
  File "./manage.py", line 18, in <module>
    InstallAppengineHelperForDjango()
  File "/Users/brooks/Django/google-app-engine-django/appengine_django/__init__.py", line 
373, in InstallAppengineHelperForDjango
    InstallAuthentication()
  File "/Users/brooks/Django/google-app-engine-django/appengine_django/__init__.py", line 
394, in InstallAuthentication
    from django.contrib.auth import models
  File "/Users/brooks/Django/google-app-engine-django/django/contrib/auth/models.py", line 
376, in <module>
    from django.contrib.auth import admin
  File "/Users/brooks/Django/google-app-engine-django/django/contrib/auth/admin.py", line 
1, in <module>
    from django.contrib.auth.forms import UserCreationForm
  File "/Users/brooks/Django/google-app-engine-django/django/contrib/auth/forms.py", line 
9, in <module>
    class UserCreationForm(forms.ModelForm):
  File "/Users/brooks/Django/google-app-engine-django/django/newforms/models.py", line 
237, in __new__
    opts.exclude, formfield_callback)
  File "/Users/brooks/Django/google-app-engine-django/django/newforms/models.py", line 
199, in fields_for_model
    if not f.editable:
AttributeError: 'StringProperty' object has no attribute 'editable'

What version of the product are you using? On what operating system?
r30 of google-app-engine-django, Mac OS X, 10.5.3


Original issue reported on code.google.com by [email protected] on 14 Jun 2008 at 1:59

Serializing Expando Models

There is already a great feature in BaseModel that exists that lets django
use the Model class and serialize the data.  Is there any way the Expando
Model could be featured and integrated with django as well?

Original issue reported on code.google.com by [email protected] on 1 Jun 2008 at 4:56

translation of the introductory article

I'm sorry if here is a wrong place to post.

I have a plan to translate the following introductory article into Japanese
language.
http://code.google.com/appengine/articles/appengine_helper_for_django.html

Is there any problem for me to make it public?

Original issue reported on code.google.com by [email protected] on 12 Jun 2008 at 6:56

Template doesn't exist error, but works properly in SDK

What steps will reproduce the problem?
1. Map a static directory named "templates" in app.yaml
2. Create a "base.html" django template and an html file that extends it
using this line: {% extends "templates/base.html" %}
3. Test in SDK, it will work. 
4. Deploy using app launcher
5. Attempt to view at appspot will display following error:
TemplateSyntaxError: Template 'templates/base.html' cannot be extended,
because it doesn't exist 


What is the expected output? What do you see instead?
It renders fine in the SDK, throws error once deployed.

What version of the product are you using? On what operating system?
Using App Launcher V. 1.1.0, on Mac OS X Leopard

Please provide any additional information below.
It seems that the SDK is not accurately simulating conditions of the
deployed application. 

Original issue reported on code.google.com by [email protected] on 4 Jun 2008 at 7:39

Prohibited from uploading app with this framework + current Django release : too many files

What steps will reproduce the problem?
1. Build an app using this framework
2. Include a current copy of django svn trunk
3. attempt to upload the app to GAE

What is the expected output? What do you see instead?
App should be loaded to GAE and able to run.

Applications are apparently restricted from uploading more than 1000 files.  A 
copy of the django 
python module contains 2100 files by itself.  Therefore it is not possible 
(please prove me wrong 
as I am a Python (though not web dev) noob) to upload an app with up-to-date 
django following 
the instructions in this package.  See the output below:

Please provide any additional information below.

~/src/git\ > appcfg.py update lcd-google
Loaded authentication cookies from /Users/glenn/.appcfg_cookies
Scanning files on local disk.
Scanned 500 files.
Scanned 1000 files.
Scanned 1500 files.
Scanned 2000 files.
Scanned 2500 files.
Scanned 3000 files.
Scanned 3500 files.
Scanned 4000 files.
Scanned 4500 files.
Initiating update.
Email: glenn.rempe
Password for glenn.rempe: 
Saving authentication cookies to /Users/glenn/.appcfg_cookies
Could not guess mimetype for static/images/README.  Using 
application/octet-stream.
Cloning 3 static files.
Cloning 3014 application files.
Cloned 100 files.
Cloned 200 files.
Cloned 300 files.
Cloned 400 files.
Cloned 500 files.
Cloned 600 files.
Cloned 700 files.
Cloned 800 files.
Cloned 900 files.
Cloned 1000 files.
Cloned 1100 files.
Cloned 1200 files.
Cloned 1300 files.
Cloned 1400 files.
Cloned 1500 files.
Cloned 1600 files.
Cloned 1700 files.
Cloned 1800 files.
Cloned 1900 files.
Cloned 2000 files.
Cloned 2100 files.
Cloned 2200 files.
Cloned 2300 files.
Cloned 2400 files.
Cloned 2500 files.
Cloned 2600 files.
Cloned 2700 files.
Cloned 2800 files.
Cloned 2900 files.
Cloned 3000 files.
Uploading 194 files.
2008-04-11 23:06:15,380 ERROR appcfg.py:1070 An unexpected error occurred. 
Aborting. 
Rolling back the update.
Error 400: --- begin server output ---
Max number of files and blobs is 1000.
--- end server output ---


JUST THE MODULE DIR FROM DJANGO TRUNK IS 2100 files:

~/src/git/lcd-google/django (master)\ > ls -laR | wc -l
    2100

 Thanks.

Original issue reported on code.google.com by [email protected] on 12 Apr 2008 at 6:15

Client.get() returns HttpResponse object instead of special Response object promised in Django docs

I'm writing some doctests for Rietveld.  I figured I'd just try stuff from
the Django testing docs.  They have a nify Client class that lets you make
requests to your app (without involving HTTP).  They promise that it will
return specially enhanced Response objects.  So I expected that this would
work:

>>> resp = c.get('/mine')
>>> resp.status_code
302
>>> resp.headers['location']
('Location',
'http://testserver/_ah/login?continue=http%3A//DjangoPants%3A8080/mine')

However I get a complaint that the object doesn't have a headers attribute;
I end up using _headers instead.  Are you guys perchance monkeypatching the
Client class in a way that could explain this? Or should I complain to the
Django folks? I'm using Django 0.97.pre and reading the docs for that version.

Original issue reported on code.google.com by [email protected] on 9 May 2008 at 12:38

Serializing Data

What steps will reproduce the problem?
1. Putting in code on a page:
from django.core import serializers
data = serializers.serialize("xml", SomeModel.objects.all())  

What is the expected output? What do you see instead?
serialized data of object model. Instead I see error type object
'SomeModel' has no attribute 'objects'

What version of the product are you using? On what operating system?
version 24

Please provide any additional information below.
I'm not sure this is the correct platform for this, but is there any way
someone could post up a tutorial on how to serialize data to and from json
and xml? It would be very helpful to see how it is used with app engine

Original issue reported on code.google.com by [email protected] on 16 May 2008 at 1:29

Add svn:external for google_appengine

Seems fairly useful in saving people a step, might be redundant if they
have it installed already

( svn co http://googleappengine.googlecode.com/svn/trunk/ google_appengine )

Original issue reported on code.google.com by andyster on 13 May 2008 at 1:13

Error was: 'module' object has no attribute 'BaseModel'

What steps will reproduce the problem?
1. I setup the environment on the Mac like it is supposed to be
2. I create models and views and do url matching
3. My models are created like on the Google App Engine Introductory
tutorial
(http://code.google.com/appengine/docs/gettingstarted/usingdatastore.html)
4. I import the models into my views and request the web page

What is the expected output? What do you see instead?

I expect the model to import. Instead I get the following error:

Exception Value: Tried index in module cms.views. Error was: 'module'
object has no attribute 'BaseModel'



What version of the product are you using? On what operating system?
version: r30
OS: Mac 10.5

Please provide any additional information below.
Taceback:

Traceback (most recent call last):
File
"/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-de
fault.bundle/Contents/Resources/google_appengine/lib/django/django/core/handlers
/base.py"
in get_response
  68. callback, callback_args, callback_kwargs = resolver.resolve(request.path)
File
"/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-de
fault.bundle/Contents/Resources/google_appengine/lib/django/django/core/urlresol
vers.py"
in resolve
  162. sub_match = pattern.resolve(new_path)
File
"/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-de
fault.bundle/Contents/Resources/google_appengine/lib/django/django/core/urlresol
vers.py"
in resolve
  118. return self.callback, args, kwargs
File
"/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-de
fault.bundle/Contents/Resources/google_appengine/lib/django/django/core/urlresol
vers.py"
in _get_callback
  129. raise ViewDoesNotExist, "Tried %s in module %s. Error was: %s" %
(func_name, mod_name, str(e))

  ViewDoesNotExist at /
  Tried index in module cms.views. Error was: 'module' object has no
attribute 'BaseModel'

Original issue reported on code.google.com by [email protected] on 15 Jun 2008 at 7:35

win32api package is required on windows (but not documented)

What steps will reproduce the problem?
1. Install Google App Engine for Windows XP
2. Copy helper application to a folder
3. run manage.py runserver

What is the expected output? What do you see instead?
The Google App Engine SDK could not be found!
See README for installation instructions.

What version of the product are you using? On what operating system?
app engine 1.0.2
django helper R30


Original issue reported on code.google.com by [email protected] on 21 May 2008 at 4:27

Uploading files not working with django plugin

When submitting a form with enctype="multipart/form-data", the form fields
are not properly parsed before sending to the django view method.

What steps will reproduce the problem?
1. create a form with enctype="multipart/form-data"
2. map the form using django urls
3. try and get data from the form in the view via the request.POST[] or
request.FILES[] maps.  All data will be empty.

Using django trunk.

Did some digging, but not sure if the problem is on the app engine or
django side.  File uploads work fine when working solely with the Google
webapp framework.

Original issue reported on code.google.com by [email protected] on 18 Apr 2008 at 7:02

manage.py improvements

Support for:

* Toggling debug off when publishing and on when running development server
* Minifying Javascript/CSS when publishing


Original issue reported on code.google.com by [email protected] on 15 Apr 2008 at 1:34

Attachments:

testserver only accepts one fixture argument

What steps will reproduce the problem?
1. python manage.py testserver fixture1 fixture2

What is the expected output? What do you see instead?

loads two sets of fixtures


What version of the product are you using? On what operating system?

svn rev 1

Please provide any additional information below.

just needs to pass the fixtures as arguments not as a string to loaddata
command

diff -abr ./management/commands/testserver.py
/Users/termie/p/fredku/appengine_django/management/commands/testserver.py
46c46
<       call_command('loaddata', ' '.join(fixtures))

---
>       call_command('loaddata', *fixtures)

Original issue reported on code.google.com by andyster on 10 Apr 2008 at 12:45

Typo in KNOWN_ISSUES

"Choosen" should be "chosen" -- simple fix.

Index: KNOWN_ISSUES
===================================================================
--- KNOWN_ISSUES    (revision 12)
+++ KNOWN_ISSUES    (working copy)
@@ -2,7 +2,7 @@
 =========================================================

 * Support for the skip_files option in app.yaml is not working in the current
-  SDK release. This means that if you have choosen to put a copy of the Google
+  SDK release. This means that if you have chosen to put a copy of the Google
   App Engine SDK inside your project at google_appengine/ you will need to
   remove it before running appcfg.py or you will upload the entire SDK to your
   account, taking up more of your file quota than is necessary.

Original issue reported on code.google.com by [email protected] on 21 Apr 2008 at 4:57

appcfg authentication cookies do not support multiple appengine accounts

What steps will reproduce the problem?
1. Create a project using one appengine account (e.g. [email protected])
2. appcfg update . (and enter your username and password so that it is
saved in .appcfg_cookies)
3. Create another project using a different appengine account (e.g.,
[email protected])
4. appcfg update . (in the new project) 

What is the expected output? What do you see instead?

It should ask me for my email address and password and store those separately.

Instead I get:

Loaded authentication cookies from /Users/aral/.appcfg_cookies
...
Error 403: --- begin server output ---
You do not have permission to modify this app.

The workaround, when you have more than one appengine account, is to use
--no-cookies for one of them and always enter your username and password.

What version of the product are you using? On what operating system?

SDK 1.1.0 running on OS X Tiger.

Original issue reported on code.google.com by [email protected] on 16 Jun 2008 at 12:50

User Objects


I using the app engine helper with GAE and Django.  For my app, I need to
authenticate users.  

So when a user is logged in...

Should request.user == users.get_current_user() ?

What is the difference?  In my app, they are not ==  (Although you can get
the same display result using either command).  Also, I only can create an
UserReference instance via users.get_current_user().  







Original issue reported on code.google.com by [email protected] on 10 Jun 2008 at 8:39

Saving a form with commit=False validates for required fields, but should not

What steps will reproduce the problem?
1. Create a model with a required field and use the 'exclude' directive in
a Model form to exclude that field
2. Create a bound form object from the post data from that form
3. Call save(commit=False) on the form object (with the intention of
assigning a value to the required field later before saving)

What is the expected output? What do you see instead?

There is an exception because the required field is not present.

The form should not be validated with commit=False.

See the note near the bottom of this page:
http://www.djangoproject.com/documentation/modelforms/

If you specify fields or exclude when creating a form with ModelForm, then
the fields that are not in the resulting form will not be set by the formโ€™s
save() method. Django will prevent any attempt to save an incomplete model,
so if the model does not allow the missing fields to be empty, and does not
provide a default value for the missing fields, any attempt to save() a
ModelForm with missing fields will fail. To avoid this failure, you must
instantiate your model with initial values for the missing, but required
fields, or use save(commit=False) and manually set any extra required fields...



What version of the product are you using? On what operating system?

r30

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 19 Jun 2008 at 3:03

django on appengine flatpages

Hi there,

sorry this is all pretty new to me. So maybe this is just an 
misunderstanding on my side. Here is what I want to do.

+ I use Django with Google AppEngine
+ I want to use Django flatpages to display static content
+ In my site setup I inherit from flatpages admin form and add TinyMCE to 
edit content (this works with Django)

As far as I understand in AppEngine the admin pages are different (only a 
subset is available). Are flatpages available at AppEngine-Django? How do 
I add the TinyMCE to the admin form?

Best regards,
Mark Fink



Original issue reported on code.google.com by [email protected] on 9 Jun 2008 at 12:55

Manage.py test on Windows produces failures

What steps will reproduce the problem?
1. run python manage.py test
2. runs 53 tests: get 7 errors
3.

What is the expected output? What do you see instead?
Expect the tests to succeed...

What version of the product are you using? On what operating system?
Version of Django Helper downloaded yesterday (31 May); version of Django
downloaded yesterday from svn trunk; python 2.5.2 (reinstalled it yesterday).


Please provide any additional information below.

The installation process was actually quite a hassle.  The Google SDK was
installed using the msi installer.  I had Python previously installed.  I
downloaded the Helper and tried to run manage.py.  It could not import
YAML, so I had to find it in the google sdk, and run the setup.  It could
not find webob, so I had to add a python path variable.  Finally got it to
work (more or less).

Decided to run manage.py test and got the following output.  So far I've
only created a small 'hello world' app - so I don't know if the test result
indicates problems with my environment or just issues with Windows
compatibility (or with the SDK installer).


Original issue reported on code.google.com by [email protected] on 31 May 2008 at 3:11

Attachments:

Generic Views of Objects not working

What steps will reproduce the problem?
1. With Publisher acting as base model, enter this code in url conf

from django.conf.urls.defaults import *
from django.views.generic import list_detail
from mysite.books.models import Publisher

publisher_info = {
    "queryset" : Publisher.all(),
}

urlpatterns = patterns('',
    (r'^publishers/$', list_detail.object_list, publisher_info)
)



2. When you hit the page based on the Generic Views of Objects on django's
chapter 9 book, you get an error 

'Query' object has no attribute '_clone'


What is the expected output? What do you see instead?
To output the content into an html page

What version of the product are you using? On what operating system?
Latest version on XP

Original issue reported on code.google.com by [email protected] on 13 Jun 2008 at 2:14

How to setup Google App Engine on a Mac

Under Accessing the Google App Engine SDK

It says "On Linux or Mac OS you can use a command like the following..."

I cannot determine what the  /path/to/google_appengine replacement text
should be. 

Google provides a GoogleAppEngineInstaller that installs an application. 

How do I setup the Mac so I can use the terminal to run the commands you
instruct should be run?

Original issue reported on code.google.com by [email protected] on 11 Jun 2008 at 3:09

deleting auth from django trunk raises error

What steps will reproduce the problem?
1. located django trunk and removed auth, admin and databrowse dirs as 
mentioned in the docs.
2. changed the main.py according to docs.
3. tried to runserver

What is the expected output? What do you see instead?
[~/pys/fones]>python2.5 manage.py runserver
WARNING:root:Could not read datastore data from /home/sleytr/pys/fones/
django_google-app-engine-django.datastore
WARNING:root:Could not read datastore data from /home/sleytr/pys/fones/
django_google-app-engine-django.datastore.history
WARNING:root:Could not initialize images API; you are likely missing the 
Python "PIL" module. ImportError: No module named PIL
WARNING:root:Middleware module 
'django.contrib.sessions.middleware.SessionMiddleware' is not compatible. 
Removed!
WARNING:root:Application module 'django.contrib.sessions' is not 
compatible. Removed!
Traceback (most recent call last):
  File "manage.py", line 18, in <module>
    InstallAppengineHelperForDjango()
  File "/home/sleytr/pys/fones/appengine_django/__init__.py", line 373, in 
InstallAppengineHelperForDjango
    InstallAuthentication()
  File "/home/sleytr/pys/fones/appengine_django/__init__.py", line 394, in 
InstallAuthentication
    from django.contrib.auth import models
ImportError: No module named auth
[sleytr@slpardus][02:06:20]
[~/pys/fones]>python2.5 manage.py diffsettings
WARNING:root:Could not read datastore data from /home/sleytr/pys/fones/
django_google-app-engine-django.datastore
WARNING:root:Could not read datastore data from /home/sleytr/pys/fones/
django_google-app-engine-django.datastore.history
WARNING:root:Could not initialize images API; you are likely missing the 
Python "PIL" module. ImportError: No module named PIL
WARNING:root:Middleware module 
'django.contrib.sessions.middleware.SessionMiddleware' is not compatible. 
Removed!
WARNING:root:Application module 'django.contrib.sessions' is not 
compatible. Removed!
Traceback (most recent call last):
  File "manage.py", line 18, in <module>
    InstallAppengineHelperForDjango()
  File "/home/sleytr/pys/fones/appengine_django/__init__.py", line 373, in 
InstallAppengineHelperForDjango
    InstallAuthentication()
  File "/home/sleytr/pys/fones/appengine_django/__init__.py", line 394, in 
InstallAuthentication
    from django.contrib.auth import models
ImportError: No module named auth

What version of the product are you using? On what operating system?
r30, Linux 


Original issue reported on code.google.com by [email protected] on 30 May 2008 at 11:24

Having django in site-packages breaks stuff

I tried the first steps of the tutorial and ran into a lot of trouble;
basically, I got a big bad traceback saying django could not be imported
when I sent my first request to localhost:8080 -- even though the initial
bootstrap of manage.py successfully imported it!  (I used the technique of
linking the SDK to mysite/google_appengine.)

It turned out that this was due to my having a copy of django in the
site-packages directory of the Python version I was using (2.5).  Clearing
out site-packages made the problem go away.  You may want to mention this
caveat somewhere in your README or in the article.

(Also, the article skips the step of linking the SDK.  Without this nothing
works...)

Original issue reported on code.google.com by [email protected] on 7 May 2008 at 7:34

cached methods sometimes lose global variables after exceptions are thrown

cached methods sometimes lose global variables after exceptions are thrown 

this is evident when using django because it's routing function caches the
method object after the first lookup, when that method reports an exception
the behavior of the dev_appserver (and production) appears to be to clean
up the imported modules; however, since the reference to the function
object still remains but modules whose contents it referenced have since
been garbage collected, the next call to that function will have all its
global variables set to None

Original issue reported on code.google.com by andyster on 3 Jun 2008 at 9:20

Attachments:

Missing __eq__ in BaseModel

The comparsion functions __eq__ and __ne__ are missing in BaseModel.
Without these comparsions the templatetags {% ifequal ... %} anf {%
ifnotequal ... %} won't work.

The attached patch simply re-implements Django's Model.__eq__ and
Model.__ne__ for BaseModel using the already implemented _get_pk_val() method.

Alternatively the comparsions could be implemented in
google.appengine.ext.db.Model, but I'm not sure if this is the expected
behavior for db.Model instances - for using BaseModel with Django templates
these functions are required.

Original issue reported on code.google.com by albrecht.andi on 13 May 2008 at 10:41

Attachments:

appcfg.py integration

Please use labels and text to provide additional information.

Integration with the appcfg commands, just a shortcut so you can do things
like python manage.py update

We may want to change the command names, if that is the case the args will
have to be munged a bit, namely whatever the name of the command we use is
it will have to be replaced by the name of the appcfg.py command so that
its parser works properly.

Patch attached.

Original issue reported on code.google.com by andyster on 15 Apr 2008 at 12:37

Attachments:

does not play nicely with the unzipped google_appengine.zip

now, i have perhaps a less usual setup for my app as I had to touch
manage.py to get my environment running as I am running from the unzipped
google_appengine rather than some sort of "installed" version

in my manage.py I've added

sys.path.insert(1, "google_appengine")

and in my project's root dir I have the unzipped directory of the SDK

without this addition running `python manage.py` throws:

Traceback (most recent call last):
  File "manage.py", line 17, in <module>
    from appengine_django import InstallAppengineDjango
  File "/Users/termie/p/fredku/appengine_django/__init__.py", line 32, in
<module>
    from google.appengine.api import apiproxy_stub_map
ImportError: No module named google.appengine.api

dropping the google directory from the sdk produces errors once runserver
is called

INFO:root:Loading the appengine Django integration module...
WARNING:root:Could not read datastore data from
/var/folders/zz/zzzivhrRnAmviuee++2A2E+-1-2/-Tmp-/django_djangopants.datastore.h
istory
INFO:root:Successfully loaded the appengine Django integration module.
WARNING:root:Could not read datastore data from
/var/folders/zz/zzzivhrRnAmviuee++2A2E+-1-2/-Tmp-/django_djangopants.datastore.h
istory
ERROR:root:Could not read template files from /Users/termie/p/fredku/templates
Traceback (most recent call last):
  File "manage.py", line 21, in <module>
    execute_manager(settings)
  File "/Users/termie/p/fredku/django/core/management/__init__.py", line
272, in execute_manager
    utility.execute()
  File "/Users/termie/p/fredku/django/core/management/__init__.py", line
219, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File
"/Users/termie/p/fredku/appengine_django/management/commands/runserver.py",
line 80, in run_from_argv
    start_dev_appserver()
  File
"/Users/termie/p/fredku/appengine_django/management/commands/runserver.py",
line 51, in start_dev_appserver
    dev_appserver_main.main([progname] + args + [os.getcwdu()])
  File "google_appengine/google/appengine/tools/dev_appserver_main.py",
line 317, in main
    require_indexes=require_indexes)
  File "google_appengine/google/appengine/tools/dev_appserver.py", line
2581, in CreateServer
    SetupTemplates(template_dir)
  File "google_appengine/google/appengine/tools/dev_appserver.py", line
2545, in SetupTemplates
    header = open(os.path.join(template_dir, HEADER_TEMPLATE)).read()
IOError: [Errno 2] No such file or directory:
'/Users/termie/p/fredku/templates/logging_console_header.html'

using the above described workaround i get most of the way through things,
however when I try to go to the admin

http://localhost:8080/_ah/admin

I get an error attempting to import google.appengine.ext.admin

PATH google_appengine/google/appengine/ext/admin
ERROR:root:Encountered error loading module "google.appengine.ext.admin":
<type 'exceptions.ImportError'>: Could not find module
google.appengine.ext.admin
WARNING:root:Missing package initialization files:
google_appengine/google/appengine/ext/admin/__init__.py,
/Users/termie/Desktop/dev_appserver/google/appengine/ext/google_appengine/google
/appengine/ext/__init__.py,
/Users/termie/Desktop/dev_appserver/google/appengine/ext/google_appengine/google
/appengine/__init__.py,
/Users/termie/Desktop/dev_appserver/google/appengine/ext/google_appengine/google
/__init__.py
ERROR:root:Exception encountered handling request
Traceback (most recent call last):
  File "google_appengine/google/appengine/tools/dev_appserver.py", line
2246, in _HandleRequest
    base_env_dict=env_dict)
  File "google_appengine/google/appengine/tools/dev_appserver.py", line
334, in Dispatch
    base_env_dict=base_env_dict)
  File "google_appengine/google/appengine/tools/dev_appserver.py", line
1743, in Dispatch
    self._module_dict)
  File "google_appengine/google/appengine/tools/dev_appserver.py", line
1654, in ExecuteCGI
    reset_modules = exec_script(handler_path, cgi_path, hook)
  File "google_appengine/google/appengine/tools/dev_appserver.py", line
1550, in ExecuteOrImportScript
    handler_path, cgi_path, import_hook)
  File "google_appengine/google/appengine/tools/dev_appserver.py", line
1479, in LoadTargetModule
    module_code = import_hook.get_code(module_fullname)
  File "google_appengine/google/appengine/tools/dev_appserver.py", line
806, in decorate
    return func(self, *args, **kwargs)
  File "google_appengine/google/appengine/tools/dev_appserver.py", line
1350, in get_code
    full_path, search_path, submodule = self.GetModuleInfo(fullname)
  File "google_appengine/google/appengine/tools/dev_appserver.py", line
806, in decorate
    return func(self, *args, **kwargs)
  File "google_appengine/google/appengine/tools/dev_appserver.py", line
1304, in GetModuleInfo
    submodule, search_path = self.GetParentSearchPath(fullname)
  File "google_appengine/google/appengine/tools/dev_appserver.py", line
806, in decorate
    return func(self, *args, **kwargs)
  File "google_appengine/google/appengine/tools/dev_appserver.py", line
1284, in GetParentSearchPath
    parent_package = self.GetParentPackage(fullname)
  File "google_appengine/google/appengine/tools/dev_appserver.py", line
806, in decorate
    return func(self, *args, **kwargs)
  File "google_appengine/google/appengine/tools/dev_appserver.py", line
1261, in GetParentPackage
    raise ImportError('Could not find module %s' % fullname)
ImportError: Could not find module google.appengine.ext.admin
INFO:root:"GET /_ah/admin HTTP/1.1" 500 -

--


I am still digging through the code to find the root of this, the dev
server in general appears not to totally respect the sys.path for its imports 

the somehow related bits from google.appengine.tools.dev_appserver

  url_matcher.AddURL('/_ah/admin(?:/.*)?',
                     admin_dispatcher,
                     DEVEL_CONSOLE_PATH,
                     False,
                     False)


PYTHON_LIB_VAR = '$PYTHON_LIB'
DEVEL_CONSOLE_PATH = PYTHON_LIB_VAR + '/google/appengine/ext/admin'

the PathAdjuster will later on replace "$PYTHON_LIB" with google_appengine
in my case (the root of the SDK)

any attempts to poke that variable lead to failure as the path will be
taken as a literal import path


Original issue reported on code.google.com by andyster on 10 Apr 2008 at 2:14

README is not valid reStructuredText

What steps will reproduce the problem?
1. run the command rst2html.py README > README.html

What is the expected output? What do you see instead?

it generates but with the following errors and warnings:

README:23: (ERROR/3) Unexpected indentation.
README:24: (WARNING/2) Block quote ends without a blank line; unexpected
unindent.
README:26: (WARNING/2) Enumerated list ends without a blank line;
unexpected unindent.
README:102: (ERROR/3) Unexpected indentation.


What version of the product are you using? On what operating system?

revision 13

Please provide any additional information below.

Attached is a patch to fix the errors

Original issue reported on code.google.com by kumar.mcmillan on 24 Apr 2008 at 3:42

Attachments:

Delegating URLs broken in most recent version

I just upgraded to the r30 version and chaining urls.py files using include() 
seems broken.  I'm 
not sure what version I was running previously, where this worked (I can't find 
a version # in any 
of the django helper files).

Here's my top-level urls.py:
urlpatterns = patterns('',
  (r'^island/', include('island.urls')),
)

and then the urls.py inside the island directory:
urlpatterns = patterns('',
  (r'^$',                  views.Index),
  (r'^create$',            views.CreateIsland),
  (r'^(\d+)$',             views.ShowIsland),
  (r'^(\d+)/(\d+)x(\d+)$', views.BulldozeSquare),
)

And the error message:
Using the URLconf defined in urls, Django tried these URL patterns, in this 
order:
^island/ ^$
^island/ ^create$
^island/ ^(\d+)$
^island/ ^(\d+)/(\d+)x(\d+)$
^$
^index.html$
The current URL, /island/create/, didn't match any of these.



It looks like it is doing a weird thing where it is concatenating the two 
patterns, poorly.  Was this 
an expected change?  I looked in CHANGES but didn't see anything that makes me 
think this was 
intentional.  

Original issue reported on code.google.com by [email protected] on 6 Jun 2008 at 4:46

helper does not work when run within Google App Engine Launcher

What steps will reproduce the problem?
1. On mac osx, install
http://googleappengine.googlecode.com/files/GoogleAppEngineLauncher-1.1.0.dmg.
From a new terminal, verify that dev_appserver.py command is available in
the path.
2. Download
http://google-app-engine-django.googlecode.com/files/appengine_helper_for_django
-r30.zip
and unzip. Go to the extracted directory. 
3. Run "python manage.py runserver"

What is the expected output? What do you see instead?
The above steps are according to article at
http://code.google.com/appengine/articles/appengine_helper_for_django.html

It is supposed to run the server.

But instead it says:
[vinay@osx-zen appengine_helper_for_django]$ python manage.py runserver
The Google App Engine SDK could not be found!
See README for installation instructions.


What version of the product are you using? On what operating system?
[vinay@osx-zen appengine_helper_for_django]$ cat VERSION 
VERSION=30
TIMESTAMP=1211291553

On Mac OSX 10.5.3

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 31 May 2008 at 7:36

Small bug in BaseModelForm

What steps will reproduce the problem?
1. try to initialize djangoforms.BaseModelForm with existing model instance

What is the expected output? What do you see instead?
The data attribute in the dictionary for forms.BaseModel should be set
with object_data - but that never happens.

Please provide any additional information below.
Just fix the line in the BaseModelForm constructor
    kwargs = dict(data=data ...
with
    kwargs = dict(data=object_data ...

Original issue reported on code.google.com by [email protected] on 12 Jun 2008 at 8:55

App Engine Django Helper does not work

What steps will reproduce the problem?
1. Copy the django helper
2. copy google_appengine to the directory (windows environment)
3. run manage.py runserver as stated in article

What is the expected output? What do you see instead?
WARNING:root:Could not read datastore data from c:
\docume~1\admini~1\config~1\te
mp\django_google-app-engine-django.datastore
WARNING:root:Could not read datastore data from c:
\docume~1\admini~1\config~1\te
mp\django_google-app-engine-django.datastore.history
WARNING:root:Could not initialize images API; you are likely missing the 
Python
"PIL" module. ImportError: No module named PIL
INFO:root:Server: appengine.google.com
INFO:root:Checking for updates to the SDK.
INFO:root:The SDK is up to date.
WARNING:root:Could not read datastore data from c:
\docume~1\admini~1\config~1\te
mp\django_google-app-engine-django.datastore
WARNING:root:Could not read datastore data from c:
\docume~1\admini~1\config~1\te
mp\django_google-app-engine-django.datastore.history
WARNING:root:Could not initialize images API; you are likely missing the 
Python
"PIL" module. ImportError: No module named PIL
INFO:root:Running application google-app-engine-django on port 8080: 
http://loca
lhost:8080


What version of the product are you using? On what operating system?
google appengine SDK 1.1 on windows 2000

Please provide any additional information below.
I followed the instructions from the article.
The page loads on the browser but I get all those warnings!

Original issue reported on code.google.com by yamandu.costa on 14 Jun 2008 at 10:40

Revision 26 breaks django as a 'app' in project subdirectory

From KNOWN_ISSUES:

"To use a local copy of Django you can place it in the 'django' subdirectory
  of your project."

This works with revision 25 but not with revision 26.

Using r26, I still get django 0.96 (my local copy is the latest django svn)

Original issue reported on code.google.com by [email protected] on 20 May 2008 at 3:23

Interactive Console of App Engine Admin Interface does not Work when importing models

What steps will reproduce the problem?
1. followed the tutorial at
http://code.google.com/appengine/articles/appengine_helper_for_django.html
2. entered `from motivator.models import Poll` in the textarea at
http://localhost:8080/_ah/admin/interactive

What is the expected output? What do you see instead?
Traceback (most recent call last):
  File "D:\Google\google_appengine\google\appengine\ext\admin\__init__.py",
line 179, in post
    exec(compiled_code, globals())
  File "<string>", line 1, in <module>
  File
"D:\Google\google_appengine\google\appengine\tools\dev_appserver.py", line
815, in decorate
    return func(self, *args, **kwargs)
  File
"D:\Google\google_appengine\google\appengine\tools\dev_appserver.py", line
1335, in load_module
    return self.FindAndLoadModule(submodule, fullname, search_path)
  File
"D:\Google\google_appengine\google\appengine\tools\dev_appserver.py", line
815, in decorate
    return func(self, *args, **kwargs)
  File
"D:\Google\google_appengine\google\appengine\tools\dev_appserver.py", line
1244, in FindAndLoadModule
    description)
  File
"D:\Google\google_appengine\google\appengine\tools\dev_appserver.py", line
815, in decorate
    return func(self, *args, **kwargs)
  File
"D:\Google\google_appengine\google\appengine\tools\dev_appserver.py", line
1194, in LoadModuleRestricted
    description)
  File "C:\Users\till\workspace\motivator\src\motivator\models.py", line 3,
in <module>
    from appengine_django.models import BaseModel
  File
"D:\Google\google_appengine\google\appengine\tools\dev_appserver.py", line
815, in decorate
    return func(self, *args, **kwargs)
  File
"D:\Google\google_appengine\google\appengine\tools\dev_appserver.py", line
1335, in load_module
    return self.FindAndLoadModule(submodule, fullname, search_path)
  File
"D:\Google\google_appengine\google\appengine\tools\dev_appserver.py", line
815, in decorate
    return func(self, *args, **kwargs)
  File
"D:\Google\google_appengine\google\appengine\tools\dev_appserver.py", line
1244, in FindAndLoadModule
    description)
  File
"D:\Google\google_appengine\google\appengine\tools\dev_appserver.py", line
815, in decorate
    return func(self, *args, **kwargs)
  File
"D:\Google\google_appengine\google\appengine\tools\dev_appserver.py", line
1194, in LoadModuleRestricted
    description)
  File "C:\Users\till\workspace\motivator\src\appengine_django\models.py",
line 23, in <module>
    from django.db.models.fields import Field
  File
"D:\Google\google_appengine\google\appengine\tools\dev_appserver.py", line
815, in decorate
    return func(self, *args, **kwargs)
  File
"D:\Google\google_appengine\google\appengine\tools\dev_appserver.py", line
1335, in load_module
    return self.FindAndLoadModule(submodule, fullname, search_path)
  File
"D:\Google\google_appengine\google\appengine\tools\dev_appserver.py", line
815, in decorate
    return func(self, *args, **kwargs)
  File
"D:\Google\google_appengine\google\appengine\tools\dev_appserver.py", line
1244, in FindAndLoadModule
    description)
  File
"D:\Google\google_appengine\google\appengine\tools\dev_appserver.py", line
815, in decorate
    return func(self, *args, **kwargs)
  File
"D:\Google\google_appengine\google\appengine\tools\dev_appserver.py", line
1194, in LoadModuleRestricted
    description)
  File "C:\Users\till\workspace\motivator\src\django\db\__init__.py", line
10, in <module>
    if not settings.DATABASE_ENGINE:
  File "C:\Users\till\workspace\motivator\src\django\conf\__init__.py",
line 28, in __getattr__
    self._import_settings()
  File "C:\Users\till\workspace\motivator\src\django\conf\__init__.py",
line 57, in _import_settings
    raise ImportError("Settings cannot be imported, because environment
variable %s is undefined." % ENVIRONMENT_VARIABLE)
ImportError: Settings cannot be imported, because environment variable
DJANGO_SETTINGS_MODULE is undefined.


What version of the product are you using? On what operating system?
r30, windows vista 

Original issue reported on code.google.com by [email protected] on 25 May 2008 at 8:23

enhancement, adapt the gift list example to the helper

this is my first django app, I don't know whether to use the django helper
or just modify the gift list till it suits me, but that doesn't seem like a
good idea. base the tutorial on that because my views aren't importing from
google.appengine.ext

Original issue reported on code.google.com by [email protected] on 9 Jun 2008 at 3:13

Helper does not load Django development if present

What steps will reproduce the problem?
1. install django under app/django
2. try to use development features
3. FAIL

What is the expected output? What do you see instead?
Helper checks for PARENT_DIR/django, but does not add PARENT_DIR/django to
sys.PATH


What version of the product are you using? On what operating system?
SDK 1.1.0, Helper r30, OSX


Please provide any additional information below.

This works:
# Remove the standard version of Django if a local copy has been provided.
if os.path.exists(os.path.join(PARENT_DIR, 'django')):
  sys.stderr.write("Found local version of Django!\n")   
  sys.path = [os.path.join(PARENT_DIR, 'django')] + sys.path
  for k in [k for k in sys.modules if k.startswith('django')]:
    del sys.modules[k]  


Original issue reported on code.google.com by [email protected] on 10 Jun 2008 at 6:50

Google's Users API Integration

I have written some middleware and helpers which integrate with Google's
Users API. I've based it somewhat around how Django's Authentication stuff
works.

I've attached a zip file of the code, I have a bzr branch up at
http://gnaw.yi.org/~ycros/bzr/google_auth/ (sorry, I don't use svn for my
own projects) and I have documentation up at
http://gnaw.yi.org/~ycros/docs/django-google-auth/

The only issue I have with the code at the moment is that I haven't written
any tests for it yet.

I was going to start my own project on Google code, but I thought I'd run
it past you guys to see if you wanted to integrate it.

I'm happy to license the code under the Apache License 2.0.

Original issue reported on code.google.com by [email protected] on 12 Apr 2008 at 3:38

Attachments:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.