Django1.3 solution for adding an app to prompt that the module does not exist, django1.3app

Source: Internet
Author: User

Django1.3 solution for adding an app to prompt that the module does not exist, django1.3app

When you use Django to add an application, the system always prompts Error: No module named myapp. The application with this name cannot be found, but I have already startapp successfully and the system has created the corresponding directory.
Copy codeThe Code is as follows:
D: \ Python27 \ Scripts \ website> python manage. py syncdb
Error: No module named myapp

Is there an error in the official document? My manage. py startapp myapp has been successfully created and directories and files have been created.
And add the application in INSTALLED_APPS of settings. py. The following code is used:
Copy codeThe Code is as follows:
INSTALLED_APPS = (
'Django. contrib. auth ',
'Django. contrib. contenttypes ',
'Django. contrib. session ',
'Django. contrib. sites ',
'Django. contrib. messages ',
'Django. contrib. staticfiles ',
# Uncomment the next line to enable the admin:
# 'Django. contrib. admin ',
# Uncomment the next line to enable admin documentation:
# 'Django. contrib. admindocs ',
'Website. myapp ',
)

The last website. myapp line is newly added. Google has been searching for a long time and has not solved this problem. Finally, I had to go to the official website to read docs and find out the difference between the new version and the old version.
Before Django1.3, project. app must be written like this.
After Django1.3, you only need to write the app like this.
Finally, change the INSTALLED_APPS of settings. py
Copy codeThe Code is as follows:
INSTALLED_APPS = (
'Django. contrib. auth ',
'Django. contrib. contenttypes ',
'Django. contrib. session ',
'Django. contrib. sites ',
'Django. contrib. messages ',
'Django. contrib. staticfiles ',
# Uncomment the next line to enable the admin:
# 'Django. contrib. admin ',
# Uncomment the next line to enable admin documentation:
# 'Django. contrib. admindocs ',
'Myapp ',
)

Then execute
Copy codeThe Code is as follows:
Python manage. py syncdb

OK.

Postscript

I downloaded the latest version of Django1.4, and the Manual tutorial is an old version. A problem occurred while installing the tutorial step by step. At first, I thought I had missed the command or lost the wrong command. I tried again N times and found that the application could not be found. Finally, I had to go to the official website to carefully read the English Manual (by translation software) and finally found that this was a version problem.

After debugging over the past few days, I found that the new version is quite different from the old version, and it is also a newbie and easy to make mistakes. The few tutorials on the Internet are dominated by low versions, and many sites collect the same data, this may also be because Python is rarely or rarely used in China. Therefore, it is recommended that you read the manual on the official website if you have any problems with the children's shoes of Django1.3 or later versions. You cannot find a solution on the Internet.


Python django prompts that the model app books python managepy validate cannot be found and an error is returned.

You didn't register in INSTALLED_APPS ...... Just add a line of mysite. Remember to have a comma.
 
The most practical APP in history prompts unauthorized Solutions

The most practical APP in history prompts that there are many reasons for unauthorized authorization. You can troubleshoot the problems as follows. 1. Connect your phone to Wi-Fi or 3G networks. A few games need to be disconnected to run. 2. Make sure that your device has installed the electronic marketplace and has successfully logged in. 3. Go to mobile phone settings → account synchronization → enable background data synchronization 4. Some users have used a third-party ROM to streamline the Google service framework, it is recommended that such users use the Google installer to install the Google service framework and the Google market. Official introduction to the most practical APP in history: we all know that apps can do many things, such as listening to music and watching movies, or GPS navigation, but have you ever wondered whether the APP has more practical functions besides these functions? Now we have discovered the potential of the APP, which will not be possible! You are now witnessing the most practical APP in history! Breaking up the comfort program, Electric Mosquito shoot, ear thermometer, razor, all kinds of magic functions of the light speed knife. Your idea has the opportunity to appear in the most practical APP in history! Heart? Don't pick up your smart phone. Download it now! This APP is purely bojun's smile. Do not take it seriously... Google installer version: 1.3.3 release: Size: 9.82M classification: Essential Software language: Chinese applicable: 1.0 download: 528862 developers: thumb play now view history of the most practical APP version: 1.0.35 release: 2013-06-19 size: 5.89M category: Casual puzzle language: Chinese Applicability: 1.0 download: 30486 developers: amusement party Yo! View DawnLa now

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.