watermark logo

अगला

स्वत: प्ले

Creating App - Django Web Development with Python 2

0 विचारों • 10/30/24
शेयर करना
एम्बेड
121gamers
121gamers
14 ग्राहकों
14

Welcome to the second Django web development with Python tutorial. This tutorial picks up from the previous one, and is focused on getting a simple page to render some text. After you did the startproject command, a new directory is created, called whatever you named it. We called it mysite. Change directory into your new directory cd mysite. Next, we create a new app for this:

python manage.py startapp webapp

Now a new directory exists, called webapp. In here, we see a lot of similar files, and some new ones:

webapp/
migrations/
__init__.py
admin.py
apps.py
models.py
tests.py
views.py
The app is indeed treated as its own package, with its own __init__.py, along with other files. For now, we will concern ourselves with views.py, and we're actually going to add another file urls.py.

http://pythonprogramming.net
https://twitter.com/sentdex

और दिखाओ
0 टिप्पणियाँ sort इसके अनुसार क्रमबद्ध करें
फेसबुक टिप्पणियाँ

अगला

स्वत: प्ले