Re: Django CMS

2010-02-20 Thread Timothy Kinney
+1 On Sat, Feb 20, 2010 at 9:38 PM, Shawn Milochik wrote: > I used the same comparison you did, and I ended up going with Django-CMS. I > like it a lot. > > As for importing the content, that should be pretty easy. Once you see how > Django-CMS works you'll just need to make

Re: Load template tags if installed?

2010-02-20 Thread darkpixel
On Jan 29, 5:07 am, trójkąt wrote: > And do you have any solution for something like this: > > {% ifloaded my_app %} >     {% tag_from_my_app %} > {% endifloaded %} Sorry for the delay--Google didn't notify me of your reply. I never thought about that one... ;)

Re: Treat two fields as one in a queryset

2010-02-20 Thread Shawn Milochik
If you know how to do it in SQL, just make your own manager. http://docs.djangoproject.com/en/1.1/topics/db/managers/ Yay for Django! Shawn -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Treat two fields as one in a queryset

2010-02-20 Thread John M
I think you'll have to sort the list yourself by creating a calculated field, since you're only returning a small number, I don't see this as a big issue. So, get the records back that you want via the ORM, and then copy them over to a list. HTH John On Feb 20, 6:26 pm, shacker

Re: Django CMS

2010-02-20 Thread Shawn Milochik
I used the same comparison you did, and I ended up going with Django-CMS. I like it a lot. As for importing the content, that should be pretty easy. Once you see how Django-CMS works you'll just need to make a simple HTML template and then transfer the data from your old database into the

Re: Passenger 57 - a Django query problem

2010-02-20 Thread Steven Elliott Jr
I've always found both the Django and Python communities to be among the friendliest and most helpful. Please be kind to one another and respectful of everyones comments. We are here to support one another in our efforts to better our django skills and to better the community and project

Subclassing + Renaming

2010-02-20 Thread Calaganne
Hi there, I've some basic models like PERSON, GROUP and ROLE: class PERSON (models.Model): first = models.CharField ('first name', max_length=256) last = models.CharField ('last name', max_length=256) class GROUP (models.Model): name = models.CharField (max_length=256) members

Django CMS

2010-02-20 Thread MacOSX @ Rocteur.cc
Hi, I'm learning Python (coming from Perl) and I discovered Django this weekend! What I'd like to do is to have a Django based CMS system! I notice here http://code.djangoproject.com/wiki/CMSAppsComparison that I have a choice ;-) I'd like to import, my stories from Geeklog, the stories are in

Re: what if I need to use two objects to get a third object in my templates?

2010-02-20 Thread Daniel Wong
Hm. Looks like the with tag would help with this, as it accepts filtered values: {% with person|get_obj:col|gt:too_large as val_too_large %} {% if val_too_large %} ... {% endif %} {% endwith %} On Feb 19, 10:55 am, Daniel Wong wrote: > Thanks, Roseman. I was

Re: photos

2010-02-20 Thread rebus_
2010/2/21 : > Photos > > bisou > Ariel > > > > -- > Infomed - Red de Salud de Cuba > http://www.sld.cu/ > > > -- > > Este mensaje le ha llegado mediante el servicio de correo electronico que > ofrece Infomed para respaldar el cumplimiento de

Treat two fields as one in a queryset

2010-02-20 Thread shacker
Given a model like: class Item(models.Model): title = models.CharField(max_length=140) created_date = models.DateTimeField(default=datetime.datetime.now) completed = models.BooleanField(default=False) completed_date = models.DateTimeField(blank=True,null=True) ... I want to

Re: Passenger 57 - a Django query problem

2010-02-20 Thread Russell Keith-Magee
On Sun, Feb 21, 2010 at 4:11 AM, Sithembewena Lloyd Dube wrote: > I wonder what Atamert the peacemaker has to say now, since the person to > whose defense he came admitted he was wrong. Amazing to note that Atamert > noticed my directness to Bruno, but did not notice how nasty

Regression

2010-02-20 Thread zweb
What are best practices to regress django views? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to

Re: mouse events and view.py

2010-02-20 Thread Gonzalo Delgado
El 20/02/10 19:11, gintare escribió: > Is it possible with python or i need java script? You need javascript. -- Gonzalo Delgado -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: what is the name of your super class?

2010-02-20 Thread Timothy Kinney
This is strange. When I duplicate your code, thanos, I get an error that says: AttributeError: SubClass instance has no attribute '__bases__' What's different about my setup? I'm running Python 2.5.3 -Tim On Fri, Feb 19, 2010 at 6:43 PM, thanos wrote: > How about: > > >>>

Re: Passenger 57 - a Django query problem

2010-02-20 Thread Sithembewena Lloyd Dube
So, Atamert, Bruno admitted he was wrong. What have you to say?? It's strange that you noticed i was direct with him,but you did not seem to notice how harsh he was to Emily and Derek?? Anyways, peace.. On Thu, Feb 18, 2010 at 11:25 AM, Atamert Ölçgen wrote: > Hi

Re: one form, many submits

2010-02-20 Thread Timothy Kinney
You could also go with a column called "Execute" and a checkbox for the actions you want to execute and then a single submit button that grabs all the checked actions. But I think the other way is probably more intuitive. -Tim On Sat, Feb 20, 2010 at 10:45 AM, Tom wrote: >

mouse events and view.py

2010-02-20 Thread gintare
How correctly define syntax for the event in templates? I want that all text in the text area would be send to the python function "search2" after i paste text or click mouse. After making changes the text has to be pasted back to the same form. Is it possible with python or i need java script?

Re: Passenger 57 - a Django query problem

2010-02-20 Thread Sithembewena Lloyd Dube
I wonder what Atamert the peacemaker has to say now, since the person to whose defense he came admitted he was wrong. Amazing to note that Atamert noticed my directness to Bruno, but did not notice how nasty Bruno was to other respondents (namely Emily and Derek). What have you to say, o' wise

Re: one form, many submits

2010-02-20 Thread Tom
David, thanks for that. I ended up going for the simple HTML method because, as you guessed, the SubmitField idea was a bit unwieldy for my needs. Thanks for your help! Tom On 20 Feb, 15:37, David De La Harpe Golden wrote: > On Sat, Feb 20, 2010 at 06:42:11AM

Re: Slugify() and Clean form data Questions

2010-02-20 Thread Jon Loeliger
> Folks, A few days ago I asked: > Is there a canonical definition or even a reference > implementation of a slug = slugify(str) function somewhere? Thanks for taking the time to answer that for me! We pretty much beat the answer into my thick skull: Use the slugify() function as per "from

Re: Making a User Registration form

2010-02-20 Thread Wiiboy
Ok, I think that'll work. I'll try it. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to

Re: Passing parameters from child models

2010-02-20 Thread ALJ
Hi Bruno, Thanks for you candor. Yeah. I appreciate I'm not that that great at the moment. By having the usertype id would therefore make the usertype specific attributes much easier to access, such as showing the usertype name in the templates. So if my usertype model is this: class

Re: one form, many submits

2010-02-20 Thread David De La Harpe Golden
On Sat, Feb 20, 2010 at 06:42:11AM -0800, Tom wrote: > Hi all, > > I have a view that iterates over a queryset to produce a list of > items. I have added a checkbox next to each item (from within the > template) and have multiple 'submit' buttons that will do different > things with the items

Re: Making a User Registration form

2010-02-20 Thread Tim Shaffer
> Wait, but do profile fields get displayed as part of the form? Just add them to RegistrationForm and they will. Or create another form class for Profile, and use the fields from that to populate the Profile... {{ reg_form.as_p }} {{ profile_form.as_p }} On Feb 20, 10:22 am, Shawn Milochik

Re: Passenger 57 - a Django query problem

2010-02-20 Thread Sithembewena Lloyd Dube
Lol..c'mon Bruno, we just resolved this. Stop attacking Emily. You admitted in your email to me that you could be, in your own words, an "asshole" sometimes, that your words were "uselessly harsh", and that Emily was right. Why come onto the thread and attack her again? I declare this matter

Re: Making a User Registration form

2010-02-20 Thread Shawn Milochik
On Feb 20, 2010, at 10:11 AM, Wiiboy wrote: > Wait, but do profile fields get displayed as part of the form? This is Django. It can do whatever you want it to. Django-registration was specifically written to be reusable so that, for example, templates can be overridden with your own. Shawn

Re: Making a User Registration form

2010-02-20 Thread Wiiboy
Wait, but do profile fields get displayed as part of the form? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to

one form, many submits

2010-02-20 Thread Tom
Hi all, I have a view that iterates over a queryset to produce a list of items. I have added a checkbox next to each item (from within the template) and have multiple 'submit' buttons that will do different things with the items selected. For example, one button will delete all the items

Re: anybody tried web2py and gone back to Django?

2010-02-20 Thread Russell Keith-Magee
On Sat, Feb 20, 2010 at 11:56 AM, Russell Keith-Magee wrote: > Yes, I are > free to choose whatever license you want for your own code, but the > terms of the GPL mean that your own choice of license on your own > project *may* affect whether or not I can distribute Web2py

Re: Making a User Registration form

2010-02-20 Thread Tim Shaffer
Sorry... char.save() should read profile.save() On Feb 20, 9:05 am, Tim Shaffer wrote: > It's really not that difficult. You can just override the save() > method and create the Profile there. > > class RegistrationForm(forms.ModelForm): > >     class Meta: >         model

Re: Making a User Registration form

2010-02-20 Thread Tim Shaffer
It's really not that difficult. You can just override the save() method and create the Profile there. class RegistrationForm(forms.ModelForm): class Meta: model = User def save(self): user = super(RegistrationForm, self).save() profile =

Re: simple, input from user and database earch result

2010-02-20 Thread gintare
What do you mean by : > > The have the view that the form posts back to put the result of the search > > in the generated HTML for the result. What is the name of view, in which folder. My question was: > > 1> 2 > > > On line 1 user put a word > > On line 2 user start search in database

Re: I cannot see the raw SQL queries Django is running?

2010-02-20 Thread Daniel Roseman
On Feb 20, 11:37 am, Derek wrote: > I am running on my dev machine, working with Django 1.1, Python 2.5.2, Mysql > 5.0. > > My settings.py file has DEBUG = True > > I have done this: > > $ cd project-dir > $ python manage.py shell > > >>> from django.db import connection >

I cannot see the raw SQL queries Django is running?

2010-02-20 Thread Derek
I am running on my dev machine, working with Django 1.1, Python 2.5.2, Mysql 5.0. My settings.py file has DEBUG = True I have done this: $ cd project-dir $ python manage.py shell >>> from django.db import connection >>> connection.queries All that happens is I get a [] result, and am back to

deleting all cookies and sessions for my domain

2010-02-20 Thread Hellnar
Hello, I want to wrap the django.contrib.auth.views.logout so that it also deletes all the cookies for my domain, this is my wrapped logout method. def grupsal_logout(request, **kwargs): from django.contrib.auth.views import logout from django.core.urlresolvers import reverse

Re: South trunk with Django trunk? (wierd error)

2010-02-20 Thread Russell Keith-Magee
2010/2/20 Norbert Wójtowicz : > Howdy, > Just started a new project with Django trunk (have been using Django 1.1 > lately, so please bare with me). > After I got a basic setup going I installed the latest release of south, but > that bombed spectacularly with database