Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
1392eab
Merge pull request #1 from yawd/master
mwolff44 May 26, 2016
b3599c6
django 1.6 templates compatibility update
mwolff44 May 26, 2016
2d4d620
Bug fixed for oauth2client==2.0.1
mwolff44 May 26, 2016
b13b21e
Readme update
mwolff44 May 26, 2016
d6a1844
templates update + constance admin template added
mwolff44 May 26, 2016
a6c6633
Update admin_forms.py
mwolff44 May 26, 2016
53621cd
update django version requirement
mwolff44 May 26, 2016
810b9ae
add test if models in app
mwolff44 May 26, 2016
d3c5548
Add spanish language
mwolff44 May 26, 2016
297289e
update jquery fancybox 2.1.5
mwolff44 May 26, 2016
c4526f6
django 1.7 compatibility
mwolff44 May 26, 2016
7f9719d
prepare v0.7.2 with django 1.7 compatibility
mwolff44 May 26, 2016
722a9b5
update gitignore
mwolff44 May 27, 2016
6f0eda8
RemovedInDjango18Warning: Options.module_name has been deprecated in …
mwolff44 May 27, 2016
4ca71c4
1.7 compatibility templates - django-revision django-mptpp
mwolff44 May 27, 2016
9d21f8a
add # -*- coding: utf-8 -*-
mwolff44 May 27, 2016
8c1c8ac
1.7 updates
mwolff44 May 27, 2016
ad6c91c
template change
mwolff44 May 27, 2016
a69006a
history url for revison
mwolff44 May 27, 2016
faa1c9d
...
mwolff44 May 27, 2016
723a757
0.7.2
mwolff44 May 27, 2016
d5b6c3b
Update README.rst
mwolff44 May 27, 2016
cd8df63
Update CHANGES.rst
mwolff44 May 27, 2016
f13b6f6
Update settings.py
mwolff44 May 30, 2016
fb2a143
Update changelog.rst
mwolff44 May 30, 2016
e77f98b
django 1.9 warning - appl_label not empty
mwolff44 May 31, 2016
fe120a8
RemovedInDjango19Warning: django.utils.importlib will be removed in D…
mwolff44 May 31, 2016
8325c00
add django 1.8
mwolff44 May 31, 2016
b831ac0
RemovedInDjango19Warning: django.utils.importlib will be removed in D…
mwolff44 May 31, 2016
3ee6632
migrations update
mwolff44 May 31, 2016
d91f4a3
RemovedInDjango19Warning: The django.contrib.admin.util module has be…
mwolff44 May 31, 2016
a464b41
tabular template cleanup
mwolff44 May 31, 2016
65adb71
js updates
mwolff44 Jun 1, 2016
447c48a
js update
mwolff44 Jun 1, 2016
94b8e46
Update setup.py
mwolff44 Oct 14, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/yawd-admin.sublime-workspace
/.pydevproject
/.project
/dist
Expand Down
10 changes: 9 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
Changelog
+++++++++

v.0.7.2, 2016.05.27
===================
Django 1.7 compatibility

v.0.7.1, 2016.05.24
===================
Django 1.6 compatibility

v.0.7.0, 2013.10.23
===================

Expand Down Expand Up @@ -39,4 +47,4 @@ v.0.6.0, 2013.02.28
v.0.5.0, 2012.11.01
====================

* Initial Release
* Initial Release
40 changes: 24 additions & 16 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
yawd-admin, a django administration website
======================================================

yawd-admin now has a live demo at
`http://yawd-admin.yawd.eu/ <http://yawd-admin.yawd.eu/>`_.
Use demo / demo as username & passowrd.

.. image:: docs/yawd-admin-screenshot.png
:align: center

`yawd-admin <http://yawd.eu/open-source-projects/yawd-admin/>`_ is an
yawd-admin is an
administration website for django. It extends the default django admin
site and offers the following:

Expand All @@ -22,23 +18,35 @@ site and offers the following:
* Mechanism for opening the original django admin popup windows with fancybox
* Seamless integration with `yawd-translations` for multilingual admin websites

.. note::
History
==============

master (dev)
++++++++++++
is developped under django 1.8.x and does NOT work with older Django releases.

v0.7.2
++++++++++++
is developped under django 1.7.x and does NOT work with older Django releases.

v0.7.1
++++++++++++
is developped under django 1.6.x and does NOT work with older Django releases.

v0.7.0
++++++
is developed under Django 1.5.x and does NOT work with older Django releases.

v0.6.1
++++++

yawd-admin v0.6.1 is the last version intended to work with
Django 1.4. yawd-admin v.0.7.0 and on is developed under Django 1.5.x
and does NOT work with older Django releases. For those still using
Django 1.4, you can checkout the ``0.6.x`` branch or use the yawd-admin
v0.6.1 pypi package. New features will not be backported to the ``0.6.x``
branch. Since many of us run production systems tied to Django 1.4, both
v0.6.1 and the latest documentation will be online on readthedocs.org.
is the last version intended to work with Django 1.4. New features will not be backported to the ``0.6.x`` branch. Since many of us run production systems tied to Django 1.4, both v0.6.1 and the latest documentation will be online on readthedocs.org.

Usage and demo
==============

See the `yawd-admin documentation <http://yawd-admin.readthedocs.org/en/latest/>`_
for information on how to install the demo and use yawd-admin. There is also an
online version of the demo at `http://yawd-admin.yawd.eu/ <http://yawd.eu/open-source-projects/yawd-admin/>`_.
Just use *demo*/*demo* as username and password.
for information on how to install the demo and use yawd-admin.

Screenshots
===========
Expand Down
10 changes: 10 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
Changelog
+++++++++

v.0.7.2, 2016.05.27
---------------------

* Django 1.7 compatibility

v.0.7.1, 2016.05.24
---------------------

* Django 1.6 compatibility

v.0.7.0, 2013.10.23
---------------------

Expand Down
2 changes: 1 addition & 1 deletion example_project/example_project/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)

SECRET_KEY = '6()e7x_%6*@(_nm$ke)g!ellg)pffm*=288trl)@3u=@l$@5qn'
SECRET_KEY = '6()e7x_%6*@(_nm$ke)g!ellg)pffm*=288trl)@3u=@l$@5qnm'

MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
Expand Down
52 changes: 26 additions & 26 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@
from setuptools import setup, find_packages

setup(
name='yawd-admin',
url='http://yawd.eu/open-source-projects/yawd-admin/',
version = '0.7.1-rc1',
description='An administration website for Django',
long_description=open('README.rst', 'rt').read(),
author='yawd',
author_email='info@yawd.eu',
packages=find_packages(),
license='BSD',
classifiers = [
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Software Development :: Libraries'
],
include_package_data = True,
install_requires = [
"httplib2",
"django >= 1.5",
"oauth2client"
],
zip_safe=False
name='yawd-admin',
url='http://yawd.eu/open-source-projects/yawd-admin/',
version='0.7.3',
description='An administration website for Django',
long_description=open('README.rst', 'rt').read(),
author='yawd',
author_email='info@yawd.eu',
packages=find_packages(),
license='BSD',
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Software Development :: Libraries'
],
include_package_data=True,
install_requires=[
"httplib2",
"django >=1.6, <1.9",
"oauth2client"
],
zip_safe=False
)
8 changes: 4 additions & 4 deletions yawdadmin/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
__version__ = '0.7.1-rc1'

from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.utils.importlib import import_module
from importlib import import_module
from yawdadmin.sites import YawdAdminSite

__version__ = '0.7.2'


def _get_site():
yawdadmin_site = getattr(settings, 'ADMIN_SITE', YawdAdminSite)
Expand All @@ -19,5 +19,5 @@ def _get_site():


if not isinstance(admin_site, YawdAdminSite):
raise ImproperlyConfigured('The specified admin site is not a subclass of '\
raise ImproperlyConfigured('The specified admin site is not a subclass of'\
'yawdadmin.sites.YawdAdminSite')
35 changes: 21 additions & 14 deletions yawdadmin/admin.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

import json
from django.conf.urls import patterns, url
from django.contrib import admin
from django.contrib.admin.options import InlineModelAdmin
from django.contrib.admin.util import unquote, get_deleted_objects
from django.contrib.admin.options import InlineModelAdmin
try:
from django.contrib.admin.utils import unquote, get_deleted_objects
except ImportError: # Django < 1.7
from django.contrib.admin.util import unquote, get_deleted_objects
from django.core.exceptions import PermissionDenied
from django.db import router
from django.http import Http404
Expand All @@ -15,8 +21,8 @@
from forms import PopupInlineFormSet


try: #django 1.6 and above
from django.contrib.admin.options import IS_POPUP_VAR #@UnresolvedImport
try: # django 1.6 and above
from django.contrib.admin.options import IS_POPUP_VAR # @UnresolvedImport
except:
IS_POPUP_VAR = '_popup'

Expand All @@ -33,12 +39,13 @@ class PopupInline(InlineModelAdmin):
class PopupModelAdmin(admin.ModelAdmin):
linked_inline = None
popup_only = False

def add_view(self, request, form_url='', extra_context=None):
if self.popup_only and not IS_POPUP_VAR in request.REQUEST:
raise Http404

return super(PopupModelAdmin, self).add_view(request, form_url, extra_context)

return super(PopupModelAdmin, self).add_view(request,
form_url, extra_context)

def ajaxdelete_view(self, request, object_id):
"The 'delete' admin view for this model."
Expand Down Expand Up @@ -71,11 +78,11 @@ def ajaxdelete_view(self, request, object_id):
self.delete_model(request, obj)

return HttpResponse('<html><body>OK</body></html>')

def change_view(self, request, object_id, form_url='', extra_context=None):
if self.popup_only and not IS_POPUP_VAR in request.REQUEST:
raise Http404

return super(PopupModelAdmin, self).change_view(request, object_id,
form_url, extra_context)

Expand All @@ -84,7 +91,7 @@ def formfield_for_dbfield(self, db_field, **kwargs):
Override foreignkey widget if popup and field matches fk_name
"""
formfield = super(PopupModelAdmin, self).formfield_for_dbfield(db_field,
**kwargs)
**kwargs)

request = kwargs.pop("request", None)
fk_name = request.GET.get('fk_name')
Expand All @@ -103,7 +110,7 @@ def get_urls(self):
"""
urls = super(PopupModelAdmin, self).get_urls()

info = self.model._meta.app_label, self.model._meta.module_name
info = self.model._meta.app_label, self.model._meta.model_name
my_urls = patterns('',
url(r'^(.+)/ajax/delete/$',
self.admin_site.admin_view(self.ajaxdelete_view),
Expand Down Expand Up @@ -172,7 +179,7 @@ def get_urls(self):
"""
urls = super(SortableModelAdmin, self).get_urls()

info = self.model._meta.app_label, self.model._meta.module_name
info = self.model._meta.app_label, self.model._meta.model_name
my_urls = patterns('',
url(r'^sortables/$',
self.admin_site.admin_view(self.sortables),
Expand All @@ -188,7 +195,7 @@ def get_urls(self):

def _reorder(self, data, request):
data = dict([(str(d['pk']), d) for d in data])

data_objects = self.model.objects.filter(pk__in=data.keys())
for item in data_objects:
data[str(item.pk)]['object'] = item
Expand Down Expand Up @@ -218,7 +225,7 @@ def sortables(self, request):
else 'admin/sortables/list.html',
{'mptt': self.sortable_mptt,
'objects': self.sortables_ordered(self.queryset(request))})

def reorder(self, request):
if not request.POST.get('data', None):
return HttpResponse(json.dumps({'message': _('No data sent with the request')}))
Expand Down
5 changes: 3 additions & 2 deletions yawdadmin/admin_forms.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# -*- coding: utf-8 -*-
from django import forms
from django.contrib.auth import get_user_model
from django.contrib.auth.models import User


class AdminUserModelForm(forms.ModelForm):
class Meta:
model = get_user_model()
model = User
fields = ('username', 'first_name', 'last_name', 'email')
Loading