This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!
Project Description

django-initialcon is a small django application for generating small colourful icons for users profile pictures. Project is hosted on Github https://github.com/bettsmatt/django-initialcon

Quick start

  1. Install using PIP:

    pip install django-initialcon
    
  2. Add ‘initialcon’ to INSTALLED_APPS:

    INSTALLED_APPS = {
        ...
        'initialcon',
    }
    
  3. Include the initialcon URLconf in __init__.py:

    url(r'^initialcon/', include('initialcon')),
    
  4. Add font config to your settings.py:

    INITIALCON_FONTS = {
        'default': <pathtofont>),
        'alt': <pathtofont>)
    }
    
  5. Run the development server and test everything works by accessing http://127.0.0.1:8000/initialcon/test%20name

Configuration

Along with the fonts used the default size, maximum size and colors can be set by adding the following to your settings.py.:

INITIALCON_SIZE = 100
INITIALCON_SIZE_MAX = 200)
INITIALCON_COLORS = [
    (153,180,51), (0,163,0), (30,113,69), (255,0,151), (45,137,239),
    (159,0,167), (0,171,169), (185,29,71),(227,162,26), (255,196,13),
    (126,56,120), (96,60,186), (43,87,151), (218,83,44), (238,17,17)
]
INITIALCON_FONTS = {
    'default': <pathtofont>),
    'alt': <pathtofont>)
}

Example URLs

  1. Basic:

    localhost:8000/initialcon/test%20name
    
  2. Custom size:

    localhost:8000/initialcon/test%20name?size=200
    
  3. Custom font:

    localhost:8000/initialcon/test%20name?font=alt
    
  4. Custom size and font:

    localhost:8000/initialcon/test%20name?size=200&font=alt
    

Example code

Template:

<img src="{{img.getImage}}" />

Code:

class MyModel(model.Models):

    image = ...
    name = ...

    def getImage(self):
        if self.image:
            ...
        else:
             return reverse('initialcon:generate', args=[self.name])
Release History

Release History

0.1.6

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.4

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.3

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1.2

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django-initialcon-0.1.6.tar.gz (14.5 kB) Copy SHA256 Checksum SHA256 Source Jul 8, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting