- 浏览: 2541880 次
- 性别:
- 来自: 成都
文章分类
最新评论
-
nation:
你好,在部署Mesos+Spark的运行环境时,出现一个现象, ...
Spark(4)Deal with Mesos -
sillycat:
AMAZON Relatedhttps://www.godad ...
AMAZON API Gateway(2)Client Side SSL with NGINX -
sillycat:
sudo usermod -aG docker ec2-use ...
Docker and VirtualBox(1)Set up Shared Disk for Virtual Box -
sillycat:
Every Half an Hour30 * * * * /u ...
Build Home NAS(3)Data Redundancy -
sillycat:
3 List the Cron Job I Have>c ...
Build Home NAS(3)Data Redundancy
将django发布为桌面应用
了解到的一些资源如下:
http://misunderstandings.wordpress.com/2008/06/26/django-desktop-app/
http://www.pyinstaller.org/wiki/DjangoApplication
http://www.pyinstaller.org/
http://www.pyinstaller.org/wiki/Python26Win
http://blog.robotercoding.com/?p=124
http://www.danomagnum.com/wiki/py2exe%20and%20django
综合以上资料,我的操作步骤如下:
第一步
新建项目exedjango
将原有的easydjango项目拷贝到根目录下,并将easydjango加为src目录(只是为了平时在 eclipse直接运行方便)
第二步
在根目录上新建文件,PyConvert.py如下:
from distutils.core import setup
import py2exe
setup(console=[{'script':'bootstrap.py','icon_resources':[(0x0001,'kath.ico')]}],
options={'py2exe':{'packages':['django','email','easydjango',]} })
在根目录上新建文件,bootstrap.py如下:
import django
import easydjango.settings
import webbrowser,time, sys, os
from django.core.servers.basehttp import run, AdminMediaHandler, WSGIServerException
from django.core.handlers.wsgi import WSGIHandler
class DummyFile(object):
def write(*a, **kw): pass
if __name__ == "__main__":
os.environ['DJANGO_SETTINGS_MODULE'] = 'easydjango.settings'
port = 8000
out = sys.stdout
from django.conf import settings
try:
path = 'media/'
handler = AdminMediaHandler(WSGIHandler(), path)
#sys.stderr = sys.stdout = DummyFile()
#webbrowser.open('http://localhost:%s/wiki' % port) #mmm
run('0.0.0.0', port, handler)
except WSGIServerException, e:
# Use helpful error messages instead of ugly tracebacks.
ERRORS = {
13: "You don't have permission to access that port.",
98: "That port is already in use.",
99: "That IP address can't be assigned-to.",
}
try:
error_text = ERRORS[e.args[0].args[0]]
sys.stderr.write("Error: %s \n" % error_text)
except (AttributeError, KeyError):
error_text = str(e)
平时运行django程序,其实直接在eclipse里面启动这个bootstrap.py就行了,调试其实还比较方便,不用再另外启动一个命令行了。
第三步
修改项目中的urls.py和settings.py等配置。
urls.py如下:
from django.conf.urls.defaults import *
from django.conf import settings
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
import os
CURRENT_DIR = os.path.dirname(__file__)
OUTSIDE_DIR = CURRENT_DIR.split('library.zip')[0]
print CURRENT_DIR
print OUTSIDE_DIR
urlpatterns = patterns('',
# Example:
# (r'^easydjango/', include('easydjango.foo.urls')),
(r'^hello/$', 'easydjango.hello.HelloWorld.index'),
(r'^add/$', 'easydjango.hello.Add.index'),
(r'^list/$', 'easydjango.hello.List.index'),
(r'^wiki/$', 'easydjango.wiki.views.index'),
(r'^wiki/(?P<pagename>\w+)/$', 'easydjango.wiki.views.index'),
(r'^wiki/(?P<pagename>\w+)/edit/$', 'easydjango.wiki.views.edit'),
(r'^wiki/(?P<pagename>\w+)/save/$', 'easydjango.wiki.views.save'),
(r'^address/', include('easydjango.address.urls')),
(r'^ajax/$', 'django.views.generic.simple.direct_to_template',{'template': 'ajax/ajax.html'}),
(r'^ajax/input/$', 'easydjango.ajax.views.input'),
(r'^ajax/json/$', 'easydjango.ajax.views.json'),
(r'^calendar/$', 'django.views.generic.simple.direct_to_template',{'template': 'my_calendar/calendar.html'}),
(r'^site_media/(?P<path>.*)$', 'django.views.static.serve',{'document_root': settings.STATIC_PATH}),
# Uncomment the admin/doc line below and add 'django.contrib.admindocs'
# to INSTALLED_APPS to enable admin documentation:
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Uncomment the next line to enable the admin:
(r'^admin/', include(admin.site.urls)),
)
settings.py如下:
# Django settings for easydjango project.
from django.conf import settings
import os
#DEFAULT_CHARSET = 'utf-8'
#DATABASE_OPTIONS = { 'charset': 'utf8', }
#FILE_CHARSET= 'utf-8'
DEBUG = True
TEMPLATE_DEBUG = DEBUG
CURRENT_DIR = os.path.dirname(__file__)
OUTSIDE_DIR = CURRENT_DIR.split('library.zip')[0]
print CURRENT_DIR
print OUTSIDE_DIR
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
MANAGERS = ADMINS
DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
DATABASE_NAME = OUTSIDE_DIR + '/data.db' # Or path to database file if using sqlite3.
DATABASE_USER = '' # Not used with sqlite3.
DATABASE_PASSWORD = '' # Not used with sqlite3.
DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# If running in a Windows environment this must be set to the same as your
# system time zone.
#TIME_ZONE = 'America/Chicago'
TIME_ZONE = 'Asia/Shanghai'
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
#LANGUAGE_CODE = 'en-us'
LANGUAGE_CODE = 'zh-cn'
SITE_ID = 1
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True
# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = ''
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
# Examples: "http://media.lawrence.com", "http://example.com/media/"
MEDIA_URL = ''
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: "http://foo.com/media/", "/media/".
ADMIN_MEDIA_PREFIX = '/media/'
ADMIN_MEDIA_ROOT = OUTSIDE_DIR + '/media/'
# Make this unique, and don't share it with anybody.
SECRET_KEY = 'i_9wlov#n93b(%13vzytj=nd)nvy)kkth8t-he*8k#o-3*t4-e'
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.load_template_source',
'django.template.loaders.app_directories.load_template_source',
#'django.template.loaders.eggs.load_template_source',
)
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.doc.XViewMiddleware',
)
ROOT_URLCONF = 'easydjango.urls'
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
#'./template',
os.path.join(OUTSIDE_DIR,'template'),
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'easydjango.wiki',
'easydjango.address',
'easydjango.ajax',
'easydjango.my_calendar',
)
STATIC_PATH = OUTSIDE_DIR + '/media'
UPLOAD_USER = 'kiko'
其实变化不大,只是为了让py2exe了以后,还能找到这些对应的目录啊这些。
一起准备就绪后,使用命令
D:\work\exedjango>python PyConvert.py py2exe
就可以生成dist目录,这个目录里面的bootstrap.exe就是WINDOWS上可以直接运行的绿色软件了:)
第四步
要将一些需要的文件,拷贝到这个路径上才行。比如:
media/
template/
data.db
等,另外我们的easydjango其实已经打在了压缩包library.zip里面了,可以将对应的media,template这些删除,以减少打给别人的zip包的大小。整个过程就胜利结束了:)
问题一
过程中有遇到报错情况。
报错如下:
Traceback (most recent call last):
File "django\core\servers\basehttp.pyc", line 279, in run
File "django\core\servers\basehttp.pyc", line 651, in __call__
File "django\core\handlers\wsgi.pyc", line 230, in __call__
File "django\core\handlers\base.pyc", line 42, in load_middleware
ImproperlyConfigured: Error importing middleware django.middleware.common: "No module named text"
问题解决,修改为:
setup(console=[{'script':'bootstrap.py','icon_resources':[(0x0001,'kath.ico')]}],
options={'py2exe':{'packages':['django','email','easydjango',]} })
了解到的一些资源如下:
http://misunderstandings.wordpress.com/2008/06/26/django-desktop-app/
http://www.pyinstaller.org/wiki/DjangoApplication
http://www.pyinstaller.org/
http://www.pyinstaller.org/wiki/Python26Win
http://blog.robotercoding.com/?p=124
http://www.danomagnum.com/wiki/py2exe%20and%20django
综合以上资料,我的操作步骤如下:
第一步
新建项目exedjango
将原有的easydjango项目拷贝到根目录下,并将easydjango加为src目录(只是为了平时在 eclipse直接运行方便)
第二步
在根目录上新建文件,PyConvert.py如下:
from distutils.core import setup
import py2exe
setup(console=[{'script':'bootstrap.py','icon_resources':[(0x0001,'kath.ico')]}],
options={'py2exe':{'packages':['django','email','easydjango',]} })
在根目录上新建文件,bootstrap.py如下:
import django
import easydjango.settings
import webbrowser,time, sys, os
from django.core.servers.basehttp import run, AdminMediaHandler, WSGIServerException
from django.core.handlers.wsgi import WSGIHandler
class DummyFile(object):
def write(*a, **kw): pass
if __name__ == "__main__":
os.environ['DJANGO_SETTINGS_MODULE'] = 'easydjango.settings'
port = 8000
out = sys.stdout
from django.conf import settings
try:
path = 'media/'
handler = AdminMediaHandler(WSGIHandler(), path)
#sys.stderr = sys.stdout = DummyFile()
#webbrowser.open('http://localhost:%s/wiki' % port) #mmm
run('0.0.0.0', port, handler)
except WSGIServerException, e:
# Use helpful error messages instead of ugly tracebacks.
ERRORS = {
13: "You don't have permission to access that port.",
98: "That port is already in use.",
99: "That IP address can't be assigned-to.",
}
try:
error_text = ERRORS[e.args[0].args[0]]
sys.stderr.write("Error: %s \n" % error_text)
except (AttributeError, KeyError):
error_text = str(e)
平时运行django程序,其实直接在eclipse里面启动这个bootstrap.py就行了,调试其实还比较方便,不用再另外启动一个命令行了。
第三步
修改项目中的urls.py和settings.py等配置。
urls.py如下:
from django.conf.urls.defaults import *
from django.conf import settings
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
import os
CURRENT_DIR = os.path.dirname(__file__)
OUTSIDE_DIR = CURRENT_DIR.split('library.zip')[0]
print CURRENT_DIR
print OUTSIDE_DIR
urlpatterns = patterns('',
# Example:
# (r'^easydjango/', include('easydjango.foo.urls')),
(r'^hello/$', 'easydjango.hello.HelloWorld.index'),
(r'^add/$', 'easydjango.hello.Add.index'),
(r'^list/$', 'easydjango.hello.List.index'),
(r'^wiki/$', 'easydjango.wiki.views.index'),
(r'^wiki/(?P<pagename>\w+)/$', 'easydjango.wiki.views.index'),
(r'^wiki/(?P<pagename>\w+)/edit/$', 'easydjango.wiki.views.edit'),
(r'^wiki/(?P<pagename>\w+)/save/$', 'easydjango.wiki.views.save'),
(r'^address/', include('easydjango.address.urls')),
(r'^ajax/$', 'django.views.generic.simple.direct_to_template',{'template': 'ajax/ajax.html'}),
(r'^ajax/input/$', 'easydjango.ajax.views.input'),
(r'^ajax/json/$', 'easydjango.ajax.views.json'),
(r'^calendar/$', 'django.views.generic.simple.direct_to_template',{'template': 'my_calendar/calendar.html'}),
(r'^site_media/(?P<path>.*)$', 'django.views.static.serve',{'document_root': settings.STATIC_PATH}),
# Uncomment the admin/doc line below and add 'django.contrib.admindocs'
# to INSTALLED_APPS to enable admin documentation:
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),
# Uncomment the next line to enable the admin:
(r'^admin/', include(admin.site.urls)),
)
settings.py如下:
# Django settings for easydjango project.
from django.conf import settings
import os
#DEFAULT_CHARSET = 'utf-8'
#DATABASE_OPTIONS = { 'charset': 'utf8', }
#FILE_CHARSET= 'utf-8'
DEBUG = True
TEMPLATE_DEBUG = DEBUG
CURRENT_DIR = os.path.dirname(__file__)
OUTSIDE_DIR = CURRENT_DIR.split('library.zip')[0]
print CURRENT_DIR
print OUTSIDE_DIR
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
MANAGERS = ADMINS
DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
DATABASE_NAME = OUTSIDE_DIR + '/data.db' # Or path to database file if using sqlite3.
DATABASE_USER = '' # Not used with sqlite3.
DATABASE_PASSWORD = '' # Not used with sqlite3.
DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3.
DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3.
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# If running in a Windows environment this must be set to the same as your
# system time zone.
#TIME_ZONE = 'America/Chicago'
TIME_ZONE = 'Asia/Shanghai'
# Language code for this installation. All choices can be found here:
# http://www.i18nguy.com/unicode/language-identifiers.html
#LANGUAGE_CODE = 'en-us'
LANGUAGE_CODE = 'zh-cn'
SITE_ID = 1
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True
# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
MEDIA_ROOT = ''
# URL that handles the media served from MEDIA_ROOT. Make sure to use a
# trailing slash if there is a path component (optional in other cases).
# Examples: "http://media.lawrence.com", "http://example.com/media/"
MEDIA_URL = ''
# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
# trailing slash.
# Examples: "http://foo.com/media/", "/media/".
ADMIN_MEDIA_PREFIX = '/media/'
ADMIN_MEDIA_ROOT = OUTSIDE_DIR + '/media/'
# Make this unique, and don't share it with anybody.
SECRET_KEY = 'i_9wlov#n93b(%13vzytj=nd)nvy)kkth8t-he*8k#o-3*t4-e'
# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.load_template_source',
'django.template.loaders.app_directories.load_template_source',
#'django.template.loaders.eggs.load_template_source',
)
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.doc.XViewMiddleware',
)
ROOT_URLCONF = 'easydjango.urls'
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
#'./template',
os.path.join(OUTSIDE_DIR,'template'),
)
INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'easydjango.wiki',
'easydjango.address',
'easydjango.ajax',
'easydjango.my_calendar',
)
STATIC_PATH = OUTSIDE_DIR + '/media'
UPLOAD_USER = 'kiko'
其实变化不大,只是为了让py2exe了以后,还能找到这些对应的目录啊这些。
一起准备就绪后,使用命令
D:\work\exedjango>python PyConvert.py py2exe
就可以生成dist目录,这个目录里面的bootstrap.exe就是WINDOWS上可以直接运行的绿色软件了:)
第四步
要将一些需要的文件,拷贝到这个路径上才行。比如:
media/
template/
data.db
等,另外我们的easydjango其实已经打在了压缩包library.zip里面了,可以将对应的media,template这些删除,以减少打给别人的zip包的大小。整个过程就胜利结束了:)
问题一
过程中有遇到报错情况。
报错如下:
Traceback (most recent call last):
File "django\core\servers\basehttp.pyc", line 279, in run
File "django\core\servers\basehttp.pyc", line 651, in __call__
File "django\core\handlers\wsgi.pyc", line 230, in __call__
File "django\core\handlers\base.pyc", line 42, in load_middleware
ImproperlyConfigured: Error importing middleware django.middleware.common: "No module named text"
问题解决,修改为:
setup(console=[{'script':'bootstrap.py','icon_resources':[(0x0001,'kath.ico')]}],
options={'py2exe':{'packages':['django','email','easydjango',]} })
发表评论
-
NodeJS12 and Zlib
2020-04-01 07:44 468NodeJS12 and Zlib It works as ... -
Traefik 2020(1)Introduction and Installation
2020-03-29 13:52 328Traefik 2020(1)Introduction and ... -
Private Registry 2020(1)No auth in registry Nginx AUTH for UI
2020-03-18 00:56 428Private Registry 2020(1)No auth ... -
Buffer in NodeJS 12 and NodeJS 8
2020-02-25 06:43 376Buffer in NodeJS 12 and NodeJS ... -
NodeJS ENV Similar to JENV and PyENV
2020-02-25 05:14 465NodeJS ENV Similar to JENV and ... -
Prometheus HA 2020(3)AlertManager Cluster
2020-02-24 01:47 413Prometheus HA 2020(3)AlertManag ... -
Serverless with NodeJS and TencentCloud 2020(5)CRON and Settings
2020-02-24 01:46 330Serverless with NodeJS and Tenc ... -
GraphQL 2019(3)Connect to MySQL
2020-02-24 01:48 242GraphQL 2019(3)Connect to MySQL ... -
GraphQL 2019(2)GraphQL and Deploy to Tencent Cloud
2020-02-24 01:48 443GraphQL 2019(2)GraphQL and Depl ... -
GraphQL 2019(1)Apollo Basic
2020-02-19 01:36 320GraphQL 2019(1)Apollo Basic Cl ... -
Serverless with NodeJS and TencentCloud 2020(4)Multiple Handlers and Running wit
2020-02-19 01:19 306Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(3)Build Tree and Traverse Tree
2020-02-19 01:19 310Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(2)Trigger SCF in SCF
2020-02-19 01:18 285Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(1)Running with Component
2020-02-19 01:17 302Serverless with NodeJS and Tenc ... -
NodeJS MySQL Library and npmjs
2020-02-07 06:21 278NodeJS MySQL Library and npmjs ... -
Python Library 2019(1)requests and aiohttp
2019-12-18 01:12 256Python Library 2019(1)requests ... -
NodeJS Installation 2019
2019-10-20 02:57 565NodeJS Installation 2019 Insta ... -
Monitor Tool 2019(2)Monit on Multiple Instances and Email Alerts
2019-10-18 10:57 256Monitor Tool 2019(2)Monit on Mu ... -
Sqlite Database 2019(1)Sqlite3 Installation and Docker phpsqliteadmin
2019-09-05 11:24 361Sqlite Database 2019(1)Sqlite3 ... -
Supervisor 2019(2)Ubuntu and Multiple Services
2019-08-19 10:53 363Supervisor 2019(2)Ubuntu and Mu ...
相关推荐
**Python项目实战** - 实战项目通常包括从零开始创建一个完整的项目,如搭建网站、构建API服务或者开发桌面应用。这些项目有助于学习者积累实践经验,了解如何在现实环境中应用Python编程技术。 **Python的发展历程...
【Python Django Bootstrap 博客源码详解】 ...总之,这个项目集成了Python、Django和Bootstrap的优势,为开发者提供了一个从后端到前端的完整实践案例,有助于提升Web开发技能,并理解Web应用的全貌。
为了适应不同设备的显示,前端应用需要采用响应式设计,确保在手机、平板和桌面电脑上都能良好展示。Vue3.2 提供的 Grid 系统和 CSS 媒体查询可以帮助实现这一目标。 总之,这个基于 Django、Vue3.2 和 TypeScript ...
综上所述,jet-django 是一个为 Django 开发者设计的增强型管理面板框架,它结合了 Jet Admin 的优点,提供了一个响应式、易用且可定制的后台管理界面,便于开发者高效地进行应用管理。通过利用 jet-django,你可以...
2. **MVT(模型-视图-模板)**:Django的MVT设计模式将业务逻辑、数据处理和用户界面分开,提高了代码的可维护性和可扩展性。 3. **内置管理界面**:Django自带了一个可配置的管理后台,方便开发者对数据进行 CRUD...
Django Suit 适用于需要为内部团队或客户提供一个直观、易用的后台管理界面的项目,尤其是那些需要大量数据管理和配置的 Web 应用。例如,内容管理系统、电子商务平台、数据驱动的新闻网站等。 总之,`django-suit-...
`django-responsive2`是一个Django应用,它的主要功能是提供响应式设计的框架和工具,使得基于Django构建的网站能够自适应不同设备和屏幕尺寸,如手机、平板电脑和桌面电脑。这个库的版本号是0.1.0,表明这是一个...
Octicons是GitHub的开源图标集,包括一系列矢量图形,适用于网页和桌面应用程序。这个库可能提供了一些便利的模板标签或过滤器,使得开发者可以在Django模板中方便地插入和渲染这些图标。 **使用方法** 安装这个库...
《深入解析Django-datetime-widget2-0.9.5rc1:Python后端开发的高效日期时间组件》 在Python的世界里,Django...0.9.5rc1版本的发布,继续为开发者提供了更加稳定和高效的解决方案,助力于打造更高质量的Web应用。
`django-material-1.10.0.tar.gz`是一个在PyPI上发布的资源,它是Python Web框架Django的一个扩展,名为`django-material`的版本1.10.0。这个资源以`.tar.gz`格式提供,这是一种常见的源代码压缩包,包含了所有必要...
以下将详细阐述React和Django在该项目中的应用以及相关知识点。 1. **React**: React是Facebook开源的一个JavaScript库,用于构建用户界面,尤其是单页面应用。在这个项目中,React主要用于构建商城的前端部分,...
通过简单的配置,开发者可以为博客系统创建一个易于使用的后台,用于发布新文章、管理用户评论等。 2. **自定义Admin界面**:虽然Django Admin功能强大,但通常需要根据项目需求进行定制。开发者可能通过注册模型、...
Django提供了内置的测试框架,可以编写单元测试和集成测试来验证应用程序的功能。此外,开发过程中可能会使用像pdb这样的调试工具来查找和修复错误。 综上所述,这个Django项目涵盖了Web开发的多个核心概念,包括...
总之,这个基于Python 2.7、Django 1.8.3和Bootstrap 3.0的博客系统源码,为学习Web开发的学生或开发者提供了一个实际的应用场景,涵盖了后端开发、数据库管理、前端设计以及用户体验优化等多个方面的知识。...
Web应用依赖于服务器和网络连接,不需要在用户的设备上安装,而桌面应用则需要在本地安装并使用操作系统功能。Web应用的升级和跨平台使用通常更为便捷,但运行速度可能相对较慢。随着技术的发展,两者之间的界限日益...
在本项目中,Django用于构建API接口,处理用户登录注册、职位发布、简历投递等业务逻辑,同时,它还可能包含了身份验证、权限管理等功能。 **Vue.js**: Vue.js是前端的JavaScript框架,以其轻量级和易用性受到...
由Django Web Framework开发。 说明(Windows 10x64): 某些命令可能因操作系统而异。 只是谷歌它。 安装最新版本的Python3(64位)。 安装虚拟环境: 打开cmd :〜$ pip安装virtualenv 选择目的地::〜$ ...
7. 响应式设计:考虑到不同设备的屏幕尺寸,Vue.js的应用可能采用了响应式设计,确保在手机、平板和桌面电脑上都能提供良好的用户体验。 8. CRUD操作:Create(创建)、Read(读取)、Update(更新)和Delete(删除...
下面将详细介绍这个系统的核心技术和实现细节。 1. Python:Python是一种高级编程语言,以其简洁、易读的语法而闻名,广泛应用于Web开发、数据分析、机器学习等领域。在这个项目中,Python作为后端的主要编程语言,...
5. 桌面应用开发:PyQt、Tkinter等库使得Python能够用来创建跨平台的桌面应用程序。 6. 教育和研究:Python的简洁易学对于教学和研究工作很有帮助,尤其是用于计算机科学的入门教学。 总结以上内容,Python是一门...