Re: Object paginator deprecated?

2008-03-26 Thread canen
This might help http://www.djangoproject.com/documentation/models/pagination/ On Mar 26, 3:16 am, shabda <[EMAIL PROTECTED]> wrote: > What are he new capbilities of the new paginator? Is there some wiki > page tracking the deprications, like the backwardsincompatible changes? --~--~-~--~-

Re: wordpress hooks and actions system in django?

2008-02-22 Thread canen
Just chiming in here. There is a Wordpress 'clone' written in Python called Textpress [1]. It implements a lightweight events/actions system[2] akin to the one you mentioned. [1] http://textpress.pocoo.org/ [2] http://dev.pocoo.org/projects/textpress/browser/textpress/application.py#L271 On Fe

Re: Custom_SQL_Method in a Model

2007-09-09 Thread canen
I don't think it matters much. Depends on how large your models.py is. Just remember to add the new manager as part of the model. On Sep 9, 4:35 pm, johnny <[EMAIL PROTECTED]> wrote: > you create class called PersonManager(models.Manager) and define > my_custom_sql inside there. Do you place thi

Re: Stand-alone Django ORM question

2007-08-30 Thread canen
I'm not sure but maybe you need the INSTALLED_APPS setting. On Aug 30, 10:21 am, ceeed <[EMAIL PROTECTED]> wrote: > Hello, > I am a Django newbie and trying to learn it. > > As a project, I am trying to use the Django ORM in a stand-alone sense > (i.e., without creating a project and app). I am

Re: shortcut for assigning values to model?

2007-07-20 Thread canen
I may be mistaken but isn't this what form_for_model is for? On Jul 20, 11:23 am, Nathan Ostgard <[EMAIL PROTECTED]> wrote: > Python also allows you to use ** to unpack a dict into a set of > kwargs: > > b = Book(**bf.cleaned_data) > > On Jul 20, 4:28 am, LaundroMat <[EMAIL PROTECTED]> wrote: >

Re: newforms.clean_data vs. newforms.cleanED_data

2007-05-15 Thread canen
This changed was committed yesterday. See here http://groups.google.com/group/django-developers/browse_thread/thread/c87a893a4d7c50a0/32f777bafd3cdb35#32f777bafd3cdb35 for the discussion that lead to the change. On May 15, 10:43 pm, cornelius bolten <[EMAIL PROTECTED]> wrote: > hi, > > i just tr

Re: How do I pass label's attributes in newforms

2007-04-25 Thread canen
You would use the attrs argument when declaring the field. . first_name = CharField('First name', attrs={'class': 'left'}) . On Apr 25, 1:02 pm, RollyF <[EMAIL PROTECTED]> wrote: > How do I do this using newforms if I want my output to be: > > First name: > > I want to know how to pass

Re: capturing urls from previous views

2007-04-04 Thread canen
Tipan, Are you talking about the refer url? This should be available if you use RequestContext as your context for the new view. See the request/ response object docs http://www.djangoproject.com/documentation/request_response/ On Apr 4, 11:09 am, "Tipan" <[EMAIL PROTECTED]> wrote: > I need to

Authenticating against Django's user database from Apache + FastCGI

2007-03-08 Thread canen
Hello, I would like to restrict access to certain files based on user roles and/or permission. I know about Authenticating against Django's user database from Apache [1] but I am using FastCGI with Apache 1.3.3. I read this message[2] and specifically this comment [3] and I was wondering if anyo

Re: storing templates in database

2007-02-24 Thread canen
See this ticket http://code.djangoproject.com/ticket/632. It has an implementation. akonsu wrote: > hello, > > if i wanted to store my templates in the database so that the users > could edit the way the pages look through the admin interface, how > would i go about doing that? > > thanks for any

Re: are the Installed apps settings necessary?

2007-02-10 Thread canen
You don't need INSTALLED_APPS for views, it's more for models if I am not mistaken, for example, syncdb won't work if your app is not in INSTALLED_APPS. voltron wrote: > I posted this yesterday, but It did not show up, strange. > > According to the manual, one has to add apps to the INSTALLED_APP

Re: how to set the choices of Select Widget by code in the newforms

2007-02-10 Thread canen
If I understand what you are asking, choices can be set to a function, as long as it returns the correct format. If you return a generator I think there is a bug that will only call it the first time the form is rendered (e.g. if there is an error in the form the choices won't show up when it ren

Re: Newforms MultiValueField

2007-02-06 Thread canen
__(widgets, attrs) def decompress(self, value): if value: return value.split(' ', 2) return ['', '', ''] ## Used it like so... budget = VacationBudgetField(f_type=[('a', 'a'), ('b', 'b')]

Re: Newforms MultiValueField

2007-02-06 Thread canen
Phil, I think you must subclass it and define the compress method. See the comments here http://code.djangoproject.com/browser/django/trunk/ django/newforms/fields.py#L412. You will also need a MultiWidget to go with the field. On Feb 6, 10:04 am, "Phil Powell" <[EMAIL PROTECTED]> wrote: > Hi,

Re: Initial data for a Select widget in newforms

2007-01-27 Thread canen
my_field = ChoiceField(choices=[(1, 1), (2, 2)], initial=1) doesn't work? On Jan 26, 7:04 pm, "Denis Frère" <[EMAIL PROTECTED]> wrote: > Hi all, > > I'm discovering newforms. > > It works pretty well, but I can't manage to give an initial selection > in a ChoiceField (Select widget). > I tried to

Re: newforms: MultiValueField and MultiWidget

2007-01-25 Thread canen
=amount) . Or something like that. On Jan 24, 8:36 pm, "canen" <[EMAIL PROTECTED]> wrote: > Hello All, > > I am resending this -- seems it didn't reach the last time, sorry if it > turns up twice > > > I've been messing around with the

newforms: MultiValueField and MultiWidget

2007-01-24 Thread canen
Hello All, I am resending this -- seems it didn't reach the last time, sorry if it turns up twice I've been messing around with the new MultiValueField and MultiWidget. I don't know if the shortcoming is with me or with the implementation of the field and widget. Let's say I want t

Re: View on Site link from Admin

2006-11-28 Thread canen
Define the get_absolute_url method in your model. E.g class Entry(models.Model): title = models.CharField(maxlength=200) .. def get_absolute_url(self): return "/entry/%s/" % (self.title) Hope that helps. On Nov 28, 12:12 pm, Dirk Eschler <[EMAIL PROTECTED]> wrote: > Am

Re: Automatically adding http:// to a URLField

2006-11-15 Thread canen
On Nov 15, 2:45 pm, "Julio Nobrega" <[EMAIL PROTECTED]> wrote: > Override the save method on your model to check if the "http://"; > string is not in the self.field_name, and if it's not, add it. > http://www.djangoproject.com/documentation/model_api/#overriding-defa... > If it fails validati

Re: So I made a forum with Django

2006-11-03 Thread canen
On Nov 3, 1:15 pm, "argh44z" <[EMAIL PROTECTED]> wrote: > Here:http://huzzah.cc/ > > I'm thinking about cleaning up the code and open-sourcing it. Is anyone > interested? Sure we are. Can't have too many Django apps. I ask this because 3 weeks ago when I started working on > it, I didn't reall

Re: Help with List_display in Admin class

2006-10-23 Thread canen
MerMer, I think what you are looking for can be found in tutorial 2 (http://www.djangoproject.com/documentation/tutorial2/). In your case you could probable do: class UserProfile(models.Model): def fullname(self): return "%s %s" %(self.user.first_name,self.user.last_name) fullna

Re: search engine

2006-10-17 Thread canen
http://www.mercurytide.com/knowledge/white-papers/django-full-text-search is a good article on adding full-text search to django using mysql. A search api branch of django can also be found here http://code.djangoproject.com/browser/django/branches/search-api. I hope that helps. On Oct 17, 9:58

Re: Repetitive background tasks

2006-06-27 Thread canen
You could use kronos.py, found here http://snakelets.cvs.sourceforge.net/snakelets/Plugins/scheduler/kronos.py?view=markup turbogears uses it for its scheduler. You can find the tg implementation here http://trac.turbogears.org/turbogears/browser/branches/1.0/turbogears/scheduler.py?rev=1363 --~

Re: Help with multiple object added on a single form with addManipulator.

2006-05-31 Thread canen
http://www.djangoproject.com/documentation/tutorial2/#adding-related-objects I think that may be what you are looking for. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group

Re: Class name display when editing inline

2006-05-27 Thread canen
Does the class have a __repr_ method? http://www.djangoproject.com/documentation/models/repr/ --~--~-~--~~~---~--~~ 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@

Re: does django go to 11?

2006-05-21 Thread canen
I think this may solve at least one of your problems. http://lukeplant.me.uk/blog.php?id=1107301634 Cheers. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to