Ejemplo n.º 1
0
from django.conf.urls.defaults import patterns, include, url
from django.contrib import admin
import tastypie.api
import donormatch.api
api = tastypie.api.Api(api_name='v1')
api.register(donormatch.api.UserResource())
admin.autodiscover()

urlpatterns = patterns(
    '',
    url(r'^$', 'donormatch.views.home', name='home'),

    # Django social auth https://github.com/omab/django-social-auth
    url(r'', include('social_auth.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
    (r'^logout$', 'django.contrib.auth.views.logout'),

    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),
    url(r'^api/', include(api.urls)),
)
Ejemplo n.º 2
0
from django.conf.urls.defaults import patterns, include, url
from django.contrib import admin
import tastypie.api
import donormatch.api
api = tastypie.api.Api(api_name='v1')
api.register(donormatch.api.UserResource())
admin.autodiscover()

urlpatterns = patterns('',
    url(r'^$', 'donormatch.views.home', name='home'),

    # Django social auth https://github.com/omab/django-social-auth
    url(r'', include('social_auth.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
    (r'^logout$', 'django.contrib.auth.views.logout'),

    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),
    url(r'^api/', include(api.urls)),
)
Ejemplo n.º 3
0
Archivo: res.py Proyecto: teamaac/GL
        queryset      = gestion.models.ProduitVersionComposantVersion.objects.all()
        resource_name = 'ProduitVersionComposantVersionResource'

class TypeComposantResource(tastypie.resources.ModelResource):
    def determine_format(self, request): 
        return "application/json" 
    class Meta:
        queryset      = gestion.models.TypeComposant.objects.all()
        resource_name = 'TypeComposantResource'

class VersionLogicielResource(tastypie.resources.ModelResource):
    def determine_format(self, request): 
        return "application/json" 
    class Meta:
        queryset      = gestion.models.VersionLogiciel.objects.all()
        resource_name = 'VersionLogicielResource'


api = tastypie.api.Api(api_name=settings.API_NAME)
api.register(ClientResource())
api.register(ComposantResource())
api.register(ComposantVersionResource())
api.register(EtatResource())
api.register(LicenceResource())
api.register(NatureResource())
api.register(ProduitResource())
api.register(ProduitVersionResource())
api.register(ProduitVersionComposantVersionResource())
api.register(TypeComposantResource())
api.register(VersionLogicielResource())