The Python Framework's Django album component

Source: Internet
Author: User

The Python Framework's Django album component

 Yes, yes, and Django, although the study notes have been affixed, but the study notes are based on, Django, regardless of what is said or a lot of things to learn naturally will not only use more than 10 blog post can learn the end. Okay, nonsense. Today's introduction to Django is an open source component Photologue, the component was placed on GitHub by the author, want to see the source click here.

Preparatory work

  1. Download the component. Here: http://code.google.com/p/django-photologue/
  2. After decompression, proceed to the command line installation under directory:
    1 python setup.py install
  3. To detect if the installation was successful:

    Go to a once Django project and then execute

    1   python manage.py shell2   Import Photologue 3   >>> Photologue. VERSION4         (2, 2)
  4. add" settings.py "to photologue in the following way:
     Span style= "color: #008080;" >1  installed_apps = ( 2  #  3    " photologue   '   4 ) 
  5. Add the following code to your project's urls.py file:
    1  from Import Admin 2 3     Admin.autodiscover ()

    Of course, if you are normal to use the command line to build the project, then it is in the original there are these, you can not join ~

  6. Sync your database
    1  Python manage.py syncdb
  7. To initialize the component:
    1 python manage.py plinit
  8. add Photologue to the urls.py of your project
     1  #   2  urlpatterns + = patterns ( "
            3  (R '  

 9. Add a template module to your project: see the Python Framework's Django Learning Note (10) for a template addition

If you want to learn more, see the official documentation: HTTP://ITECHES.COM/ARCHIVES/65083.

PS: This blog welcome forwarding, but please specify the blog address and author ~

Blog Address: http://www.cnblogs.com/voidy/

<. ))) ≦


  

The Python Framework's Django album component

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.