By getting "It worked!" Djangoappengine page, what should I do next?

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

  • Django
  • djangoappengine
  • djangotoolbox

Then I started the dev server by doing:

manage.py runningerver

Then go to

http: // localhost: 8000 /

and got "It worked!" a page that is great, but at the bottom of the screen is the following:

You see this message because you have DEBUG = True in your Django settings file, and you have not configured any URLs. Get to work!

I am an absolute newbie to Django and App Engine, Djangoappengine and Django-Nerel, so I'm pretty lost. How to set up urls? Or a link to how this will help.

I looked at the Django tutorial, but I don’t know how important this is for Djangoappengine and Django-Nerel, since many of the starting steps are related to SQL databases.

In principle, some direction of work with my application will be excellent.

Thanx a lot.

+4
source share
1 answer

Basically, I think you should be aware of django tutorials as usual. You can create your models in the same way as usual, create your views and URLs, etc. Just skip all the bits about setting up the database - this is already done for you if djangoappengine is working correctly.

You do not need syncdb to get the database tables built - the application engine will do this automatically for you.

You are probably better off using the App Engine administrative system, which will probably be http: // localhost: 8080 / _ah / admin / (or: 8000 if that is where it works for you), and not in the django admin system .

You don’t even have to start with a database if you don’t want to. You should be able to run django-admin.py startapp myapp just fine to get started.

Then:

  • edit view.py for this application and create a simple view function
  • add the application to INSTALLED_APPS in the settings.py file
  • create a url that points to your application in urls.py
  • visit this url and see what happens

Good, so basically from page 3 of the textbook onwards, most of 1 & 2 can probably be skipped in this case.

Django's documentation is excellent, and most of them apply even when using Django-Nonrel in an application.

+9
source

Source: https://habr.com/ru/post/1312256/


All Articles