My favorites | Sign in
Project Logo
                
Search
for
Updated Sep 04, 2008 by justin.driscoll
Labels: Featured
ReadMe  

Installation

Downloading Photologue

Offical releases are available from: http://code.google.com/p/django-photologue/

Source Distribution

Download the .zip distribution file and unpack it. From within the extracted directory run the following command:

python setup.py install

Tracking the Development Version

The current development version of Photologue can be checked out via Subversion from the project site using the following command:

    svn checkout http://django-photologue.googlecode.com/svn/trunk/ photologue-trunk

Then either copy the photologue-trunk/photologue directory or create a symlink to the photologue-trunk/photologue directory somewhere on your python path, such as your Django project or site-packages directory.

You can verify Photologue is available to your project by running the following commands from within your project directory:

    manage.py shell

    >>> import photologue
    >>> photologue.VERSION
    (2, 0, 'rc1')

Configure Your Django Settings

Add 'photologue' to your INSTALLED_APPS setting:

    INSTALLED_APPS = (
         # ...other installed applications,
         'photologue',
    )

Confirm that your MEDIA_ROOT and MEDIA_URL settings are correct.

Register Photologue with the Django Admin

Add the following to your projects urls.py file:

    from django.contrib import admin

    admin.autodiscover()

Sync Your Database

Run the Django 'syndb' command to create the appropriate tables. After the database in initialized, run the following command to initialize Photologue:

    python manage.py plinit

Instant Photo Gallery

To use the included photo gallery templates and views you need to first add photologue to your projects urls.py file.

    # urls.py:
    urlpatterns += patterns('',
        (r'^admin/(.*)', admin.site.root),
        (r'^photologue/', include('photologue.urls')),
    )

Once your urls are configured you need to copy the directory photologue/templates/photologue to your projects "templates" directory:

    myproject/
        myapp/
            ...
        templates/
            photologue/
                ...

If you'd rather, you can also add the absolute path to the photologue/templates directory to your TEMPLATE_DIRS setting.

    # settings.py:
    TEMPLATE_DIRS = ('/path/to/photologue/templates',)

Additional Documentation and Support

Offical docs:

    http://code.google.com/p/django-photologue/w/list

If you have any questions or need help with any aspect of Photologue please feel free to join the discussion group:

    http://groups.google.com/group/django-photologue

Comment by theodore.witkamp, Jun 14, 2009

A base.html files needs to be defined, So that the templates will render.

Comment by balu.vemu, Jun 27, 2009

Good to have a document say a 2 page document describing the views and a demo django project with basic working code and html

Thanks Subramanyam

Comment by peterschoenster, Jul 05, 2009

Just a note on using the Image library. I was receiving this error "decoding error when reading image file" and this time I could not use google to find the answer. The image library installed and the tests passed and in a python shell I could open/load and get details on a jpeg but when trying to load a jpeg I was getting the error above. I don't know where I missed it but I had 2 libjpeg versions on my system. Ran "lsof | grep libjpeg" and apache was using /usr/lib/libjpeg.so.62.0.0 and the python shell was using /usr/local/lib/libjpeg.so.7.0.0 Once I changed the symlinks to point to 7.0.0 the reading of jpeg files worked.

Comment by angela.lobefaro, Jul 21, 2009

Hi, what i need to put inside base.html ? Thanks

this is the error i receive Template u'base.html' cannot be extended, because it doesn't exist

and this is what i put inside base.html

<html>

<head>
<title>Photologue</title> <meta content=""> <style></style>
</head> <body></body>
</html>

Comment by markmuetz, Jul 28, 2009

Very simple base.html, should display title and photo and nothing else:

<html>
    <head>
        <title>{% block title %}{% endblock %}</title>
    </head>
    <body>
        {% block content %}{% endblock %}
    </body>
</html>
Comment by gustavosenise, Sep 21, 2009

I dont understand the MEDIA_URL parameter. I mean, I already have a MEDIA_ROOT configured to /some/path/where/the/zip/should/be/kept, ok. But whats the MEDIA_URL for? Should I have a url configured to the MEDIA_ROOT, is it?

Thanks!

Comment by aaronkwilliamson, Oct 18, 2009

Photologue seems to install OK (although there are definitely some gaps in the instructions above for the novice Django user), but it doesn't display any of the images. Images upload to the media directory ok, and the template displays, but the HREF for the images is obviously pointed to the wrong directory, so none of the images display. Tips? I've worked through the README several times and I'm at my wit's end.

Comment by justin.driscoll, Oct 19, 2009

There's a Google group set up for support requests and questions: http://groups.google.com/group/django-photologue

It sounds like your MEDIA_ROOT or MEDIA_URL settings are incorrect.


Sign in to add a comment
Hosted by Google Code