Re: Json serialization for use in JS

2011-05-20 Thread sebastien piquemal
Hi ! I have written a small library that (among other transformations) can serialize django objects to dict (then you can just use 'json' to make your dict to a json string) : Docs on readthedocs : http://readthedocs.org/docs/any2any/en/latest/doc_pages/djangocast.html Pypi page : http://pypi.py

Re: learning Django after a break -- site tutorials, examples

2011-05-20 Thread BobX
On May 20, 4:35 am, John Griessen wrote: > I've gone through the Django 1.2 tutorial to the point of creating an admin > site, > then had to switch to other work for months.  What are some good simple > example sites > or tutorials for creating a top page ( index.html ) and using templates with

Advice needed: more advanced user capability

2011-05-20 Thread BobX
Got a question about my Django development that I'd appreciate some sage "best practices" advice on. My Django app needs more user capability than is available in the default middleware. Specificially I need to be able to: o "age" passwords; o do checks on validity of new passwords - make sure the

AW: Advice needed: more advanced user capability

2011-05-20 Thread Szabo, Patrick (LNG-VIE)
Maybe you should take look at this: https://django-userena.org/ The role- and profile- thing could be realized via the normal groups in django. pat . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSLT Developer LexisNexis Marxergasse 25, 1030 Wien mailto:patrick.sz...@lexi

Is there an HTML editor that's Django-aware

2011-05-20 Thread BobX
Pretty obvious question, but is there any recommended HTML editor that won't munch the Django template codes? I was using Amaya to form my pages, but after a couple of what-the-heck moments, I discovered that it sporadically "eats" the template codes - ones in table definitions being particularly v

Re: Virtualized Django app image for dev replication?

2011-05-20 Thread Tom Evans
On Thu, May 19, 2011 at 3:30 AM, ydjango wrote: > I am thinking of creating a virtualized image of my complete django > app with mysql so that I can clone/copy it on developers, qa and demo > laptops. That way I do not have to do greenfield install on each > developer computer which can take many

Re: Is there an HTML editor that's Django-aware

2011-05-20 Thread Tom Evans
On Fri, May 20, 2011 at 10:54 AM, BobX wrote: > Pretty obvious question, but is there any recommended HTML editor that > won't munch the Django template codes? I was using Amaya to form my > pages, but after a couple of what-the-heck moments, I discovered that > it sporadically "eats" the template

How to get hold of the failed db query

2011-05-20 Thread Thomas Larsen Wessel
I am running a site using Django 1.2.5 and postgres. I just upgraded Django and Django CMS to their latest versions using South. And now I get a MOD_PYTHON error. Here is an excerpt: MOD_PYTHON ERROR (...) File "/home/wsc2/lib/Django-1.2.5/django/db/backends/__init__.py", line 56, in _savepoin

Re: session handling

2011-05-20 Thread Tom Evans
On Fri, May 20, 2011 at 12:56 AM, man_kum wrote: > Hello , > > I am new to Django and trying to handle signin/ signout request > according to following documentation > > http://docs.djangoproject.com/en/1.3/topics/auth/#how-to-log-a-user-in > > > I am using fiddler tool on windows for testing the

Re: [help]django's FloatField can't insert the mysql's double type data.

2011-05-20 Thread Korobase
OK,Thank you for your reply. I have resolved this problem, That a fileld name in my models.py is "save" resulting this problem. But I don't know why. the "save" can't be used as the filed name? because it's not within Python keywords and just be a method name in django. I 'll keep it in mind. T

Re: Is there an HTML editor that's Django-aware

2011-05-20 Thread Brian Bouterse
+1 for vim On Fri, May 20, 2011 at 6:51 AM, Tom Evans wrote: > On Fri, May 20, 2011 at 10:54 AM, BobX wrote: > > Pretty obvious question, but is there any recommended HTML editor that > > won't munch the Django template codes? I was using Amaya to form my > > pages, but after a couple of what-t

Re: Is there an HTML editor that's Django-aware

2011-05-20 Thread Kenneth Gonsalves
On Fri, 2011-05-20 at 07:51 -0400, Brian Bouterse wrote: > +1 for vim I am trying out emacs - is pretty good for both python and django. -- regards KG http://lawgon.livejournal.com Coimbatore LUG rox http://ilugcbe.techstud.org/ -- You received this message because you are subscribed to the Goo

Re: Json serialization for use in JS

2011-05-20 Thread Jonas Geiregat
> > Your idea of overriding the Serializer class sounds like a better idea to me. > It should be possible (and will be interesting) ,I'll think I'll look into > that tonight. Overwriting django's default serializers is possible. This is how I've done it: In the root of my django project: mkd

Re: Json serialization for use in JS

2011-05-20 Thread Jonas Geiregat
> > class Serializer(PythonSerializer): > def end_object(self, obj): > self.objects.append({ > "fields" : self._current > }) > self._current = None > > I've made a small mistake I was importing PythonSerializer while It should've been JsonSerializer C

Re: how to save image in postgreSQL database

2011-05-20 Thread Mateusz Marzantowicz
On Fri, May 20, 2011 at 3:00 AM, ramnivas indani wrote: > ok but how can i achieve it in Django means how can i store images in > Django python using URI Read Django documentation (it is part of studying in college): * http://docs.djangoproject.com/en/1.3/topics/http/file-uploads/ * http://doc

How to model multi-customer app (each needing own administrative access)

2011-05-20 Thread Michael Giarlo
Hi, My department has two customers who have identical needs, currently served by separate applications. They both need an app w/ a public side and an administrative side, and we had hoped to make use of the built-in Django admin interface for the latter. We're wondering how to model this i

Problem reversing urls when calling templates from another project

2011-05-20 Thread ALJ
I have two projects that work together. Lets call them Extranet_site and Public_site. Most of the functionality was developed for Extranet_site, but we wanted to capture requests from the public, so we set up Public_site and then just attached to some of the functionality in Extranet_site. A scena

(extendable) social network plugin

2011-05-20 Thread Leon van der Ree
Hi all, First a short intro, since this is my first post Last few years I have been working on and with Symfony (Php) a lot, but since I am done with the ugly bugs within Php I decided to switch to another development environment. I have always been interested in other languages and frameworks an

Re: Problem reversing urls when calling templates from another project

2011-05-20 Thread Shawn Milochik
Does this help? http://docs.djangoproject.com/en/1.3/topics/http/urls/#topics-http-reversing-url-namespaces I found it here (where a usage example is given): http://docs.djangoproject.com/en/1.3/ref/templates/builtins/#url -- You received this message because you are subscribed to the Google G

Re: Is there an HTML editor that's Django-aware

2011-05-20 Thread Javier Guerra Giraldez
On Fri, May 20, 2011 at 4:54 AM, BobX wrote: > Platforms I've got available are Linux or Windows. Kate does it. and hence, _every_ KDE application -- Javier -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email t

Re: How to model multi-customer app (each needing own administrative access)

2011-05-20 Thread Javier Guerra Giraldez
On Fri, May 20, 2011 at 7:55 AM, Michael Giarlo wrote: > I suspect we would go with #3 definitely #3. it's called multi-tenancy, and it's a mess to add to an existing application, much better to design from the start. for the most part, it means most of your tables will need a 'tenant' foreign

Re: Problem reversing urls when calling templates from another project

2011-05-20 Thread ALJ
@Shawn Cheers. I'm such a c*ck. I am so used to using named URL patterns that I just assumed that that was how you did it. So yes, I've had a look at the documentation, although still struggling to get it to find the reverse, even when using the full path. -- You received this message because you

Re: Is there an HTML editor that's Django-aware

2011-05-20 Thread Graeck
http://e-texteditor.com/ And use TextMate's Django bundle. More info: http://code.djangoproject.com/wiki/TextMate -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscrib

Re: Is there an HTML editor that's Django-aware

2011-05-20 Thread william ratcliff
I am not affiliated with them, but I find Wing IDE to work extremely well. William On Fri, May 20, 2011 at 11:28 AM, Graeck wrote: > http://e-texteditor.com/ > > And use TextMate's Django bundle. > > More info: http://code.djangoproject.com/wiki/TextMate > > -- > You received this message becau

Re: Problem reversing urls when calling templates from another project

2011-05-20 Thread ALJ
ok ... still struggling. While in Public_site.views I can call functions from within the Extranet_site.views ... but I can't even do a: return HttpResponseRedirect(reverse('Extranet_site.application_name.views.function_name', args=(999,))) Within my Public_site.settings I have installed Extranet

Re: (extendable) social network plugin

2011-05-20 Thread Matías Aguirre
Excerpts from Leon van der Ree's message of Fri May 20 11:21:15 -0300 2011: > Hi all, Hi, > First a short intro, since this is my first post > > Last few years I have been working on and with Symfony (Php) a lot, > but since I am done with the ugly bugs within Php I decided to switch > to anothe

Re: learning Django after a break -- site tutorials, examples

2011-05-20 Thread John Griessen
On 05/20/2011 04:38 AM, BobX wrote: The top page question . . . the_simplest_ option (from my experience) is to generate a small stub routine that has index.html as a template and use render_to_response to shoot that out when the user goes to URL http//mysite/ (or whatever you want). Just becau

Re: Is there an HTML editor that's Django-aware

2011-05-20 Thread Boštjan Mejak
Use Komodo Edit. It's free and it is the best source code editor on the planet. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to dj

Re: Is there an HTML editor that's Django-aware

2011-05-20 Thread Shawn Milochik
+1 on Komodo Edit (I use the free one for almost all of my coding). I don't know exactly to what extent it handles Django template tags in HTML, but it's never tripped me up, which is something, anyway. Shawn -- You received this message because you are subscribed to the Google Groups "Djang

Re: Is there an HTML editor that's Django-aware

2011-05-20 Thread Kevin Monceaux
On Fri, May 20, 2011 at 07:51:06AM -0400, Brian Bouterse wrote: > +1 for vim I'll second that motion. I've tried numerous other editors and keep sticking with vim for almost everything. I do use emacs for my e-mail editor, with Mutt as my mail client. -- Kevin http://www.RawFedDogs.net htt

multiple instances of form (with distinctive identifiction) on same page?

2011-05-20 Thread Pascal Andres
hi there, first poster and django beginner here.. I've been unsuccessfully looking for an answer to this for a while now, so I'm finally posting it myself. I'm writing an app that allows users to place bets on soccer matches. several matches are listed on the same site consisting each of two oppo

Re: multiple instances of form (with distinctive identifiction) on same page?

2011-05-20 Thread Shawn Milochik
http://docs.djangoproject.com/en/1.3/topics/forms/formsets/ There you go. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-

Re: Is there an HTML editor that's Django-aware

2011-05-20 Thread W Craig Trader
On 05/20/2011 05:54 AM, BobX wrote: Pretty obvious question, but is there any recommended HTML editor that won't munch the Django template codes? I was using Amaya to form my pages, but after a couple of what-the-heck moments, I discovered that it sporadically "eats" the template codes - ones in

Re: Is there an HTML editor that's Django-aware

2011-05-20 Thread bedros
Agree, Komodo is the best source editor on the planet. I recently started writing macros (in python) for Komodo; and it's so powerful; you can also create a simple shell command pass filename (being edited) as %F, also user input as %ask. On May 20, 3:19 pm, W Craig Trader wrote: > On 05/20/2

Re: weird error with MS Excel 2010 exports

2011-05-20 Thread Gabriel Gunderson
On Thu, May 19, 2011 at 1:44 PM, Bobby Roberts wrote: > hi.  Regardless of how we try to export from a view into an excel > file, we get a weird msgbox reading: > > "The file you are trying to open, 'filenamehere.xls', is in a > different format than specified by the file extension.  Verify that >

Update a user profile after LInkedin Oauth

2011-05-20 Thread CrabbyPete
I am trying to update a user profile of an existing user with a LinkedIn profile. My problem is I need an email address, but LinkedIn does not give you that information. So I have a user create an account with their email address and ask if they want to link their profile to their LinkedIn profile.

Re: weird error with MS Excel 2010 exports

2011-05-20 Thread chris hendrix
hi gabe - response = render_to_response('reports/trackingdump.html',{'trs':trs,}) filename='trackingdump.xls' response['Content-Disposition'] = 'attachment; filename=' + filename response['Content-Type'] = 'application/vnd.ms-excel; charset=utf-8' that's ho

failing to pass model objects to template for some reason....

2011-05-20 Thread Chris Seberino
I have a model class called Message with an attribute called text. ** When I pass a list of these objects called messages to my template, it doesn't show up. ** When I instead create this derivative called fred, that *does* work... fred = [e.text for e in messages] Why would fred work f

uber weird access problem from windows

2011-05-20 Thread Kenneth Gonsalves
hi, I have a django app running on a lan. The server is linux and setup is apache/mod_wsgi. There are windows and linux clients that access the app and also the app is accessible from the server itself. Everything works fine from the client machines and from the server, except one form. In this fo

Re: uber weird access problem from windows

2011-05-20 Thread Venkatraman S
On Sat, May 21, 2011 at 10:37 AM, Kenneth Gonsalves wrote: > > The form is no different from any other form - in fact it is cut and > pasted from another form which works perfectly. Has anyone faced a > problem like this? Any clues on how to diagnose? > Clear cache and try. -- You received this