-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c5abd47
commit 628b7b2
Showing
55 changed files
with
809 additions
and
985 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
from django.contrib import admin | ||
from django.urls import path, include | ||
from django.views.generic.base import TemplateView | ||
import uuid | ||
|
||
from . import views_organizations | ||
|
||
urlpatterns = [ | ||
|
||
|
||
path(r'<uuid:pk>', views_organizations.organization_profile, name='organization-detail'), | ||
path(r'<slug:slug>', views_organizations.organization_profile, name='organization-detail'), | ||
path(r'', views_organizations.organization_profile, name='organization'), | ||
|
||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import django | ||
from django.shortcuts import render, redirect | ||
from django import forms | ||
from django.http import HttpResponse, JsonResponse | ||
from django.views import generic | ||
from ..models import (Organization, OrganizationUser) | ||
|
||
from django.shortcuts import get_object_or_404, redirect, render | ||
from django.contrib.auth.decorators import login_required | ||
from django.contrib.auth.models import User | ||
|
||
|
||
@login_required | ||
def organization_profile(request, pk = None, slug = None): | ||
if pk: | ||
organization = Organization.objects.get(pk=pk) | ||
elif slug: | ||
organization = Organization.objects.get(slug=slug) | ||
|
||
return render(request, 'organizations/organization_profile.html', {'organization':organization}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.