mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-25 19:14:03 +03:00
Drop Support for django-avatar [not compatible with django 1.8]
- makes the whole cookie lighter and acceptable to wider community - redues cookie maintainance buren
This commit is contained in:
parent
948200f4cf
commit
3abb87acbc
|
@ -27,7 +27,6 @@ Features
|
|||
* 12-Factor_ based settings via django-environ_
|
||||
* Optimized development and production settings
|
||||
* Registration via django-allauth_
|
||||
* User avatars via django-avatar_
|
||||
* Procfile_ for deploying to Heroku
|
||||
* Grunt build for compass and livereload
|
||||
* Basic e-mail configurations for send emails via SendGrid_
|
||||
|
|
|
@ -36,7 +36,6 @@ DJANGO_APPS = (
|
|||
)
|
||||
THIRD_PARTY_APPS = (
|
||||
'crispy_forms', # Form layouts
|
||||
'avatar', # for user avatars
|
||||
'allauth', # registration
|
||||
'allauth.account', # registration
|
||||
'allauth.socialaccount', # registration
|
||||
|
|
|
@ -21,9 +21,6 @@ urlpatterns = patterns('', # noqa
|
|||
url(r'^users/', include("{{ cookiecutter.repo_name }}.users.urls", namespace="users")),
|
||||
url(r'^accounts/', include('allauth.urls')),
|
||||
|
||||
# Uncomment the next line to enable avatars
|
||||
url(r'^avatar/', include('avatar.urls')),
|
||||
|
||||
# Your stuff: custom urls includes go here
|
||||
|
||||
|
||||
|
|
|
@ -27,9 +27,6 @@ psycopg2==2.6
|
|||
unicode-slugify==0.1.3
|
||||
django-autoslug==1.7.2
|
||||
|
||||
# Useful things
|
||||
django-avatar==2.0
|
||||
|
||||
# Time zones support
|
||||
pytz==2015.2
|
||||
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
{% raw %}
|
||||
{% extends "avatar/base.html" %}
|
||||
{% load i18n avatar_tags %}
|
||||
{% load url from future %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<h2>{% trans "Your current avatar: " %}</h2>
|
||||
{% avatar user %}
|
||||
{% if not avatars %}
|
||||
<p>{% trans "You haven't uploaded an avatar yet. Please upload one now." %}</p>
|
||||
{% endif %}
|
||||
<form enctype="multipart/form-data" method="POST" action="{% url 'avatar_add' %}">
|
||||
{{ upload_avatar_form.as_p }}
|
||||
<p>{% csrf_token %}<input type="submit" value="{% trans "Upload New Image" %}" /></p>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endraw %}
|
|
@ -1 +0,0 @@
|
|||
{% raw %}<img src="{{ url }}" width="{{ size }}" height="{{ size }}" class="img-thumbnail">{% endraw %}
|
|
@ -1,5 +0,0 @@
|
|||
{% raw %}{% extends "base.html" %}
|
||||
|
||||
{% block title %}django-avatar{% endblock %}
|
||||
{% block content %}{% endblock %}
|
||||
{% endraw %}
|
|
@ -1,29 +0,0 @@
|
|||
{% raw %}{% extends "avatar/base.html" %}
|
||||
{% load i18n avatar_tags %}
|
||||
{% load url from future %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<h2>{% trans "Your current avatar: " %}</h2>
|
||||
{% avatar user %}
|
||||
{% if not avatars %}
|
||||
<p>{% trans "You haven't uploaded an avatar yet. Please upload one now." %}</p>
|
||||
{% else %}
|
||||
<form method="POST" action="{% url 'avatar_change' %}">
|
||||
<ul>
|
||||
{{ primary_avatar_form.as_ul }}
|
||||
</ul>
|
||||
<p>{% csrf_token %}<input type="submit" value="{% trans "Choose new Default" %}" /></p>
|
||||
</form>
|
||||
{% endif %}
|
||||
<form enctype="multipart/form-data" method="POST" action="{% url 'avatar_add' %}">
|
||||
{{ upload_avatar_form.as_p }}
|
||||
<p>{% csrf_token %}<input type="submit" value="{% trans "Upload New Image" %}" /></p>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endraw %}
|
|
@ -1,25 +0,0 @@
|
|||
{% raw %}{% extends "avatar/base.html" %}
|
||||
{% load i18n %}
|
||||
{% load url from future %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<h2>{% trans "Please select the avatars that you would like to delete." %}</h2>
|
||||
{% if not avatars %}
|
||||
{% url 'avatar_change' as avatar_change_url %}
|
||||
<p>{% blocktrans %}You have no avatars to delete. Please <a href="{{ avatar_change_url }}">upload one</a> now.{% endblocktrans %}</p>
|
||||
{% else %}
|
||||
<form method="POST" action="{% url 'avatar_delete' %}">
|
||||
<ul>
|
||||
{{ delete_avatar_form.as_ul }}
|
||||
</ul>
|
||||
<p>{% csrf_token %}<input type="submit" value="{% trans "Delete These" %}" /></p>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endraw %}
|
|
@ -1,5 +1,4 @@
|
|||
{% raw %}{% extends "base.html" %}
|
||||
{% load avatar_tags %}
|
||||
{% load static %}
|
||||
|
||||
{% block title %}User: {{ object.username }}{% endblock %}
|
||||
|
@ -15,13 +14,12 @@
|
|||
</div>
|
||||
|
||||
{% if object == request.user %}
|
||||
<!-- Action buttons -->
|
||||
<!-- Action buttons -->
|
||||
<div class="row">
|
||||
|
||||
<div class="col-sm-12 ">
|
||||
<a class="btn btn-primary" href="{% url 'users:update' %}">My Info</a>
|
||||
<a class="btn btn-primary" href="{% url 'account_email' %}">E-Mail</a>
|
||||
<a class="btn btn-info" href="{% url 'avatar_change' %}">Avatar</a>
|
||||
<!-- Your Stuff: Custom user template urls -->
|
||||
</div>
|
||||
|
||||
|
@ -32,4 +30,4 @@
|
|||
|
||||
</div>
|
||||
{% endblock content %}
|
||||
{% endraw %}
|
||||
{% endraw %}
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
{% raw %}{% extends "base.html" %}
|
||||
{% load static %}{% load i18n %}
|
||||
{% load avatar_tags %}
|
||||
|
||||
{% block title %}Members{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class="container">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<h2>Users</h2>
|
||||
|
@ -19,15 +17,15 @@
|
|||
<div class="list-group">
|
||||
{% for user in user_list %}
|
||||
<a href="{% url 'users:detail' user.username %}" class="list-group-item">
|
||||
<h4 class="list-group-item-heading">{% avatar user %} {{ user.username }}</h4>
|
||||
<h4 class="list-group-item-heading">{{ user.username }}</h4>
|
||||
<p class="list-group-item-text">{{ maker.tagline }}</p>
|
||||
</a>
|
||||
{% endfor %}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock content %}{% endraw %}
|
||||
{% endblock content %}{% endraw %}
|
||||
|
|
Loading…
Reference in New Issue
Block a user