Skip to main content

A Django app to display lab personnel and information about them.

Project description

django-lab-members is a Django app to display lab personnel and information about them. This app can be extended by djangocms-lab-members for use with django CMS.

Source code is available on GitHub at mfcovington/django-lab-members. Information about and source code for djangocms-lab-members is available on GitHub at mfcovington/djangocms-lab-members.

Installation

PyPI

pip install django-lab-members

GitHub (development branch)

pip install git+http://github.com/mfcovington/django-lab-members.git@develop

Configuration

  • Edit the project’s settings.py file.

    • Add lab_members and its dependencies to your INSTALLED_APPS setting:

      INSTALLED_APPS = (
          # ...
          'lab_members',
          'easy_thumbnails',
          'filer',
          'mptt',
          'sekizai',
          'friendlytagloader',
      )
    • Specify your media settings, if not already specified:

      MEDIA_URL = '/media/'
      MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
    • Add easy_thumbnail settings:

      # For easy_thumbnails to support retina displays (recent MacBooks, iOS)
      THUMBNAIL_HIGH_RESOLUTION = True
      THUMBNAIL_QUALITY = 95
      THUMBNAIL_PROCESSORS = (
          'easy_thumbnails.processors.colorspace',
          'easy_thumbnails.processors.autocrop',
          'filer.thumbnail_processors.scale_and_crop_with_subject_location',
          'easy_thumbnails.processors.filters',
      )
      THUMBNAIL_PRESERVE_EXTENSIONS = ('png', 'gif')
      THUMBNAIL_SUBDIR = 'versions'
    • Add sekizai settings:

      • For Django 1.7, add sekizai.context_processors.sekizai to TEMPLATE_CONTEXT_PROCESSORS:

        from django.conf.global_settings import TEMPLATE_CONTEXT_PROCESSORS
        TEMPLATE_CONTEXT_PROCESSORS += ('sekizai.context_processors.sekizai',)
      • For Django 1.8, add sekizai.context_processors.sekizai to TEMPLATES:

        TEMPLATES = [
            {
                # ...
                'OPTIONS': {
                    'context_processors': [
                        # ...
                        'sekizai.context_processors.sekizai',
                    ],
                },
            },
        ]
  • Include URL configurations for lab_members and media (if DEBUG == True) in your project’s urls.py file:

    • For Django 1.7:

      # ...
      from django.conf import settings
      
      urlpatterns = patterns('',
          # ...
          url(r'^lab_members/', include('lab_members.urls', namespace='lab_members')),
          # ...
      )
      
      if settings.DEBUG:
          urlpatterns += patterns('',
              (r'^media/(?P<path>.*)$', 'django.views.static.serve', {
              'document_root': settings.MEDIA_ROOT}))
    • For Django 1.8:

      # ...
      from django.conf import settings
      from django.conf.urls.static import static
      
      urlpatterns = [
          # ...
          url(r'^lab_members/', include('lab_members.urls', namespace='lab_members')),
          # ...
      ]
      
      if settings.DEBUG:
          urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

Migrations

Create and perform migrations for lab_members and its dependencies:

python manage.py makemigrations lab_members
python manage.py migrate

Usage

  • Start the development server:

python manage.py runserver
  • Login and add a scientist: http://localhost:8000/admin/lab_members/scientist/add/

  • Visit: http://127.0.0.1:8000/lab_members/

Version 0.3.0

Revision History

0.3.0 2015-11-10

  • Add current title and institution for alumni

  • Allow multiple co-advisors for an Education/Employment record

  • Move Scientist’s research interests before personal interests

  • Prevent deletion of an object in a one-to-many relationship with another object

    • Exception: deleting a scientist will delete related education/employment records

  • Override OS X’s hidden scrollbars for Employment/Education tables on narrow screens

  • Improve related names for FKs and many-to-many fields

  • Fix Scientist’s website link

  • Fix disappearing sidebar placeholder when CMS is placed in ‘Structure’ mode

  • Resolve Django 1.8 warnings

  • Add usage instructions for Django 1.8 compatibility

  • Prepare for distribution via PyPI

0.2.5 2015-05-22

  • Add Scientist publications placeholder

  • Add Admin models for Education/Employment Records

  • Fix ordering of Education/Employment Records

0.2.4 2015-05-08

  • Display Scientist only if visible == True

  • Prevent higher resolution photos from being wider than 300px

  • Fix linking to Lab Alumni subsection

  • Validate that Employment/Education ‘Year Started’ <= ‘Year Ended’

  • Open advisor’s link in a new window

  • Make alumni link more prominent

  • Add website field for Scientist & display below email address

  • Move sidebar to modal for smaller screens

  • Minor behind-the-scenes improvements

0.2.3 2015-04-29

  • Make profile thumbnails equal heights (within row) to account for long names

  • Use django-friendly-tag-loader to load and use django CMS tags if they are available

  • Use 2x resolution photos (for retina, etc. displays)

0.2.2 2015-04-21

  • Add Scientist sidebar placeholder if CMS for medium+ screens

  • Improve styling

0.2.1 2015-04-19

  • Improve styling

0.2.0 2015-04-10

  • Allow integration with django CMS using djangocms-lab-members

0.1.0 2015-04-08

  • A Django app to display lab personnel and information about them

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-lab-members-0.3.0.tar.gz (16.9 kB view hashes)

Uploaded Source

Built Distribution

django_lab_members-0.3.0-py32-none-any.whl (22.2 kB view hashes)

Uploaded Python 3.2

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page