Usage

Add a Weeny Site

The weeny is using the django.contrib.sites app in order to wire up URL’s.

  1. In the django admin interface, click the Add new weeny site icon to get started.

    _images/add_weeny_site1.png
  2. Site

    From the drop-down, select the site you wish to associate your URL’s with. It is important that this domain is the domain you are hosting your site on. When URL redirection occurs, this is the domain which will be used.

    _images/add_weeny_site2.png
  3. Short domain name

    Enter the short domain name for this site. This option is not used unless you check the Redirect to short domain option below. You’ll also need to register a real hostname and make sure it points to this site for this to work.

  4. Redirect to short domain

    Check this if you want your URL’s to redirect to this domain name instead of the Site domain name.

  5. Protocol

    Choose what transport protocol you want the URL’s for this site to use.

  6. Track

    The Track option specifies whether you want to track ALL URL’s for this domain.

  7. The read-only attribute Seed is a unique seed which will be used to generate URL’s for this domain.

Add a Weeny URL

Next step is to add a URL.

  1. Click the Add new Weeny URL icon to get started.

    _images/add_weeny_url1.png
  2. From the drop-down list, choose your weeny site.

    _images/add_weeny_url2.png
  3. Content type and Object ID

    Tip

    If you are not familiar with the Content-Types framework, you might want to read a little about it. It’s awesome, and one of my favorite django features! In short it is a way of creating Generic relations between objects, which means that we can have database relations between any models we’d like without knowing anything about them beforehand. The only requirements is that you know what kind of object it is, and the primary key of the requested object.

    Choose your model and object ID.

    Warning

    The target content object must have a get_absolute_url method implemented!

  4. URL code

    This is the code you’ll append to the short-url.

    For instance, if you wired up weeny.urls.py to /weeny/, the short URL for this object would be /weeny/l/.

  5. Privacy and moderation options

    _images/add_weeny_url3.png

    These options should be pretty self-explanatory.

    • Private URL

      Check this if you’d like user to enter a password to complete the redirect. You’ll also need to enter a password in the password field below.

    • Track

      Enable URL tracking for this URL. If URL tracking is enabled on the related Weeny site, this option does nothing.

    • Active

      Inactive URL’s does not work!

    • Allow revisit

      Uncheck to make URL single use.