try:  #modern Django 1.5+ / 1.6 usage
    from django.conf.urls import patterns, url
except ImportError: # support the old way, for the sake of
    #older Django-1.3 apps like UCL
    from django.conf.urls.defaults import patterns, url
    
import views
from models import Image, Tag, Size
from rldjango.common.rest import RestInterface

# from apps.imadj.views import root, imageGallery, addImage
urlpatterns = patterns('',
    #(r'^add/', views.upload),

    url(r'api/(.*)', RestInterface(classes=[Image, Tag, Size])),
 
 
    #default view is the gallery
    (r'^$', views.imageGallery),
 
    #adding images is a 2-step process
    #GET /imadj/addimage/ brings up a form....
    #POST back to it and it checks.
    (r'^addimage/', views.addImage),
   
    #if above succeeded, we show it...
    (r'^preview/(?P<image_ref>.*)', views.previewNewImages),
    
    #display image details
    (r'^image/(?P<image_ref>.*)/', views.show_image_details),
    
    #support for ajaxy stuff   
    (r'^autocomplete/tags/$', views.autocomplete_tags),
    
    #allow transitions to be tested easily before plugging into other apps
    (r'^transition/(?P<ref>.*)/', views.test_transition),
)
