named url patterns - invalid syntax

2012-08-05 Thread Blaxton
Hi Why following line cause an invalid syntax : (r'^myform/$',  'mysite.views.myform', name="myform"), it seems named url pattern has changed from name="myform" to just 'myform' because when I change it to: (r'^myform/$',  'mysite.views.myform', 'myform'), it pass the syntax error and throw

Re: named url patterns - invalid syntax

2012-08-05 Thread Daniel Roseman
On Sunday, 5 August 2012 12:43:48 UTC+1, Blaxxton wrote: > > > Hi > > Why following line cause an invalid syntax : > (r'^myform/$', 'mysite.views.myform', name="myform"), > > it seems named url pattern has changed from name="myform" to just 'myform' > because when I change it to: > (r'^myform/$',

Re: named url patterns - invalid syntax

2012-08-05 Thread Alexis Roda
Al 05/08/12 13:43, En/na Blaxton ha escrit: Hi Why following line cause an invalid syntax : (r'^myform/$', 'mysite.views.myform', name="myform"), Because it's syntax is invalid: the 'name=value' is allowed in function calls but not in tuples. Try with: urlpatterns = patterns('', url(r

Re: How to override an attribute?

2012-08-05 Thread Victor Rocha
What about you do what the error is telling you to do? All you need to do its to add a related name to your field definitions and that will fix it. If you need me to fix it for you, post some real code. On Saturday, August 4, 2012 10:55:13 AM UTC-4, . wrote: > > Hello, > > I'm trying to do t

Thoughts on web2py?

2012-08-05 Thread Alec Taylor
I've been playing around with web2py the past few months, even open-sourced an event-site (aka meetup.com) which I wrote with it. Now I might be starting a job where all I'll be doing is Django—probably GeoDjango + Pinax—and was wondering a few things: 1. Apart from following the tutorial, what e

Re: Thoughts on web2py?

2012-08-05 Thread Marcin Tustin
Implement a basic version of your site in django. Django has a fair bit of structure, to allow you to focus on the business logic, rather than the plumbing. Be prepared to get used to not having to manage the nitty gritty of a lot of things. On Sun, Aug 5, 2012 at 11:01 AM, Alec Taylor wrote: >

Choosing a Django-based CMS

2012-08-05 Thread Sean O'Brian
Hi! I'm using Django CMS for a few of weeks and I like it. But there's one problem, which I already ran into: I can't extend Page model easily. I found one tutorial, but this not seem to be very developer-friendly and author said that it's

Re: named url patterns - invalid syntax

2012-08-05 Thread Adriano Teixeira
Hi, You are probably not using the url() function, but just the tuple format. You should have something like: urlpatterns = patterns('', url(r'^myform/$', 'mysite.views.myform', name="myform") ) instead of urlpatterns = patterns('', (r'^myform/$', 'mysite.views.myform', name="myform") ) The

Re: reusable django event/calendar app

2012-08-05 Thread wikus
On Monday, May 14, 2012 4:26:15 PM UTC, KentH wrote: > Hi, > > Is there an event/calendar/schedule app that people currently use? > > All of the ones I've come across (django-schedule, django-cal-event, etc) > appear to have been last modified in '07, '08, or so. I was hoping to find > somethi

dynamic fildsets on ModelAdmin

2012-08-05 Thread Nicolas Emiliani
Hi, I've been struggling with dynamic forms and until now I'm loosing the battle :S The thing is that I have a HomeAdmin(ModelAdmin) that uses the form HomeAdminForm(ModelForm) The HomeAdminForm redefines the __init__ method to add a bunch a of hidden input fields like this : class HomeAdminForm(

Re: TinyMCE config

2012-08-05 Thread Aljoša Mohorović
On Fri, Aug 3, 2012 at 6:20 PM, Jonathan Baker wrote: > If you're up for it, I'd love to help update the documentation to save > future users (and yourself) some time with the issues I ran in to. sure, just send pull requests for https://github.com/aljosa/django-tinymce Aljosa -- https://twitter

Re: dynamic fildsets on ModelAdmin

2012-08-05 Thread Melvyn Sopacua
On 5-8-2012 20:16, Nicolas Emiliani wrote: > Hi, I've been struggling with dynamic forms and until now I'm loosing the > battle :S > So, now I want the HomeAdmin to render all this stuff into the from, but > when I try to > add this fields into the fieldset attribute and load the page it fails > s

Re: How to override an attribute?

2012-08-05 Thread Tomas Neme
> There is a class (let's call it Foo) which is a subclass of User. > Foo has the following line in its Meta: > proxy = True if you don't provide full minimal data, it's hard for us to help. If I had known you were using a proxy model, I'd have proposed something different. In general, unless you

Re: How to override an attribute?

2012-08-05 Thread Tomas Neme
I don't mean to say you shouldn't need to ask questions, I just say that using or not "proxy" is not a "let's see what happens" choice, and having the docs read and halfway understood will help you ask *the right* questions -- "The whole of Japan is pure invention. There is no such country, there

Re: Choosing a Django-based CMS

2012-08-05 Thread Stephen McDonald
On Aug 5, 5:30 pm, Sean O'Brian wrote: > Hi! > I'm using Django CMS for a few of weeks and I like it. But there's one > problem, which I already ran into: I can't extend Page model easily. > I found one tutorial, > but this not seem to be

Re: dynamic fildsets on ModelAdmin

2012-08-05 Thread Nicolas Emiliani
On Sun, Aug 5, 2012 at 5:40 PM, Melvyn Sopacua wrote: > On 5-8-2012 20:16, Nicolas Emiliani wrote: > > Hi, I've been struggling with dynamic forms and until now I'm loosing the > > battle :S > > > So, now I want the HomeAdmin to render all this stuff into the from, but > > when I try to > > add th

Django application template

2012-08-05 Thread Nickolas Grigoriadis
I'm trying to build an easy to deploy Django project and app template. My attempt at it is hosted here: https://github.com/grigi/project_template It is incredibly difficult to let this not explode into a template that has so many dependencies that it becomes impossible to actually use :P My ai

Re: Sample Django template scrolling table

2012-08-05 Thread Charles Norton
I simply want to display rows of data in a table. If I scroll past the nth row, I'd like another row to pop up from the bottom. Similarly, I'd like to have another row pushd down from the top if I am scrolling up. I'm going to go see how to do this outside of Django, first. On Friday, August 3

Dynamic form field type.

2012-08-05 Thread Nicolas Emiliani
Hi, Since what I was trying to do in this post : "Dynamic fieldsets on ModelAdmin" seems to be a dead end, and I'm running out of wild ideas, i'm going to share with u what I'm trying to do so you can maybe help me out. I have three Models, Home, HomeAttributeType and HomeAttributeValue. HomeAtt

django + selenium testing with several browsers

2012-08-05 Thread LS
I have a series of test cases defined using the LiveServerTestCase class provided by Django. I derive a number of classes from it, and run the tests using manage.py test as per the docs at https://docs.djangoproject.com/en/1.4/topics/testing/ This is all working fine, it starts firefox (or chro

Re: Django application template

2012-08-05 Thread Melvyn Sopacua
On 5-8-2012 20:11, Nickolas Grigoriadis wrote: >- Make it easy to add applications I see this come up regularly, but fail to understand what is hard about it. You add one line in the settings file and either it's an external application which gets installed in the python path or it's homegrow

Re: Sample Django template scrolling table

2012-08-05 Thread Melvyn Sopacua
On 5-8-2012 21:57, Charles Norton wrote: > I simply want to display rows of data in a table. If I scroll past the nth > row, I'd like another row > to pop up from the bottom. Similarly, I'd like to have another row pushd > down from the top > if I am scrolling up. Is this pure for the eye-candy

Re: Dynamic form field type.

2012-08-05 Thread Melvyn Sopacua
Hi, On 6-8-2012 0:09, Nicolas Emiliani wrote: > I have three Models, > > Home, HomeAttributeType and HomeAttributeValue. HomeAttributeValue has > an FK to HomeAttributeType and one to Home. > > The idea is that the user can add as many HomeAttributeTypes as he wants and > set the data type of t

Re: How to override an attribute?

2012-08-05 Thread Melvyn Sopacua
Agreeing with Thomas. But for the archives some background on django inheritance: On 5-8-2012 7:53, . wrote: > I've read a doc page on inheritance but I don't know how to fix these errors. In python you can override any attribute or method. In django being a python application obviously the same

django.shortcuts redirect doesn't pass argument

2012-08-05 Thread forthfan
Hi all, I'm trying to pass a filepath from one view to another by using 'redirect' from django.shortcuts, but the argument is not getting passed. What am I doing wrong? def upload1(request): if request.method == 'POST': form = UploadFileForm(request.POST, request.FILES) if form.is_va

Re: django.shortcuts redirect doesn't pass argument

2012-08-05 Thread Karen Tracey
On Sun, Aug 5, 2012 at 9:21 PM, forthfan wrote: > > I'm trying to pass a filepath from one view to another by using 'redirect' > from django.shortcuts, but the argument is not getting passed. What am I > doing wrong? > > def upload1(request): > if request.method == 'POST': > form = UploadF

Re: django.shortcuts redirect doesn't pass argument

2012-08-05 Thread Bill Beal
My example is wrong, because filepath turns out to be an 'InMemoryUploadedFile' object. But the problem remains the same because I had a dummy filename string that I was trying to pass. Actually the file would be uploaded to the server to a local file in upload1, then the filepath of the local fi

Re: Django application template

2012-08-05 Thread Nickolas Grigoriadis
I specifically mean to not overwhelm with multitudes of default apps. For example not doing something like changing the templating engine by default, and therefore many django applications need to be ported. So, it is more fighting the impulse to add everything cool :P I have had many thoughts a

Re: How to override an attribute?

2012-08-05 Thread Nickolas Grigoriadis
What I found useful sometimes, was to store the content_type_id of the object, so when I open the parent class, I can change the type to the right subclass. For example: from django.contrib.contenttypes.models import ContentType class Parent(models.Model): content_type = models.ForeignKey

Re: django.shortcuts redirect doesn't pass argument

2012-08-05 Thread Bill Beal
I see that I had mixed the second and third ways of using 'redirect' in the doc. It seems to be working OK this way: def upload1(request): . . . fout = 'tempfile.csv' return redirect('/isf/upload2/' + fout + '/') def upload2(request, filename=None): . . . with the following in u