Permalink
Browse files

initial checkin part2, version 0.1

git-svn-id: https://django-mobileadmin.googlecode.com/svn/trunk@3 4ed3a04f-053e-0410-b24d-b35526dee1fc
  • Loading branch information...
1 parent 4ee03e4 commit 35aeca8761bf8ca998123f9b4d66e1804cc01ad8 leidel committed Nov 8, 2007
Showing with 281 additions and 0 deletions.
  1. +17 −0 INSTALL.txt
  2. +94 −0 LICENSE.txt
  3. +46 −0 MANIFEST
  4. +7 −0 MANIFEST.in
  5. +12 −0 README.txt
  6. +47 −0 docs/overview.txt
  7. +58 −0 setup.py
View
17 INSTALL.txt
@@ -0,0 +1,17 @@
+To install django-mobileadmin, run the following command inside this directory:
+
+ python setup.py install
+
+Or if you'd prefer you can simply place the included ``mobileadmin``
+directory somewhere on your Python path, or symlink to it from
+somewhere on your Python path; this is useful if you're working from a
+Subversion checkout.
+
+Please see the `Usage` paragraph in doc/overview.txt for usage details.
+
+Note that this application requires Python 2.3 or later, and a recent
+Subversion checkout of Django. You can obtain Python from
+http://www.python.org/ and Django from http://www.djangoproject.com/.
+
+This install notice was bluntly stolen from James Bennett's registration
+package, http://code.google.com/p/django-registration/
View
94 LICENSE.txt
@@ -0,0 +1,94 @@
+django-mobileadmin
+==================
+
+Copyright (c) 2007, Jannis Leidel
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of the author nor the names of other
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+iUI
+===
+
+Copyright (c) 2007, iUI Project Members
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are
+met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above
+ copyright notice, this list of conditions and the following
+ disclaimer in the documentation and/or other materials provided
+ with the distribution.
+ * Neither the name of the iUI Project nor the names of its
+ contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Django
+======
+
+Copyright (c) 2005, the Lawrence Journal-World
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of Django nor the names of its contributors may be used
+ to endorse or promote products derived from this software without
+ specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
View
46 MANIFEST
@@ -0,0 +1,46 @@
+INSTALL.txt
+LICENSE.txt
+MANIFEST.in
+README.txt
+setup.py
+docs/overview.txt
+mobileadmin/__init__.py
+mobileadmin/loader.py
+mobileadmin/middleware.py
+mobileadmin/media/.DS_Store
+mobileadmin/media/css/main.css
+mobileadmin/media/img/arrow.png
+mobileadmin/media/img/breadcrumb.png
+mobileadmin/media/img/default-bg-reverse.gif
+mobileadmin/media/img/default-bg.gif
+mobileadmin/media/img/nav-bg-reverse.gif
+mobileadmin/media/img/nav-bg.gif
+mobileadmin/media/js/urlify.js
+mobileadmin/templates/admin/404.html
+mobileadmin/templates/admin/505.html
+mobileadmin/templates/admin/base.html
+mobileadmin/templates/admin/change_form.html
+mobileadmin/templates/admin/change_list.html
+mobileadmin/templates/admin/delete_confirmation.html
+mobileadmin/templates/admin/edit_inline_stacked.html
+mobileadmin/templates/admin/edit_inline_tabular.html
+mobileadmin/templates/admin/field_label.html
+mobileadmin/templates/admin/field_line.html
+mobileadmin/templates/admin/index.html
+mobileadmin/templates/admin/invalid_setup.html
+mobileadmin/templates/admin/login.html
+mobileadmin/templates/admin/object_history.html
+mobileadmin/templates/admin/pagination.html
+mobileadmin/templates/admin/submit_line.html
+mobileadmin/templates/admin/auth/user/add_form.html
+mobileadmin/templates/registration/logged_out.html
+mobileadmin/templates/registration/password_change_form.html
+mobileadmin/templates/widget/date_time.html
+mobileadmin/templates/widget/default.html
+mobileadmin/templates/widget/file.html
+mobileadmin/templates/widget/foreign.html
+mobileadmin/templates/widget/many_to_many.html
+mobileadmin/templates/widget/one_to_one.html
+mobileadmin/templatetags/__init__.py
+mobileadmin/templatetags/mobile_admin.py
+mobileadmin/templatetags/mobile_admin_modify.py
View
7 MANIFEST.in
@@ -0,0 +1,7 @@
+include INSTALL.txt
+include LICENSE.txt
+include MANIFEST.in
+include README.txt
+recursive-include docs *
+recursive-include mobileadmin/templates *
+recursive-include mobileadmin/media *
View
12 README.txt
@@ -0,0 +1,12 @@
+===================
+Django Mobile Admin
+===================
+
+This is a drop-in adminstration application for use with Django and the
+iPhone/iPod touch platform. It requires a recent Django SVN checkout and
+currently still depends on the non-newform admin interface.
+
+For more installation instructions please have a look at INSTALL.txt.
+
+Best,
+Jannis
View
47 docs/overview.txt
@@ -0,0 +1,47 @@
+===========================================================
+The Django admin interface optimized for iPhone/iPod touch.
+===========================================================
+
+This is an alternative admin interface for Django for use with the iPhone/iPod
+touch. Some would call it a theme or a skin, but actually it's more than that.
+Well, actually it misses some functionality of the normal admin interface.
+Anyway, it is automatically used for any request which comes from a
+MobileSafari based device by using a nifty midlleware/template construct.
+
+Hope you like it, Jannis.
+
+Installation
+============
+
+Get the source from the application site at::
+
+ http://code.google.com/p/django-mobileadmin/
+
+To install the mobileadmin app, follow these steps:
+
+ 1. Follow the instructions in the INSTALL.txt file
+ 2. Add ``'mobileadmin'`` to your INSTALLED_APPS_ setting.
+ 3. Make sure ``'mobileadmin.loader.load_template_source'`` is in your
+ TEMPLATE_LOADERS_ setting at the first position.
+ 4. Make sure ``'mobileadmin.middleware.MobileAdminMiddleware'`` is in your
+ MIDDLEWARE_CLASSES_ setting on the last place (or the place before the
+ last if you have installed the flat pages contrib app and its
+ ``FlatpageFallbackMiddleware``)
+ 5. Make sure the MOBILEADMIN_MEDIA_PREFIX setting is set to the URL prefix
+ for the mobileadmin media -- CSS, Javascript and images. Just like the
+ ADMIN_MEDIA_PREFIX_ but for the ``media`` directory of the mobileadmin app.
+ Please use a trailing slash.
+ 6. Make sure you've installed the admin contrib app.
+
+.. _INSTALLED_APPS: http://www.djangoproject.com/documentation/settings/#installed-apps
+.. _TEMPLATE_LOADERS: http://www.djangoproject.com/documentation/settings/#template-loaders
+.. _MIDDLEWARE_CLASSES: http://www.djangoproject.com/documentation/settings/#middleware-classes
+.. _ADMIN_MEDIA_PREFIX: http://www.djangoproject.com/documentation/settings/#admin-media-prefix
+
+Support
+=======
+
+Please leave your `questions and problems`_ on the `designated Google Code site`_.
+
+.. _designated Google Code site: http://code.google.com/p/django-mobileadmin/
+.. _questions and problems: http://code.google.com/p/django-mobileadmin/issues/
View
58 setup.py
@@ -0,0 +1,58 @@
+import os
+from distutils.core import setup
+from distutils.command.install import INSTALL_SCHEMES
+
+app_name = 'mobileadmin'
+
+# Tell distutils to put the data_files in platform-specific installation
+# locations. See here for an explanation:
+# http://groups.google.com/group/comp.lang.python/browse_thread/thread/35ec7b2fed36eaec/2105ee4d9e8042cb
+for scheme in INSTALL_SCHEMES.values():
+ scheme['data'] = scheme['purelib']
+
+# Dynamically calculate the version based on app_name.VERSION.
+version_tuple = __import__(app_name).VERSION
+if version_tuple[2] is not None:
+ version = "%d.%d_%s" % version_tuple
+else:
+ version = "%d.%d" % version_tuple[:2]
+
+# Compile the list of packages available, because distutils doesn't have
+# an easy way to do this.
+packages, data_files = [], []
+root_dir = os.path.dirname(__file__)
+if root_dir:
+ os.chdir(root_dir)
+
+for dirpath, dirnames, filenames in os.walk(app_name):
+ # Ignore dirnames that start with '.'
+ for i, dirname in enumerate(dirnames):
+ if dirname.startswith('.'): del dirnames[i]
+ if '__init__.py' in filenames:
+ pkg = dirpath.replace(os.path.sep, '.')
+ if os.path.altsep:
+ pkg = pkg.replace(os.path.altsep, '.')
+ packages.append(pkg)
+ elif filenames:
+ prefix = dirpath[len(app_name)+1:] # Strip "app_name/" or "app_name\"
+ for f in filenames:
+ data_files.append(os.path.join(prefix, f))
+
+setup(name=app_name,
+ version=version,
+ description='The Django admin interface optimized for iPhone/iPod touch.',
+ author='Jannis Leidel',
+ author_email='jannis@leidel.info',
+ url='http://code.google.com/p/django-%s/' % app_name,
+ package_dir={app_name: app_name},
+ packages=packages,
+ package_data={app_name: data_files},
+ zip_safe=False,
+ classifiers=['Development Status :: 4 - Beta',
+ 'Environment :: Web Environment',
+ 'Intended Audience :: Developers',
+ 'License :: OSI Approved :: BSD License',
+ 'Operating System :: OS Independent',
+ 'Programming Language :: Python',
+ 'Topic :: Utilities'],
+ )

0 comments on commit 35aeca8

Please sign in to comment.