{ "info": { "author": "Lubos Matl", "author_email": "matllubos@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: GNU General Public License (GPL)", "Natural Language :: Czech", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Internet :: WWW/HTTP :: Site Management" ], "description": "This project is not CMS system but simplify developers create dynamic pages with options changing url without restarting the server. It is possible adds custom page content that will be available in the template.\n\n\nFeatures:\n\t* Create pages which url is possible dynamically change\n\t* Set page content to pages\n\t* Static, redirect, redirect to page, default page content\n\t* Custom page content\n\t* Dynamic reverse that return url string from page name\n\t* Automatic urls reload for every process which processes request when pages is changed\n\t* Tree structured admin for pages\n\t* Automatic admin registration of page content\n\n\n\nInstallation:\n\n\tFirstly install djagno-simple-utilities\n\t\tpip install -U django-simple-utilities\n\tand finally install django-dynamic-pages\n\t\tpip install -U django-dynamic-pages\n\n\n\nConfiguration:\n\n\tsettings.py:\n\tAdd utilities and dynamic_pages to INSTALLED_APPS in settings.py before django.contrib.admin:\n\n\tINSTALLED_APPS = (\n \t \t \u2026\n\t \t'utilities',\n\t \t'dynamic_pages',\n\t\t'django.contrib.admin',\n \t\t \u2026\n\t)\n\n\tadd 'dynamic_pages.middleware.UrlsReloadMiddleware' to MIDDLEWARE_CLASSES and 'dynamic_pages.context_processors.page_content' into TEMPLATE_CONTEXT_PROCESSORS\n\n\nurls.py:\n\t\n\tFirstly you must add dnamic_patterns to django patterns\n\n\t\tfrom dynamic_pages.dynamic.utils import dynamic_urlpatterns\n\t\turlpatterns += dynamic_urlpatterns()\n\n\tAfter that you can set dynamic_patterns, for example:\n\n\t\tfrom dynamic_pages.dynamic.dynamic_urls import DynamicUrl\n\t\tDEFAULT_DYNAMIC_URLS = (\n \t\t\tDynamicUrl('static', _(u'Static page'), StaticView.as_view(), (r'',), 'dynamic_pages.StaticPageContent'),\n \t\t\tDynamicUrl('redirects', _(u'Redirect to first child page')),\n \t\t\tDynamicUrl('redirectstourl', _(u'Redirect to URL'), None, None, 'dynamic_pages.RedirectToURLPageContent', can_change_url = False),\n \t\t\tDynamicUrl('redirectstopage', _(u'Redirect to page'), None, None, 'dynamic_pages.RedirectToPagePageContent', can_change_url = False),\n\t\t)\n\n\n\tclass dynamic url has this constructor:\n\t\tDynamicUrl(name, verbose_name, view = None, patterns = [], model = None, can_change_url = True, view_kwargs = None)\n\t\n\t\t\tname - unique name of dynamic_pattern\n\t\t\tverbose_name - name which is used in administration\n\t\t\tview - django class view or string path to function\n\t\t\tpatterns - url patterns. Every pattern can be changed in administration, but url which is set in administration create prefix all this paterns. If you can edit the entire url in the administration set patterns to ['']\n\t\t\tmodel - you can create custom PageContent, this model must extend PageContent model. Page content is available in template as page_content variable. This value must be string which contains app_name.model_name\n\t\t\tcan_change_url - is this value is set to False, you will not be able change url dynamically.\n\t\t\tview_kwargs - same value as url view_kwargs\n\n\nCustom page content:\n\tPageContent is model which contains webpage data. Every page can have one page content. You can create custom page content in your apps in model.py file. For example:\n\n\tclass HomePageContent(PageContent):\n \t\thtml = HtmlField(_(u'Text'), blank=True) \n \n \t\tdef __unicode__(self):\n \t\treturn '%s' % force_unicode(_(u'Home page content'));\n \n \t\tclass Meta:\n \t\tverbose_name = _(u'Home page content')\n \t\tverbose_name_plural = _(u'Home page content') \n\n\tand when you set model in right DynamicUrl as path to this model class, page_content variable will contain this page content in template.\n\n\n\npage_utils:\n\n\tpage_utils contains template tags. You can use it in your templates.\n\n\t{% load page_utils %}\n\n\t\tdynamicurl:\n\t\t\tbecause template tag url is not working on dynamic pages, you can use tag dynamicurl\n\n\t\t\t{% dynamicurl dynamic_pattern_name val1 val2 \u2026 %}\n\n\t\tget_query_string:\n\t\t\tthis tag help with change query strings:\n\t\t\t{% get_query_string remove:a,b new_params:c=5,d='e' %} - return query string which from queries removes queries a and b and adds queries c and d with values 5 and 'e'\n\n\t\t\n\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/matllubos/django-dynamicpages", "keywords": "django,admin,pages", "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "django-dynamicpages", "package_url": "https://pypi.org/project/django-dynamicpages/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-dynamicpages/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/matllubos/django-dynamicpages" }, "release_url": "https://pypi.org/project/django-dynamicpages/0.1/", "requires_dist": null, "requires_python": null, "summary": "Application which allows dynamically change urls.", "version": "0.1" }, "last_serial": 789522, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "4fc463d450e457fe423a6da2ddd7f224", "sha256": "7a6612bc17bb19285a79b403a0e93c2a95542f404a480c760a15ec88d4ecb042" }, "downloads": -1, "filename": "django-dynamicpages-0.1.tar.gz", "has_sig": false, "md5_digest": "4fc463d450e457fe423a6da2ddd7f224", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 65138, "upload_time": "2012-08-26T14:50:01", "url": "https://files.pythonhosted.org/packages/7c/58/d43be15b3962b75b42512553538356f300d0a5fe22a80b6c23d10306ac35/django-dynamicpages-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4fc463d450e457fe423a6da2ddd7f224", "sha256": "7a6612bc17bb19285a79b403a0e93c2a95542f404a480c760a15ec88d4ecb042" }, "downloads": -1, "filename": "django-dynamicpages-0.1.tar.gz", "has_sig": false, "md5_digest": "4fc463d450e457fe423a6da2ddd7f224", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 65138, "upload_time": "2012-08-26T14:50:01", "url": "https://files.pythonhosted.org/packages/7c/58/d43be15b3962b75b42512553538356f300d0a5fe22a80b6c23d10306ac35/django-dynamicpages-0.1.tar.gz" } ] }