Skip to content

Commit

Permalink
Merge pull request #58 from pinax/django-20
Browse files Browse the repository at this point in the history
Standardize template location to "pinax/teams/"
  • Loading branch information
grahamu authored Jan 20, 2018
2 parents a99c89d + e49d8b8 commit bb46269
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 11 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,31 @@ Iterable excludes teams user is already associated with.
#### pinax_teams.resent_invite


### Templates

#### `signup.html`

#### `team_detail.html`

#### `team_form.html`

#### `team_manage.html`

#### `_invite_form.html`

#### `_membership.html`


### Views


## Change Log

### 1.0.1

* Standardize template location to "pinax/teams/"
* Add template list to documentation

### 1.0.0

* Drop Django v1.8, v.1.9, v1.10 support
Expand Down
20 changes: 10 additions & 10 deletions pinax/teams/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

class TeamSignupView(SignupView):

template_name = "teams/signup.html"
template_name = "pinax/teams/signup.html"

def get_form_class(self):
if self.signup_code:
Expand Down Expand Up @@ -78,7 +78,7 @@ def team_update(request):
return redirect(team.get_absolute_url())
else:
form = TeamForm(instance=team)
return render(request, "teams/team_form.html", {"form": form, "team": team})
return render(request, "pinax/teams/team_form.html", {"form": form, "team": team})


@team_required
Expand All @@ -89,7 +89,7 @@ def team_detail(request):
role = team.role_for(request.user)
if team.member_access == Team.MEMBER_ACCESS_INVITATION and state is None:
raise Http404()
return render(request, "teams/team_detail.html", {
return render(request, "pinax/teams/team_detail.html", {
"team": team,
"state": state,
"role": role,
Expand All @@ -102,7 +102,7 @@ def team_detail(request):

class TeamManageView(TemplateView):

template_name = "teams/team_manage.html"
template_name = "pinax/teams/team_manage.html"

@method_decorator(manager_required)
def dispatch(self, *args, **kwargs):
Expand Down Expand Up @@ -238,7 +238,7 @@ def get_form_success_data(self, form):
"""
data = {
"html": render_to_string(
"teams/_invite_form.html",
"pinax/teams/_invite_form.html",
{
"invite_form": self.get_unbound_form(),
"team": self.team
Expand All @@ -262,7 +262,7 @@ def get_form_success_data(self, form):
data.update({
"append-fragments": {
fragment_class: render_to_string(
"teams/_membership.html",
"pinax/teams/_membership.html",
{
"membership": membership,
"team": self.team
Expand All @@ -288,7 +288,7 @@ def form_valid(self, form):

def form_invalid(self, form):
data = {
"html": render_to_string("teams/_invite_form.html", {
"html": render_to_string("pinax/teams/_invite_form.html", {
"invite_form": form,
"team": self.team
}, context_instance=RequestContext(self.request))
Expand Down Expand Up @@ -317,7 +317,7 @@ def team_member_resend_invite(request, pk):
membership.resend_invite(by=request.user)
data = {
"html": render_to_string(
"teams/_membership.html",
"pinax/teams/_membership.html",
{
"membership": membership,
"team": request.team
Expand All @@ -335,7 +335,7 @@ def team_member_promote(request, pk):
membership.promote(by=request.user)
data = {
"html": render_to_string(
"teams/_membership.html",
"pinax/teams/_membership.html",
{
"membership": membership,
"team": request.team
Expand All @@ -353,7 +353,7 @@ def team_member_demote(request, pk):
membership.demote(by=request.user)
data = {
"html": render_to_string(
"teams/_membership.html",
"pinax/teams/_membership.html",
{
"membership": membership,
"team": request.team
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from setuptools import find_packages, setup

VERSION = "1.0.0"
VERSION = "1.0.1"
LONG_DESCRIPTION = """
.. image:: http://pinaxproject.com/pinax-design/patches/pinax-teams.svg
:target: https://pypi.python.org/pypi/pinax-teams/
Expand Down

0 comments on commit bb46269

Please sign in to comment.