Git Product home page Git Product logo

porticus's Introduction

Porticus

Yet another File gallery for Django.

Galleries contains Albums that contains Ressources and ressources are your files items. Usually used like an image gallery, you should also use it like a download center for many file types.

Galleries and Albums have thumbnails, Ressources have a thumbnail and a file but the file can be a real uploaded file on your server or just an url to link to. Also Ressources have optional tags.

Note that Albums make usage of mptt, so Albums can have album children.

Shipped templates are basics, you probably will have to override them to suit your needs.

Links

Requires

And optionnally djangocms_text_ckeditor to use TextEditorWidget on gallery, album and ressource descriptions. If not, simple Textarea widget is used instead.

Install

Install package from PyPi:

pip install porticus

In your urls.py :

url(r'^porticus/', include('porticus.urls', namespace='porticus')),

Or to point out a specific gallery :

url(r'^$', 'porticus.views.view_gallery_detail', {'slug':'home-intro'}, name='homepage_gallery_detail'),

Then add the content of porticus.settings in your settings file and the apps in your INSTALLED_APPS setting :

INSTALLED_APPS = (
    ...
    'mptt',
    'tagging',
    'filebrowser',
    'porticus',
    ...
)

Then add its settings :

from porticus.settings import *

See included application file settings.py to know more about available settings you can override.

Then some django-filebrowser-no-grappelli basic settings (see its documentation for more details) :

FILEBROWSER_VERSIONS_BASEDIR = '_uploads_versions'

FILEBROWSER_MAX_UPLOAD_SIZE = 10*1024*1024 # 10 Mb

FILEBROWSER_NORMALIZE_FILENAME = True

And finally apply migrations.

Also you can find some Sitemap classes in sitemaps.py that you can mount in your project sitemap like so :

from django.conf.urls import url
from porticus.sitemaps import PorticusGallerySitemap, PorticusAlbumSitemap, PorticusRessourceSitemap

sitemaps = {
    'galleries': PorticusGallerySitemap,
    'albums': PorticusAlbumSitemap,
    'photos': PorticusRessourceSitemap,
}

urlpatterns = [
    # Sitemap
    url(r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps})
]

See the Django documentation about Sitemaps for more details.

porticus's People

Contributors

sveetch avatar

Stargazers

Whats_in_name avatar Jonathan Barratt avatar  avatar Rogerio Marques avatar

Watchers

 avatar James Cloos avatar  avatar Adrien Brunet avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.