My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
ReadMe  

Featured
Updated Feb 4, 2010 by justin.d...@gmail.com

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...@gmail.com, Jun 14, 2009

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

Comment by balu.v...@gmail.com, 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 petersch...@gmail.com, Jul 5, 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.l...@gmail.com, 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 markmu...@gmail.com, 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 gustavos...@gmail.com, 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 aaronkwi...@gmail.com, 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 project member justin.d...@gmail.com, 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.

Comment by rbbeltra...@gmail.com, Jun 24, 2010

i've install it and runs fine. however if u find the link images are somewhat broken, check the link/path in dev server log. im my project photologue created a directory in my project root not in the static media directory, moving that directory to media dir fix the problem. hope it helps

Comment by nai...@gmail.com, Dec 22, 2010

I really like how in mezzanine I just:

> easy_install django-mezzanine > mezzanine-project myproject > cd myproject > python manage.py syncdb --noinput > python manage.py runserver (navigate to localhost:8000/admin)

No configuration, no editing files, just run the installation and I have a working site.

Can we get something simple like that for photologue?

Is there any really simple way to integrate photologue functionality in mezzanine or some other such simple blogging site?

Comment by aaronich...@gmail.com, Jul 31, 2011

Error when I try to install django-photologue. python setup.py install. please help

Comment by a.aboell...@gmail.com, Mar 8, 2012
  1. urls.py:
  2. urlpatterns += patterns('',
    (r'^admin/(.)', admin.site.root), (r'^photologue/', include('photologue.urls')),
    )

when i install it i have an error ('NoneType?' object has no attribute 'rindex')

the solution is
we should replace ("admin.site.root") with ("admin.site.urls")

Comment by vezj...@gmail.com, Apr 10, 2012

In django 1.3+ (excerpt from Django docs) local development one should have urls.py similar to this:

from django.conf import settings
from django.conf.urls.static import static

urlpatterns = patterns('',
    # ... the rest of your URLconf goes here ...
) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

Note, the snippet assumes your MEDIA_URL and MEDIA_ROOT are properly set (i.e. '/media/' and '/home/path/to/media/') in settings.py.


Sign in to add a comment
Powered by Google Project Hosting