Solve the Problem of Django groundwork in django1.4 or later versions

Source: Internet
Author: User

As you have learned Django Python during this time, follow the link below for the tutorial.

Http://www.cnblogs.com/lt1983/archive/2012/05/16/2504239.html

However, it is found that the file django1.4 or later cannot be generated normally, mainly because the file manage. py is not in the same directory as the directory of the created project. For example:

Bookms
├ ── Bookapp
├ ── Bookms
├ ── Django-groundwork

Manage. py

Then run Python manage. py groundwork bookapp book

Will become

Bookms

├ ── Bookapp
Templates
│ ─ ── Bookapp
├ ── Bookms
├ ── Django-groundwork
Manage. py
─ ── URLs. py

─ ── Setting. py

At this time, you need to do some processing. If your Django version is later than 1.4, You need to manually modify some files, as shown below:


Delete the URLs. py and setting. py at the same layer as manage. py, but do not delete the templtes directory.

View the URL. py in the outer bookms and add the following content:
Urlpatterns + = patterns ('',
URL (R' ^ bookapp/', include ('bookapp. urls ')),
)

After processing, the preceding example can be continued.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.