django cms 3.7.x Documentation
urlpatterns in the project’s urls.py: urlpatterns += i18n_patterns( url(r'^admin/', include(admin.site.urls)), url(r'^polls/', include('polls.urls')), url(r'^', include('cms.urls')), ) Note that it it must be included before the line for the django CMS URLs. django CMS’s URL pattern needs to be last, because it “swallows up” anything that hasn’t already been matched by a previous pattern. Now run project. 5. Apphooks Right now, our Django Polls application is statically hooked into the project’s urls.py. This is all right, but we can do more, by attaching applications to django CMS pages. 5.1. Create0 码力 | 409 页 | 1.67 MB | 1 年前3Django CMS 3.9.x Documentation
the project’s urls.py: urlpatterns += i18n_patterns( re_path(r'^admin/', include(admin.site.urls)), re_path(r'^polls/', include('polls.urls')), re_path(r'^', include('cms.urls')), ) Note that that it must be included before the line for the django CMS URLs. django CMS’s URL pattern needs to be last, because it “swallows up” anything that hasn’t already been matched by a previous pattern. Now project. 5. Apphooks Right now, our Django Polls application is statically hooked into the project’s urls.py. This is all right, but we can do more, by attaching applications to django CMS pages. 5.1. Create0 码力 | 417 页 | 1.68 MB | 5 月前3Django CMS 3.8.x Documentation
the project’s urls.py: urlpatterns += i18n_patterns( re_path(r'^admin/', include(admin.site.urls)), re_path(r'^polls/', include('polls.urls')), re_path(r'^', include('cms.urls')), ) Note that that it must be included before the line for the django CMS URLs. django CMS’s URL pattern needs to be last, because it “swallows up” anything that hasn’t already been matched by a previous pattern. Now project. 5. Apphooks Right now, our Django Polls application is statically hooked into the project’s urls.py. This is all right, but we can do more, by attaching applications to django CMS pages. 5.1. Create0 码力 | 413 页 | 1.67 MB | 5 月前3django cms 3.5.x Documentation
the project’s urls.py: url(r'^polls/', include('polls.urls', namespace='polls')), Make sure this line is included before the line for the django-cms urls: url(r'^', include('cms.urls')), django CMS’s admin.py models.py templates/ tests.py urls.py views.py Let’s add it this application to our project. Add 'polls' to the end of the project’s urls.py: url(r'^polls/', include('polls.urls', namespace='polls')), Make sure this line is included before the line for the django-cms urls: url(r'^', include('cms.urls')), django CMS’s0 码力 | 403 页 | 1.69 MB | 1 年前3django cms 3.4.x Documentation
the project’s urls.py: url(r'^polls/', include('polls.urls', namespace='polls')), Make sure this line is included before the line for the django-cms urls: url(r'^', include('cms.urls')), django CMS’s admin.py models.py templates/ tests.py urls.py views.py Let’s add it this application to our project. Add 'polls' to the end of the project’s urls.py: url(r'^polls/', include('polls.urls', namespace='polls')), Make sure this line is included before the line for the django-cms urls: url(r'^', include('cms.urls')), django CMS’s0 码力 | 395 页 | 1.64 MB | 1 年前3Django CMS 3.11.10 Documentation
templates/ base.html __init__.py asgi.py settings.py urls.py wsgi.py manage.py requirements.in cd myproject python -m manage runserver django Minimally-required applications and settings To run django CMS you will only need to modify the settings.py and urls.py files. Open the new project’s settings.py file in your text editor. INSTALLED_APPS You will need with your project. Some additional configuration is required however. Further required configuration URLs "sekizai.context_processors.sekizai", ], }, }, ] "django:django0 码力 | 493 页 | 1.44 MB | 5 月前0.03Scrapy 1.3 Documentation
following the pagination: import scrapy class QuotesSpider(scrapy.Spider): name = "quotes" start_urls = [ 'http://quotes.toscrape.com/tag/humor/', ] def parse(self, response): for it and ran it through its crawler engine. The crawl started by making requests to the URLs defined in the start_urls attribute (in this case, only the URL for quotes in humor category) and called the default on top of lxml, w3lib [https://pypi.python.org/pypi/w3lib], a multi-purpose helper for dealing with URLs and web page encodings twisted [https://twistedmatrix.com/], an asynchronous networking framework0 码力 | 339 页 | 555.56 KB | 1 年前3Scrapy 1.2 Documentation
following the pagination: import scrapy class QuotesSpider(scrapy.Spider): name = "quotes" start_urls = [ 'http://quotes.toscrape.com/tag/humor/', ] def parse(self, response): for it and ran it through its crawler engine. The crawl started by making requests to the URLs defined in the start_urls attribute (in this case, only the URL for quotes in humor category) and called the default on top of lxml, w3lib [https://pypi.python.org/pypi/w3lib], a multi-purpose helper for dealing with URLs and web page encodings twisted [https://twistedmatrix.com/], an asynchronous networking framework0 码力 | 330 页 | 548.25 KB | 1 年前3Scrapy 1.1 Documentation
following the pagination: import scrapy class QuotesSpider(scrapy.Spider): name = "quotes" start_urls = [ 'http://quotes.toscrape.com/tag/humor/', ] def parse(self, response): for it and ran it through its crawler engine. The crawl started by making requests to the URLs defined in the start_urls attribute (in this case, only the URL for quotes in humor category) and called the default def start_requests(self): urls = [ 'http://quotes.toscrape.com/page/1/', 'http://quotes.toscrape.com/page/2/', ] for url in urls: yield scrapy.Request(url=url0 码力 | 322 页 | 582.29 KB | 1 年前3Django CMS 2.4.x Documentation
Settings 3.2. Basic Customization 3.3. Editor configuration 3.4. I18N and L10N 3.5. Media Settings 3.6. URLs 3.7. Advanced Settings 4. Navigation 4.1. show_menu 4.2. show_menu_below_id 4.3. show_sub_menu 4.4 Caught MultipleObjectsReturned while rendering Advanced 1. Internationalization 1.1. Multilingual URLs 1.2. Language Cookie 1.3. Language Chooser 1.4. page_language_url 1.5. hide_unstranslated 1.6. Automated monkey patching of the reverse() function as well. As a benefit we now support localization of urls and Apphook urls with standard django helpers. For django 1.4 more infos can be found here: https://docs.djangoproject0 码力 | 156 页 | 727.78 KB | 5 月前3
共 530 条
- 1
- 2
- 3
- 4
- 5
- 6
- 53