資源簡(jiǎn)介
Python下有許多款不同的 Web 框架。Django是重量級(jí)選手中最有代表性的一位。許多成功的網(wǎng)站和APP都基于Django。
Django是一個(gè)開(kāi)放源代碼的Web應(yīng)用框架,由Python寫(xiě)成。
Django遵守BSD版權(quán),初次發(fā)布于2005年7月, 并于2008年9月發(fā)布了第一個(gè)正式版本1.0 。
Django采用了MVC的軟件設(shè)計(jì)模式,即模型M,視圖V和控制器C。
代碼片段和文件信息
import?os
import?sys
from?distutils.sysconfig?import?get_python_lib
from?setuptools?import?find_packages?setup
CURRENT_PYTHON?=?sys.version_info[:2]
REQUIRED_PYTHON?=?(3?5)
#?This?check?and?everything?above?must?remain?compatible?with?Python?2.7.
if?CURRENT_PYTHON?????sys.stderr.write(“““
==========================
Unsupported?Python?version
==========================
This?version?of?Django?requires?Python?{}.{}?but?you‘re?trying?to
install?it?on?Python?{}.{}.
This?may?be?because?you?are?using?a?version?of?pip?that?doesn‘t
understand?the?python_requires?classifier.?Make?sure?you
have?pip?>=?9.0?and?setuptools?>=?24.2?then?try?again:
????$?python?-m?pip?install?--upgrade?pip?setuptools
????$?python?-m?pip?install?django
This?will?install?the?latest?version?of?Django?which?works?on?your
version?of?Python.?If?you?can‘t?upgrade?your?pip?(or?Python)?request
an?older?version?of?Django:
????$?python?-m?pip?install?“django<2“
“““.format(*(REQUIRED_PYTHON?+?CURRENT_PYTHON)))
????sys.exit(1)
#?Warn?if?we?are?installing?over?top?of?an?existing?installation.?This?can
#?cause?issues?where?files?that?were?deleted?from?a?more?recent?Django?are
#?still?present?in?site-packages.?See?#18115.
overlay_warning?=?False
if?“install“?in?sys.argv:
????lib_paths?=?[get_python_lib()]
????if?lib_paths[0].startswith(“/usr/lib/“):
????????#?We?have?to?try?also?with?an?explicit?prefix?of?/usr/local?in?order?to
????????#?catch?Debian‘s?custom?user?site-packages?directory.
????????lib_paths.append(get_python_lib(prefix=“/usr/local“))
????for?lib_path?in?lib_paths:
????????existing_path?=?os.path.abspath(os.path.join(lib_path?“django“))
????????if?os.path.exists(existing_path):
????????????#?We?note?the?need?for?the?warning?here?but?present?it?after?the
????????????#?command?is?run?so?it‘s?more?likely?to?be?seen.
????????????overlay_warning?=?True
????????????break
EXCLUDE_FROM_PACKAGES?=?[‘django.conf.project_template‘
?????????????????????????‘django.conf.app_template‘
?????????????????????????‘django.bin‘]
#?Dynamically?calculate?the?version?based?on?django.VERSION.
version?=?__import__(‘django‘).get_version()
setup(
????name=‘Django‘
????version=version
????python_requires=‘>={}.{}‘.format(*REQUIRED_PYTHON)
????url=‘https://www.djangoproject.com/‘
????author=‘Django?Software?Foundation‘
????author_email=‘foundation@djangoproject.com‘
????description=(‘A?high-level?Python?Web?framework?that?encourages?‘
?????????????????‘rapid?development?and?clean?pragmatic?design.‘)
????license=‘BSD‘
????packages=find_packages(exclude=EXCLUDE_FROM_PACKAGES)
????include_package_data=True
????scripts=[‘django/bin/django-admin.py‘]
????entry_points={‘console_scripts‘:?[
????????‘django-admin?=?django.core.management:execute_from_command_line‘
????]}
????install_requires=[‘pytz‘]
????extras_require={
????????“bcrypt“:?[“bcrypt“]
????????“argon2“:?[“argon2-cffi?>=?16.1.0“]
????}
????zip_safe=False
????classifiers=[
????????‘Developme
?屬性????????????大小?????日期????時(shí)間???名稱(chēng)
-----------?---------??----------?-----??----
?????目錄???????????0??2018-05-02?13:20??django-master\
?????文件?????????744??2018-05-02?13:20??django-master\.editorconfig
?????文件??????????86??2018-05-02?13:20??django-master\.eslintignore
?????文件????????1165??2018-05-02?13:20??django-master\.eslintrc
?????文件?????????297??2018-05-02?13:20??django-master\.gitattributes
?????文件?????????353??2018-05-02?13:20??django-master\.gitignore
?????文件?????????164??2018-05-02?13:20??django-master\.hgignore
?????目錄???????????0??2018-05-02?13:20??django-master\.tx\
?????文件????????2480??2018-05-02?13:20??django-master\.tx\config
?????文件???????33806??2018-05-02?13:20??django-master\AUTHORS
?????文件????????1115??2018-05-02?13:20??django-master\CONTRIBUTING.rst
?????文件?????????353??2018-05-02?13:20??django-master\Gruntfile.js
?????文件?????????311??2018-05-02?13:20??django-master\INSTALL
?????文件????????1552??2018-05-02?13:20??django-master\LICENSE
?????文件???????12779??2018-05-02?13:20??django-master\LICENSE.python
?????文件?????????307??2018-05-02?13:20??django-master\MANIFEST.in
?????文件????????1935??2018-05-02?13:20??django-master\README.rst
?????目錄???????????0??2018-05-02?13:20??django-master\django\
?????文件?????????799??2018-05-02?13:20??django-master\django\__init__.py
?????文件?????????211??2018-05-02?13:20??django-master\django\__main__.py
?????目錄???????????0??2018-05-02?13:20??django-master\django\apps\
?????文件??????????90??2018-05-02?13:20??django-master\django\apps\__init__.py
?????文件????????8047??2018-05-02?13:20??django-master\django\apps\config.py
?????文件???????17220??2018-05-02?13:20??django-master\django\apps\registry.py
?????目錄???????????0??2018-05-02?13:20??django-master\django\bin\
?????文件?????????128??2018-05-02?13:20??django-master\django\bin\django-admin.py
?????目錄???????????0??2018-05-02?13:20??django-master\django\conf\
?????文件????????7756??2018-05-02?13:20??django-master\django\conf\__init__.py
?????目錄???????????0??2018-05-02?13:20??django-master\django\conf\app_template\
?????文件???????????0??2018-05-02?13:20??django-master\django\conf\app_template\__init__.py-tpl
?????文件??????????63??2018-05-02?13:20??django-master\django\conf\app_template\admin.py-tpl
............此處省略8819個(gè)文件信息
評(píng)論
共有 條評(píng)論