Hi, 
afraid I'm new to Django so there's a good chance this 'bug' is just 
something silly I've overlooked.
I sent a good while following this 
tutorial<https://developers.google.com/appengine/docs/python/cloud-sql/django>on
 google to link up Django to Google Cloud SQL.  Unfortunately, I came 
across an awkward bug, logged 
here<http://stackoverflow.com/questions/14254936/django-1-4-gae-cloud-sql-app-works-on-development-server-but-cannot-find-modules>,
 
to do with INSTALLED_APPS paths differing on the development server 
compared to the google cloud SQL server.  My ugly solution was to identify 
what server was running and change the path appropriately:

APP_PATH = os.path.abspath(".")if APP_PATH[0:2]=="C:":
    print("banana")
    ROOT_URLCONF = 'xperiment.urls'else:
    ROOT_URLCONF = 'urls'


APP_PATH = os.path.abspath(".")if APP_PATH[0:2]=="C:":
    ROOT_URLCONF = 'xperiment.urls'
    APP_DIR="xperiment."else:
    ROOT_URLCONF = 'urls'
    APP_DIR=""

Note you have to specify your app now in the following way (note APP_DIR):

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    # Uncomment the next line to enable the admin:
    'django.contrib.admin',
    APP_DIR+'subscription',

    # Uncomment the next line to enable admin documentation:
    # 'django.contrib.admindocs', 

) 

Most likely this is a 'newbie' issue but posted here in case this is a bug.
Thanks,
Andy.


-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-developers/-/AsQLk_yAADoJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to