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?
--~--~-~--~-
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
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
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
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:
>
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
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
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
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
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
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
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
__(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')]
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,
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
=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
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
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
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
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
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
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
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
--~
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
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@
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
26 matches
Mail list logo