Package: peregrine
PeregrinePeregrine is an opinionated blogging platform which usesthe Wagtail CMSon theDjango web frameworkand is geared for coding blogs. It uses Wagtail's fantasticStreamField featureto provide fully structured content body element blocks, completely separating content from the presentation layer (CSS, JS, and HTML).It usesWagtail Code BlockwithPrismJSsyntax highlighting under the hood for beautiful code snippets. You can see this in action atPyPhilly.org.Are you looking for a more robust system, for example, creating a marketing site? The maintainer of Peregrine also contributes toCodeRedCMS, which offers a lot more bells and whistles. Peregrine will remain a basic weblog solutions focused on features to display code.Getting Started: the Five Minute InstallThese instructions will be fleshed out, but if you want to give it a try, here are the basics.Systemmkvirtualenvmy_blog
pipinstallperegrine
django-adminstartprojectmy_blogcdmy_blogSettingsYour settings file will be located inmy_blog/settings.pyif you're using the default Django project layout created by thestartprojectcommand above. You'll need to add the sections beneathINSTALLED_APPSandMIDDLEWARE, and add'wagtail.contrib.settings.context_processors.settings',to yourTEMPLATEScontext processors in your settings to look like this.INSTALLED_APPS=[...]PEREGRINE_APPS=["peregrine","bootstrap4","wagtailcodeblock","wagtailcontentstream","wagtail.contrib.forms","wagtail.contrib.redirects","wagtail.embeds","wagtail.sites","wagtail.users","wagtail.snippets","wagtail.documents","wagtail.images","wagtail.search","wagtail.admin","wagtail.core","taggit","modelcluster","wagtail.contrib.settings","wagtail.contrib.modeladmin","wagtail.contrib.table_block",]INSTALLED_APPS+=PEREGRINE_APPSMIDDLEWARE=[...]PEREGRINE_MIDDLEWARE=["wagtail.contrib.redirects.middleware.RedirectMiddleware",]MIDDLEWARE+=PEREGRINE_MIDDLEWARE# WAGTAIL_SITE_NAME is used by Wagtail; others are used by OpenGraph.WAGTAIL_SITE_NAME="PyPhilly: Home of FlipperPA"WAGTAIL_SITE_DESCRIPTION="PyPhilly is the website of Tim Allen, a web developer living in Philadelphia. Tim has a wide range of interests, but mostly writes about Python, Django, and virtual reality."WAGTAIL_SITE_URL="https://PyPhilly.org/"TEMPLATES=[{...'OPTIONS':{'context_processors':[...'wagtail.contrib.settings.context_processors.settings',]}}]URLsfromdjango.contribimportadminfromdjango.urlsimportinclude,path,re_pathfromwagtail.adminimporturlsaswagtailadmin_urlsfromwagtail.documentsimporturlsaswagtaildocs_urlsurlpatterns=[path('admin/',admin.site.urls),# Wagtail / Peregrine URLspath('documents/',include(wagtaildocs_urls)),path('cms/',include(wagtailadmin_urls)),re_path(r'^',include('peregrine.urls')),]Fire it up!After you've set up your settings, we need to create your database and a superuser. Issue the following commands from your project root directory.Only run the commandperegrine_initial_siteif you are running on a new project, as it loads database fixtures!pythonmanage.pymigrate# ** Be sure to see the note above before running this next command. It isn't necessary if you don't want to. **pythonmanage.pyperegrine_initial_site
pythonmanage.pycreatesuperuser
pythonmanage.pyrunserver0:8000You should then be able to navigate tohttp://localhost:8000/cms/and log in, and start creating!MaintainerTimothy Allen (https://github.com/FlipperPA/)ContributorsJon Banafato (https://github.com/jonafato/)Dave Bauer (https://github.com/tdxdave)Rana Fayez (https://github.com/Tagine/)Jeff Triplett (https://github.com/jefftriplett/)