Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

After getting the 'It worked!' page with Djangoappengine, what do I do next?

I followed the Djangoappengine instructions. I used their django-testapp and copied the following folders in the django-testapp folder according to what I understood the instructions to say:

  • django
  • djangoappengine
  • djangotoolbox

I then started the dev server by running:

manage.py runserver

Then navigated to

http://localhost:8000/

and got the "It worked!" page, which is great, but it says the following at the bottom:

You're seeing this message because you have DEBUG = True in your Django settings file and you haven't configured any URLs. Get to work!

I am an absolute beginner with Django and App Engine and Djangoappengine and Django-nonrel, so I am pretty lost. How do I configure URLs? Or a link to the how to will help.

I took a look at the Django tutorial, but am unsure how much of it is relevant to Djangoappengine and Django-nonrel as a lot of the starting steps have to do with SQL databases.

Basically some direction on how to get my app running will be great.

Thanx much.

like image 271
Jacques Bosch Avatar asked Jun 08 '10 19:06

Jacques Bosch


1 Answers

Mostly I think you should be able to follow the django tutorials as normal. You can create your models just like normal, create your views and urls etc. Just skip all the bits about setting up the database - that's already been done for you if djangoappengine is working properly.

You don't need to syncdb to get the database tables built - app engine will do that for you automatically.

You're probably better to use the App Engine admin system to start with which will probably be at http://localhost:8080/_ah/admin/ (or :8000 if that's where you've got it running) rather than the django admin system.

You don't even need to start with the database if you don't want. You should be able to run django-admin.py startapp myapp just fine to get yourself started.

Then:

  1. edit the views.py for that app and create a simple view function
  2. add the app to INSTALLED_APPS in your settings.py file
  3. create a url which points to your app's view in urls.py
  4. visit that url and see what happens

Ok, so that's mostly covered from page 3 of the tutorial onwards - most of 1& 2 can probably be skipped over in this instance.

The Django documentation is excellent tho, and most of it will be applicable even using Django-Nonrel on app engine.

like image 66
pycruft Avatar answered Nov 01 '22 14:11

pycruft