Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 30.068.262 Times

Dagny 0.2.4

Company: Zachary Voase
Date Added: June 11, 2013  |  Visits: 224

Dagny

Report Broken Link
Printer Friendly Version


Product Homepage
Download (16 downloads)

Dagny is a Django adaptation of Ruby on Rails???*a*?s Resource-Oriented Architecture (a.k.a. ??N*?*?RESTful Rails???*a*?).<br />Dagny makes it really easy to build resourceful web applications.<br /><br />You can read the full documentation here.<br /><br />At present, this project is in an experimental phase, so APIs are very liable to change. You have been warned.<br /><br />P.S.: the name is a reference.<br />Motivation<br /><br />Rails makes building RESTful web applications incredibly easy, because resource-orientation is baked into the framework???*a*?it???*a*?s actually harder to make your app unRESTful.<br /><br />I wanted to build a similar system for Django; one that made it incredibly simple to model my resources and serve them up with the minimum possible code.<br /><br />One of the most important requirements was powerful yet simple content negotiation: separating application logic from the rendering of responses makes writing an API an effortless task.<br /><br />Finally, as strong as Rails???*a*?s inspiration was, it still needed to be consistent with the practices and idioms of the Django and Python ecosystems. Dagny doesn???*a*?t use any metaclasses (yet), and the code is well-documented and readable by most Pythonista???*a*?s standards.<br />Appetizer<br /><br />Define a resource:<br /><br />from dagny import Resource, action<br />from django.shortcuts import get_object_or_404, redirect<br />from polls import forms, models<br /><br />class Poll(Resource):<br /><br /> @action<br /> def index(self):<br /> self.polls = models.Poll.objects.all()<br /><br /> @action<br /> def new(self):<br /> self.form = forms.PollForm()<br /><br /> @action<br /> def create(self):<br /> self.form = forms.PollForm(self.request.POST)<br /> if self.form.is_valid():<br /> self.poll = self.form.save()<br /> return redirect("Poll#show", self.poll.id)<br /><br /> return self.new.render()<br /><br /> @action<br /> def edit(self, poll_id):<br /> self.poll = get_object_or_404(models.Poll, id=int(poll_id))<br /> self.form = forms.PollForm(instance=self.poll)<br /><br /> @action<br /> def update(self, poll_id):<br /> self.poll = get_object_or_404(models.Poll, id=int(poll_id))<br /> self.form = forms.PollForm(self.request.POST, instance=self.poll)<br /> if self.form.is_valid():<br /> self.form.save()<br /> return redirect("Poll#show", self.poll.id)<br /><br /> return self.edit.render()<br /><br /> @action<br /> def destroy(self, poll_id):<br /> self.poll = get_object_or_404(models.Poll, id=int(poll_id))<br /> self.poll.delete()<br /> return redirect("Poll#index")<br /><br />Create the templates:<br /><br /><br /><br /> {% for poll in self.polls %}<br /> <li>{{ poll.name }}</li><br /> {% endfor %}<br /><br /><p>Create a poll</p><br /><br /><br /><br /> {% csrf_token %}<br /> {{ self.form.as_p }}<br /> <br /><br /><br /><br /><p>Name: {{ self.poll.name }}</p><br /><p>Edit this poll</p><br /><br /><br /><br /> {% csrf_token %}<br /> {{ self.form.as_p }}<br /> <br /><br /><br />Set up the URLs:<br /><br />from django.conf.urls.defaults import *<br />from dagny.urls import resources<br /><br />urlpatterns = patterns('',<br /> (r'^polls/', resources('polls.resources.Poll', name='Poll')),<br />)<br /><br />Done.<br />Example Project<br /><br />There???*a*?s a more comprehensive example project which showcases a user management app, built in very few lines of code on top of the standard django.contrib.auth app.<br /><br />To get it running:<br /><br />git clone 'git://github.com/zacharyvoase/dagny.git'<br />cd dagny/<br />pip install -r REQUIREMENTS # Installs runtime requirements<br />pip install -r REQUIREMENTS.test # Installs testing requirements<br />cd example/<br />./manage.py syncdb # Creates db/development.sqlite3<br />./manage.py test users # Runs all the tests<br />./manage.py runserver<br /><br />Then just visit http://localhost:8000/users/ to see it in action!<br />License<br /><br />This is free and unencumbered software released into the public domain.<br /><br />Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.<br /><br />In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.<br /><br />THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.<br /><br />For more information, please refer to http://unlicense.org/<br /><br /><br />#md5=daabef9889486038287badce0eadbf6b

Requirements: No special requirements
Platforms: *nix, Linux
Keyword: Action Copyright Dintpoll Django Formspollformselfrequestpost Href Dquot Import Makes Object Modelspoll Poll Public Quotgt Return Selfform Selfformis Valid Selfformsave Selfpoll Selfpollid Selfpolls Software
Users rating: 0/10

License: Freeware Size: 20.48 KB
DAGNY RELATED
Network & Internet  -  django-admin-filters 0.1.3
django-admin-filters allows you to use generic filters for the admin changelist view. Example: from adminfilters.admin import GenericFilterAdmin from django.contrib.admin.filterspec import FilterSpec ...
10.24 KB  
Programming  -  django-netcash 0.4.0
A pluggable Django application for integrating netcash.co.za payment system. Install $ pip install django-netcash or $ easy_install django-netcash or $ hg clone...
10.24 KB  
Network & Internet  -  django-publicmanager for Linux 0.9.2
django-publicmanager is a Django app that provides a custom queryset class and managers that handle the public availability of database objects. The classes provide a public method that filters by boolean is_public and date based pub_date...
10.24 KB  
Network & Internet  -  django-payfast 0.2.2
A pluggable Django application for integrating payfast.co.za payment system. Install $ pip install django-payfast or $ easy_install django-payfast or $ hg clone...
10.24 KB  
Multimedia & Graphics  -  Smart Photo Import 1.9.2
Smart Photo Import is a brand new application that will help you to handle your digital shots and archive them very easily on your PC. Smart Import is a small tool that helps you to import the shots from your digital photocamera into your...
 
Utilities  -  Extract Files Action for Mac OS 1.01
The new Extract Files Action for OS X Automator allows you to extract any combination files by file extension or file type. This is very useful for video and photo workflows. For example you could extract all jpg, tiff and gif and then use another...
51.2 KB  
Programming  -  django-baseviews 0.5
A small collection of base view classes to build upon. They are intended to handle a lot of the repetition in common view patterns and allow you to focus on what makes each view different. They were created by Brandon Konkle, and are used on some...
10.24 KB  
Specialized Tools  -  django-authority 0.3
django-authority is a Django app for per-object-permissions that includes a bunch of helpers to create custom permission checks. The main website for django-authority is packages.python.org/django-authority. You can also install the...
450.56 KB  
Network & Internet  -  django-generic-aggregation 0.1.1
You want the most commented on blog entries: >>> from django.contrib.comments.models import Comment >>> from django.db.models import Count >>> from blog.models import BlogEntry >>> from generic_aggregation import...
10.24 KB  
Programming  -  nappingcat 0.4
nappingcat is a django-inspired framework for routing single-user SSH calls. Useful for implementing software like gitosis. Installation # on the remote: sudo pip install nappingcat useradd -m -U...
20.48 KB  
NEW DOWNLOADS IN LINUX SOFTWARE, NETWORK & INTERNET
Linux Software  -  Polling Autodialer Software 3.4
ICTBroadcast Auto Dialer software has a survey campaign for telephone surveys and polls. This auto dialer software automatically dials a list of numbers and asks them a set of questions that they can respond to, by using their telephone keypad....
488 B  
Linux Software  -  Total Video Converter Mac Free 3.5.5
Total Video Converter Mac Free developed by EffectMatrix Ltd is the official legal version of Total Video Converter which was a globally recognized brand since 2006. Total Video Converter Mac Free is a free but powerful all-in-one video...
17.7 MB  
Linux Software  -  Skeith mod_log_sql Analyzer 2.10beta2
Skeith is a php based front end for analyzing logs for Apache using mod_log_sql.
47.5 KB  
Linux Software  -  SLAX 6.0+
Slax is a modern, portable, small and fast Linux operating system with a modular approach and outstanding design. Despite its small size, Slax provides a wide collection of pre-installed software for daily use, including a well organized graphical...
190 KB  
Linux Software  -  GTK+ 2.5
GTK+, which stands for the GIMP Toolkit, is a library for creating graphical user interfaces for the X Window System. It is designed to be small, efficient, and flexible. GTK+ is written in C with a very object-oriented approach. Language bindings...
60 MB  
Network & Internet  -  Free WiFi Hotspot 3.3.1
Free WiFi Hotspot is a super easy solution to turn your laptop or notebook into a portable Wi-Fi hotspot, wirelessly sharing your internet connections like DSL, Cable, Bluetooth, Mobile Broadband Card, Dial-Up, etc. through the built-in wireless...
1.04 MB  
Network & Internet  -  Easy Uploads 1.8
Easy uploads is a file storage media streaming application designed by Filestreamers that allows you to upload, store, and stream your files from their virtually unlimited file storage server. Easy Uploads can backup,share, and stream your files...
615.97 KB  
Network & Internet  -  IPv6 CARE 3.2b
IPv6 CARE, "IPv6 Compliant Automatic Runtime Environment", is a Linux tool able to patch ipv6-agnostic programs on-the-fly ('patch' mode). It can also generate a diagnosis about the IPv6 compliance of an application ('check' mode).
409.6 KB  
Network & Internet  -  PacketFence ZEN 3.1.0
PacketFence is a fully supported, trusted, Free and Open Source network access control (NAC) system. Boosting an impressive feature set including a captive-portal for registration and remediation, centralized wired and wireless management, 802.1X...
1024 MB  
Network & Internet  -  django-dbstorage 1.3
A Django file storage backend for files in the database.
10.24 KB