django-socketio fails - even in example project - appreciate a clue

2014-08-03 Thread esatterwh...@wi.rr.com
The error sound pretty simple. You user doesn't have the required permission to bind to port 834. You,ll either need to run it a sudden or change the port it runs on to a higher port. -- You received this message because you are subscribed to the Google Groups "Django users" group. To

very light weight django task queues

2014-04-06 Thread esatterwh...@wi.rr.com
Django ztask is a pretty good solution for what you are describing https://github.com/dmgctrl/django-ztask -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Django querysets and postgresql views

2014-03-18 Thread esatterwh...@wi.rr.com
Yes you can. Just create the view however you like. Make a django model with the fields that map to the table the view returns and set the model to managed = false. You can only fetch data and do simple filtering obviously. -- You received this message because you are subscribed to the

Re: Recursive Query

2013-02-10 Thread esatterwh...@wi.rr.com
Although an old thread, I think it is still relevant. postgresql does support recursive queries http://www.postgresql.org/docs/8.4/static/queries-with.html And while not directly support by Django's ORM, could be done using the extra clause. Might be an interesting experiment to create a

Re: ZeroMQ / Mongrel2

2012-06-27 Thread esatterwh...@wi.rr.com
You could use WSGID to link mongrel2 with your django app. Its pretty nice and easy to get running. On Tuesday, November 8, 2011 4:10:02 AM UTC-6, Tom Evans wrote: > > On Mon, Nov 7, 2011 at 11:58 PM, Markus Gattol > wrote: > > > > Maybe sombody has given

Re: Build mobile apps for DJango sites — Would XML/JSON passing be the best approach?

2011-11-21 Thread esatterwh...@wi.rr.com
I'll have ot agree with the Andre. I had a pretty large django project That I wanted to "Make Mobile". I used minidetector to determine mobile browsers http://code.google.com/p/minidetector/ tastypie to feed data sencha touch to build a UI based on the data from tasty pie.

Re: rake routes

2010-10-20 Thread esatterwh...@wi.rr.com
There is also a very useful project out there called django-command- extensions http://code.google.com/p/django-command-extensions/ you can install that. Along with a gaggle of things you will have a show_urls command python manage.py show_urls will print out all of the urls from all of the

Re: Manually sorting items in a table - Doubly-Linked List vs sort_index

2010-10-08 Thread esatterwh...@wi.rr.com
ah I see. But I'm a little confused. How are your users manipulating this list if not via a web page? are you saying you trying to create an API in your application for people to use on querysets and interact with the database table? The notion of lists & tables in the web space is a little

Re: Manually sorting items in a table - Doubly-Linked List vs sort_index

2010-10-07 Thread esatterwh...@wi.rr.com
I'm assuming you are talking about the client facing site with html/ css/javascript. If that is the case, A DOM tree is already a doubly linked list. Elements are aware of their parent, their siblings and their children, who are again aware of their parents, children and siblings. All you

Re: Django Chat App?

2010-09-16 Thread esatterwh...@wi.rr.com
The Flex Framework is open source. On Sep 16, 6:19 am, Sithembewena Lloyd Dube wrote: > Thanks Shamail! I should have mentioned that I actually need something > open-source :) > > On Thu, Sep 16, 2010 at 12:16 PM, Shamail Tayyab wrote: > > > > > > > On

Re: how to get parent of related m2m model instance from within a template?

2010-07-31 Thread esatterwh...@wi.rr.com
http://docs.djangoproject.com/en/dev/topics/db/queries/#related-objects On Jul 30, 12:29 pm, J wrote: > I have a model, which has a related model, which then has a related > m2m field (See defs below). > > I want to add a method to the m2m model (ie: "Button") which, when >

Re: Django Sphinx Foreign key search

2010-05-22 Thread esatterwh...@wi.rr.com
You probably want to use the indexer argument. It allows you to specify which indexes you want sphinx to search over. Of course you have to tell sphinx which indexes ( models ) you want it to search in. http://www.sphinxsearch.com/docs/current.html#ref-indexer On May 21, 8:47 am, urukay

Re: Decode a JSON object?

2010-05-04 Thread esatterwh...@wi.rr.com
use the simplejson module from django.utils import simplejson I think your code is having problems becuase you are trying to deserialize something that isn't a json string, its an object. On May 3, 11:33 am, Thomas Allen wrote: > How can I parse a simple JSON object in

Re: site management - maintanance mode

2010-03-13 Thread esatterwh...@wi.rr.com
http://code.google.com/p/django-maintenancemode/ On Mar 13, 6:21 am, "Henrik Genssen" wrote: > Hi, > > I have a site that runs on more many hosts. > now hast someone an idea, how to put the whole site (on all hosts) in > "maintanance mode" (keep normal users outside

Re: How to use pre-built HTML forms in Django

2010-03-10 Thread esatterwh...@wi.rr.com
I would build a form using the forms library - subclass forms.Form and let django do the validation for you and return the errors. Once you have that bit in place, you can add your javascript enhancements and logic ontop of it. if need js funcionality for specific fields that Django doesn't

Re: Ajax request, json object, fields with instance of inherits class converted in regular string

2010-02-22 Thread esatterwh...@wi.rr.com
you can also use simplejson and return data the way you want it. It isn't able to serialize date or time objects natively but this still covers 99% of the cases. from django.utils import simplejson from django.http import HttpResponse def view(request): return

Re: Object data change approvals.

2010-02-16 Thread esatterwh...@wi.rr.com
You could use contrib.contenttypes framework to do this pretty easily provided the models you will be working with have a similar structure; they all have a field called 'content' for example that would be editable. You can have a model that is the intermediate which has a generic foreign key

Re: Images, videos and thumbnails.

2010-02-12 Thread esatterwh...@wi.rr.com
Well I can answer the last bit of your question at least. There are 2 basic field types Form Field & Model Field. Form fields are used in form classes where as Model Fields are used in Models. Model fields handle the normalization of python objects to data suitable for storage in your database

Re: Generic templates

2010-02-01 Thread esatterwh...@wi.rr.com
You template tag would seem to be the most concise and DRYest route, at least in the template code On Feb 1, 12:12 am, Dylan Evans <dy...@contentfree.info> wrote: > On Sun, Jan 31, 2010 at 11:46 PM, esatterwh...@wi.rr.com < > > esatterwh...@wi.rr.com> wrote: > > if if you

Re: Generic templates

2010-01-31 Thread esatterwh...@wi.rr.com
if if you want to change the menu based on the user, you could probably just use the user permissions from the auth context processor if the user has the permissions ( access ) to the option - show it else - don't show it. or if you want to use the model you have listed here, you could use the

Re: Problem with Django

2010-01-21 Thread esatterwh...@wi.rr.com
these error messages seem to rather explanatory. you are trying to serialize data that the serializer you are using can not serialize. you will have to convert the data into a format that is serializeable before hand and then send it. On Jan 21, 3:16 am, Meenu

Re: Convert Joomla Template to Django Template

2010-01-17 Thread esatterwh...@wi.rr.com
You are in for a treat my friend. I will say that my short 4 or 5 encounters with Joomla were the reason took up django. I had never seen a line of python code in my life, but I was so thoroughly frustrated and irritated with Joomla that I took up a new language so I could use django. The good

Re: Text Search using Python

2010-01-14 Thread esatterwh...@wi.rr.com
I've been working on 2 sites that use full text search on a wiki-like system where users use a WYSIWYG/html editor. This, obviously, doesn't apply to flatpages, but the poblem/solution might be of help. The problem is, if you try tindex/search html, you get a lot terrible results. For example, if

Re: autocomplete widget

2010-01-09 Thread esatterwh...@wi.rr.com
What I do for auto completers ( in general ) is point the widget at a URL that returns JSON objects and the parse the objects client side. For the user object your function might look like this: from django.utils import simplejson from django.contrib.auth.models import User from django.http

Re: What apps do besides provide views?

2009-12-06 Thread esatterwh...@wi.rr.com
@permalink maps a model to a view function through a specific url pattern giving you the ability to use get_absolute_url() just by passing parameters to the function. it will create the url for you. to the app question. An application or an organizational and way to focus your development. An

Re: Where to store repetitive form logic?

2009-12-06 Thread esatterwh...@wi.rr.com
You can use a hidden input in the for as a way of holding the link or id/ct of an object so you can determine where to redirect to. If the action is repetitive and you have a pretty good idea of where you to redirect to, I would think that is a simple solution. This is what django's comment app

Re: HELP PyAMF - Django + FLEX

2009-12-01 Thread esatterwh...@wi.rr.com
http://pyamf.org/wiki/DjangoHowto On Nov 30, 10:55 am, Rafael Vieira wrote: > Good afternoon people, > > I am starting with pyAmf framework, and I have questions about how to > integrate models of Django with RemoteObjects of FLEX; -- You received this message because

Re: Forms ForeignKeyField does not populate with initial value

2009-11-26 Thread esatterwh...@wi.rr.com
in your IncidentForm definition set reporter to a ModelChoiceField (User.objects.all(), widget=forms.HiddenInput()) then it should work out ok. I usually hide fk fields to a user if i want the current request.user object, because I don't want to allow the possibility for it to be changed. On Nov

Re: Model inheritance - filtering base model only

2009-11-23 Thread esatterwh...@wi.rr.com
a simple solution would be to put pass the contentype id and object id around in your url scheme domain.com/ct_id-object_id/ from there you can get the content type, which will be able to tell you the model, type, and give you the object. type = ContentType.objects.get(pk=ct_id) model =

Using Named Pairs

2009-11-20 Thread esatterwh...@wi.rr.com
When using nested tuples for the choices option on a model you get the get_foo_display(). to get the readable version of the choice. However I want to get at the name of the groups. for example in the docs: MEDIA_CHOICES = ( ('Audio', ( ('vinyl', 'Vinyl'), ('cd', 'CD'),

Re: Django javascript includes

2009-11-18 Thread esatterwh...@wi.rr.com
I would say template tags are the nice little framework for doing this. you could create a tags the looks in a certain path for files ending in '.js' based on the model or application and join it with settings.MEDIA_URL.. have it return a string of text or a list of strings that you can iterate

Re: How to lay out large, *modular* website in Django.

2009-11-17 Thread esatterwh...@wi.rr.com
I think all you would need to do is organize the permissions and assign users to groups with the permissions need to access the various views / data. You could also easily make decorators for the view function. something like @employee_login_required that checks if the user is loged in and if the

Re: Questions about ContentType generic relations

2009-11-14 Thread esatterwh...@wi.rr.com
You might want to do a search on django-tagging. this has been done and done well. On Nov 13, 6:04 pm, Continuation wrote: > How do I do queries when ContentType is involved? > > Using the example in the doc >

Re: render_to_response taking 50 seconds!

2009-11-03 Thread esatterwh...@wi.rr.com
You might want to consider installing the debug toolbar ( http://github.com/robhudson/django-debug-toolbar ). it displays the amount of time taken for all of the rendering steps. It will defiantly help you narrow down the major culprits. On Nov 3, 5:12 am, Low Kian Seong

Re: Models for a hockey database

2009-10-08 Thread esatterwh...@wi.rr.com
I have a pretty large site that tracks a football team and it's league ( http://www.muskegohitmen.com ). What I did was to have an abstract base statistics class that is attached to a player/user. then mad a class for every stat i wanted to track class Statistics(models.Model): #base class

Re: What JavaScript framework do you use and why?

2009-09-29 Thread esatterwh...@wi.rr.com
I use mootools a lot. When I was deciding which on to use, I first looked at How big is the library ( how long is it going to take me to learn ), how complex, does it do what I want/need. Does it fit the way I think, does it make sense with python/django. Mootools, to me was a pretty good fit.

Re: SQL query with complex WHERE clause

2009-09-01 Thread esatterwh...@wi.rr.com
Probably want to look into using Q http://docs.djangoproject.com/en/dev/topics/db/queries/#complex-lookups-with-q-objects On Aug 31, 7:18 pm, Gyanit wrote: > Hi All, > > I don't seem to find good source to help me write a complex where condition > in the django. > > The where

Re: interaction of django with paypal

2009-08-30 Thread esatterwh...@wi.rr.com
You would probably want to create a unique key for each user and something to denote whether the key for the download had been used. the django-registration application does this pretty well, you might peek at that code. Or depending on the scope of the project, you could use the Satchmo app to

Re: Generating slugs

2009-08-28 Thread esatterwh...@wi.rr.com
You might look in to the Autoslug field in django command extensions http://code.google.com/p/django-command-extensions/ the autoslug field is never displayed on a form, but you specify which fields from which to create the slug from. so you can do it how ever you want. I've found it very

Re: Javascript with built-in templates tags

2009-08-09 Thread esatterwh...@wi.rr.com
On Aug 7, 9:31 pm, WilsonOfCanada wrote: > Hellos, > > I was wondering how to use {{ }} variables in javascript functions. > > ex. onchange = "changeArea({{ mooman |safe|escapejs}});" > > Thanks I had this problem too, it was pretty frustrating. I can to 2 different solutions.

Re: IDE for Django and Ext JS

2009-07-29 Thread esatterwh...@wi.rr.com
You might look at Aptana Studio. It's another off shoot of eclipse, but built for web dev. Does all the nice code complete for HTML, Javascript and now even has a JSON editor. Also comes with support for Javascript libraries ( Ext Being one of them ), so it comes built with code completion and

Re: Ajax and non-ajax forms.

2009-05-09 Thread esatterwh...@wi.rr.com
most javascript frameworks have a way to stop to propagation of an event - say when you click a link. jQuery: Event.stopImmidiatePropigation() MooTools: Event.stop() Both of them i think( i know mootools does ) have a way of dealing with patterns of selectors. say all of the links have an ID

Re: YUI Image Uploader - OK on Firefox/Mac but not elsewhere

2009-02-10 Thread esatterwh...@wi.rr.com
I found the TinyMCE & filebrowser insanely easy to impliment. I would say 9 out of the 10 issued I had was simply a matter of defining the right paths. I also found that creating a symlink for the admin media folder and calling it 'media/' solved most of the path name issues. that way you can

Re: MultiValueDictKeyError when accessing POST items

2009-01-21 Thread esatterwh...@wi.rr.com
I've run into a similar problem, but am trying to submit the form with a text link and java script. The submit element is on the page, but hidden. and I get the same error: HTML -- http://media.muskegohitmen.com

Re: MultiValueDictKeyError when accessing POST items

2009-01-21 Thread esatterwh...@wi.rr.com
HTML http://media.muskegohitmen.com/images/ siteLogo_sm.png"/> Username: Password: LoginForgot Password ?! # JS - there is a little mootools in there, but though that might be the problem so I used the document. to see if that would do it function