Django 1.3 Now Available

Friday, March 25th, 2011

Django 1.3 is now available for hosting.

http://www.djangoproject.com/weblog/2011/mar/23/13/

As always, we’re happy to install any Django plugins you want when we set up your instance.

We can also help build your site, please email info at librehosting.com or joe at same.

j

 

Django 1.2.3 Now Available

Saturday, September 25th, 2010

Django 1.2.3 is now available for ordering here at Libre Hosting.

http://www.djangoproject.com/weblog/2010/sep/10/123/

Simply select “Django 1.2.3″ from the dropdowns when you place your order -

Your VM will be set up to sync to trunk, to allow you to keep up-to-date – easiest way to keep up on point releases and bugfixes.

As always, Satchmo, and any other Django plugins you prefer, are available on request – just put your preferences in the “Notes” field when you place your order.

Satchmo 0.9.1 Now Available

Tuesday, May 25th, 2010

Along with Django 1.2.1, Satchmo 0.9.1 was released yesterday as well:

http://www.satchmoproject.com/blog/2010/may/24/satchmo-0-9-1-release/

Just put it in the “Notes” field when you place your order, and we’ll install it for you, along w8ith whatever other custom Django plugins you need.

j

Django 1.2.1 Now Available

Tuesday, May 25th, 2010

Django 1.2.1 is now available for ordering here at Libre Hosting.

http://www.djangoproject.com/weblog/2010/may/24/121/

Simply select “Django 1.2.1″ from the dropdowns when you place your order -

Your VM will be set up to sync to trunk, to allow you to keep up-to-date – easiest way to keep up on point releases and bugfixes.

As always, Satchmo, and any other Django plugins you prefer, are available on request – just put your preferences in the “Notes” field when you place your order.

j

Django 1.2 Beta Now Available!

Thursday, February 25th, 2010

The upcoming Django 1.2 Beta is now available for ordering here at Libre Hosting.

http://www.djangoproject.com/weblog/2010/feb/06/12-beta-1/

Simply ask for “Django12″ in the “Notes” field when you place your order -

Your VM will be set up to sync to trunk, to allow you to keep up-to-date – all the way through to the release of 1.2 and beyond!

As always, the actual 1.2 release itself will be put into our usual dropdown menus when the final release occurs. In the meantime, just use the “Notes” field.

j

Satchmo 0.9-trunk Now Available

Tuesday, September 22nd, 2009

satchmo-frontDevelopment Version

We are proud to announce that we now support and can install the latest trunk-version (0.9) of Satchmo, installed from Mercurial (aka “hg” - get it?!).

Since it’s installed directly from the VCS, and symlinked into the python path, this allows for updates to the source tree anytime – in other words, instant upgrades (and downgrade, if a problem is encountered!) anytime (depending on your VCS).

Django, and other plugins, are installed this same way, as always – we have done it this way since 2007.

Here is a quick intro on how it’s done – just indicate you want us to install Satchmo in the “notes” field when you place your order, and we’ll get it done for you.

j

Django mod_wsgi now available!

Friday, August 21st, 2009

django-logo-negative-200

Apache Redux

In keeping with the new, recommended Django deployment method of mod_wsgi with Apache , we have migrated our internal processes as well as deployed multiple  new systems this way – and from this point forward, this is how Django (current, 1.1+) will be deployed by default.

We also still fully support the mod_python deployment method, and will be happy to work with you to set up your custom environment, whatever it may be.

Please note that nginx, Lighttpd, and of course Apache with mod_python are also all still available on request.

Just put your request in the “Notes” field when you place your order and we’ll get it done for you.

j

Pinax Instance Now Available

Tuesday, March 31st, 2009

pinax_logoLibre hosters,

We are proud to announce that the Django-based social-network-enabling Pinax project, is now one of our standard instances, and can be hosted here at Libre hosting, with the usual full root access.

Pinax version (as of this writing), is v0.7.0dev, and is installed with svn to be updatable with svn up, as always (and as our Django instances are, by default). Other versions available on request.

All plugins are preinstalled, and enabled, along with the usual list of example Pinax projects:

drwxr-xr-x  7 root root 4096 2009-03-29 05:18 basic_project
drwxr-xr-x 10 root root 4096 2009-03-30 15:38 complete_project
drwxr-xr-x  7 root root 4096 2009-03-29 05:18 intranet_project
drwxr-xr-x  7 root root 4096 2009-03-29 05:18 private_beta_project
drwxr-xr-x  7 root root 4096 2009-03-29 05:18 temp_content_project
drwxr-xr-x  7 root root 4096 2009-03-29 05:18 temp_group_project
drwxr-xr-x  8 root root 4096 2009-03-29 05:18 temp_schedule_project

Apache with mod_python is the default webserver installed, but we will be happy to install Lighttpd on request (or nginx by prearrangement – contact us for details) with mod_wsgi instead.

Our default Pinax installation includes Django svn trunk (~1.1 as of this writing) with all plugins preinstalled by the Pinax installation scripts. We do not install into a Python virtualenv, because this is intended to be a dedicated Pinax / Django installation.  We can make changes accordingly as desired, upon your request.

Pinax really turbocharges the Django framework, and includes (at least) these pluggables:

Here are a few example Pinax sites to show a portion of what it can do:

Let us know what you think,
j

Django 1.1, 1.02, 0.96.3 versions now available

Wednesday, January 7th, 2009

We are pleased to announce that we now have three Django versions available for hosting in any of our plans -

Notes:

  1. Although 1.1 is not yet officially released, trunk is always pretty stable – as projects go, the Django team can be relied upon to keep the trunk tree extremely reliable – we run trunk in production, for example.  For new projects, we recommend this option.
  2. Legacy 0.96.3 is the last release before the 1.0 release which broke backward compatibility – it includes the older admin interface (with nested Admin classes), and the older Signals implementation – which provide a migration hurdle for many production environments – we have several customers and friends still running 0.96.3 until they address these migration issues.  We can also help with this, if you need us.
  3. The official released version, 1.02, is stable, and well-tested.  We recommend this option for those conservative production environments that have full-blown separated test/staging and developent envoironments as well.

As always, if you need a specific legacy version (or a specific trunk svn release for that matter, or release-by-date) we will be happy to install it from svn on request, just plce your request in the “notes” field when you place your order.

We will also happily install any Django packages you desire, as well, on request – try the lists at Django Pluggables and Django Search. Google Code also has a good number of Django-related projects hosted there.

And remember, if you need design, development, or site setup assistance, we are always here to help.

j

Django Admin and TinyMCE HowTo

Monday, December 22nd, 2008

We’ve just rolled out TinyMCE to use with our Django Admin interface.

As we encountered several gotchas along the way, we felt it would be instructive to the community to illustrate the steps here, in true cookbook (aka “HowTo”) fashion.

Here we go…

The Cookbook

Step 1: Add your js to your Model’s Admin definition:

class MyBoffoModelAdmin (admin.ModelAdmin):
    fieldsets  = (
        ... yada yada yada...
        (None, {'classes': ['edit'], 'fields': ('content',)}),
    )
    class Media:
        js = ['/tiny_mce/tiny_mce.js', '/js/textareas.js']

Note:

  • The classes : ['edit'] which tells the code below to set the class for the mcEditor
  • That after the standard include of tiny_mce.js, the second javascript reference in the js list, is your custom init code that you will be writing next.
  • The nested “Class Media” tells the Django Admin interface to include the references to these .js files in the header of the Admin page.

Step 2: Write your initializer Javascript code:

This is the contents of /js/textarea.js:

function mce_setup()
{ tinymce.DOM.addClass (tinymce.DOM.select('.edit .vLargeTextField'), 'mcEdit');

  tinyMCE.init({
    mode : "textareas",
    theme : "advanced",
    editor_selector : "mcEdit",  // doesn't support selectors, only classes, despite the name
    height: "480",
    width: "90%",
    element_format : "html",
    plugins : "preview,fullscreen",
    theme_advanced_buttons3_add : "preview,fullscreen",
    theme_advanced_toolbar_location : "top",
    theme_advanced_toolbar_align : "left",
    theme_advanced_statusbar_location : "bottom",
    //theme_advanced_resizing : true,
  });
};

Notes:

  • This Javascript is executed in the header – and it does NOT initialize the editor yet, it merely defines a function to do so, which is called when the user clicks on a link, which we’ll see next.
  • The “addClass” call at the top is necessary to work properly with Django – despite the ‘editor_selector’ setting in the tinyMCE.init paraeters, this does NOT accept a css selector, only a class – so we have to manually set up a new, unique class, using the tinymce.DOM.select call at the top.
  • The selector of  “.edit .vLargeTextField” pinpoints the actual textarea under the fieldset with the “edit” css class.

Step 3: Add your HTML to the model:

We turn it on using the Django Model Fields’ help_text option, thusly:

content = models.TextField (blank=True, help_text='''HTML Content -
    <a href="javascript:mce_setup();">Click Here</a> to edit - see
    <a href="http://wiki.moxiecode.com/index.php/TinyMCE:Configuration">TinyMCE Configuration</a>
    for more options.''')

That’s it!

When you restart and load the page, you should see

“HTML Content – Click Here to edit – see TinyMCE Configuration for more options.”

at the bottom of the textarea in question that you set the ‘edit’ css class on -  and note that the other javascript isn’t loaded until you actually click on it, speeding load time of the page.

Clicking should quickly load the TinyMCE editor and buttons, resize the text area appropriately, render any HTML with WYSIWIG, and follow page resizes.

The Gotchas

  1. Django doesn’t let you get at the actual textarea class, so you have to do the above selector
  2. TinyMCE’s editor_selector parameter doesn’t use, or work with, selectors (!)
  3. You could use the Django form id, but then this whle precedure wouldn’t be generic, you’d need one init js per field.
  4. You would also need to set up the tinyMCE.init parameters to use ids rather than classes, too.
  5. Setting  “theme_advanced_resizing : true” actually takes away functionality if you have setup up height and width as percentages – which accomplish the same thing with no extra js.
  6. If you’re getting gibberish like “<br mce_bogus />” added to your empty text areas, there are a few things you can do – write us for details – you may need to set up an
    editor_deselector : "mcNoEdit"
  7. and use the appropriate code to add the class at the top of the setup function:
    tinymce.DOM.addClass (tinymce.DOM.select('.vLargeTextField'), 'mcNoEdit');

Useful References

Django Admin Media – Using extra js & css with the Django Admin interface

TinyMCE API – Core API, DOM API including how to find elemnts by selector, and add a class

TinyMCE Examples - Examples with source code including click-to-load, dual/partial textareas, plugin activation, fullscreen, etc

Django Model Documentation – including the help_text option which allows HTML!

Honorable Mention

An Honorable Mention goes to the WYMeditor – an up-and-coming WYSIWYM editor – What You See Is What You Mean – and it’s been getting rave reviews.

It uses a class-based approach, which is intriguing and feel right – it just doesn’t have the polish and full feature set that TinyMCE does right now – but we’ll be exploring this further in a future post, as we’ve already implemented it for a client in Django Admin already :-) , and it works well -

j