background preloader

oEmbed

oEmbed

HowToUseIt - django-oembed - Project Hosting on Google Code Of course, first you must add it to your INSTALLED_APPS: INSTALLED_APPS = ( .... 'oembed',) Then in your template, include the oembed tags {% load oembed_tags %} Then, surround something with the oembed tag. Will result in: There is this great video at <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="320" height="222" id="viddlerplayer-e5cb3aac"><param name="movie" value=" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /><embed src=" width="320" height="222" type="application/x-shockwave-flash" allowScriptAccess="always" allowFullScreen="true" name="viddlerplayer-e5cb3aac" ></embed></object> There is an optional width and height parameter, that can be invoked thusly: {% oembed 320x240 %}...{% endoembed %}

django-gae-rpx - Project Hosting on Google Code Django RPX authentication backend that runs on Google App Engine with App Engine Patch. Inspired by django-rpx and django-newrpx but with support for Google App Engine thru App Engine Patch. You can see a live demo running at 20100308 App Engine Patch is dead Note: New announcement from the App Engine Patch project: "app-engine-patch is no longer being updated". 20090618: Version 0.1 released Introduction This is the alpha release of the Django-RPX-GAE-GAE authentication backend. Known issues/drawbacks that will be fixed No timeout on request to RPX server. Installation instructions Unpack the rpx module in your project. AUTHENTICATION_BACKENDS = ('rpx.backends.RpxBackend', 'django.contrib.auth.backends.ModelBackend') Configure the settings in the settings.py in the rpx module. {% load rpx_tags %}{% rpx_iframe next %}

P2P File Sharing Browser Plugin LittleShoot - BitTorrent - Gnutella Using Django's TemplateTags I've had a number of e-mails about how I include the listing of blog tags and archives by month on the side of my website from people who have obviously built up a blog and now want further integration with their website. Well, it's ultra-simple thanks to a nifty Django feature called template tags. The concept behind template tags is simple - a quick snippet of code in your page templates calls some python code behind the scenes, which does some stuff, and returns either raw HTML code (yuck) or sets new variables in your template context, allowing you to manipulate and display them as you please (cool!) To get started, in the application directory for your blog, create a directory named templatetags and place an empty file in it, named _init.py_. Now, create a file - in this case we'll call it blogmonths.py_. Import the relevant models so we can access the data Create and register new template tag Write the function(s) for that tag so they add data to the template's context.

fíam » Building a website API with Django. Part 1: API functions WAPI and django-oauthsp are reaching the point when they are starting to become useful, so I decided it was time to write some articles explaining how they work and how you can use them in your sites. I'm currently using both of them in production at byNotes and I haven't run into any problems for now, but YMMV. This article talks about the principles behind WAPI and walks you trough the creation of a simple API function. Next articles in this series will explain more advanced concepts like custom serializations, user authentication against django.contrib.auth or using OAuth. Design Let's start by talking about the design ideas behind WAPI. WAPI only requires you to write a class. The code Let's move to the code. class Event ( models . We're going to use the predefined serialization, which includes all the fields defined in the model, so we don't need to talk about wapi.serializers for now. A function with no parameters So, it's time to write the API. A function with parameters

jespern / django-piston / wiki / Home – Bitbucket Get the latest version (0.2.3) here. NEW: Discussion group is hosted on Google Groups. A mini-framework for Django for creating RESTful APIs. Piston is a relatively small Django application that lets you create application programming interfaces (API) for your sites. It has several unique features: Ties into Django's internal mechanisms. NB: OAuth ships with piston for now, but you are not required to use it. Documentation But, examples speak louder than documentation: Fully functional example urls.py: And as for handlers.py: And that's all there's to it. Getting Help Piston is well documented and has an ever-growing FAQ. Go read the Documentation.

DynamicModels - Django - Trac For an updated information about dynamic models in Django 1.2 and later ​checkout this guide. this works with django 0.96. There are some modification that make it hard to adjust it with django version 1.0 As of [5163], Django models can now be created dynamically at run-time, rather than being defined in a Python source file. The basic technique ¶ Internally, Django uses metaclasses to create models based on a class you provide in your source code. Thankfully, Python treats classes like any other object, so we can force this process to occur even when the class wasn't defined in source. model = type(name, (models.Model,), attrs) As you can see, describing a model for the purposes of metaclasses involves three pieces of information: The intended name of the class A tuple containing any classes it inherits from A dictionary containing the attributes of the class This: class Person(models.Model): first_name = models.CharField(max_length=255) last_name = models.CharField(max_length=255) Syncdb ¶

djangoappengine - All Buttons Pressed Deprecation notice: This project has been dead for quite some time. Djangoappengine contains all App Engine backends for Django-nonrel, e.g. the database and email backends. In addition we provide a testapp which contains minimal settings for running Django-nonrel on App Engine. Use it as a starting point if you want to use App Engine as your database for Django-nonrel. Installation Make sure you've installed the App Engine SDK. Clone the following (on those pages you can also download a zip file): If you downloaded zip files then now's the time to unzip everything. Copy the following folders into your project (e.g., django-testapp): django-nonrel/django =><project>/django djangotoolbox/djangotoolbox =><project>/djangotoolbox django-autoload/autoload =><project>/autoload django-dbindexer/dbindexer =><project>/dbindexer djangoappengine =><project>/djangoappengine That's it. <project>/django <project>/djangotoolbox <project>/autoload <project>/dbindexer <project>/djangoappengine Field types

Related: