Might be that it just applies to the admin, I'll have to test that when
I get home.
The reasons I have for modifying the admin are these:
* Many-to-many editing as it stands is not useful for my application.
For example I have a case where the object that the user should edit
can be related to
I wonder if someone could point me to an article that explains how to
document an existing web application. Or, do you know about an
application that is well documented?
It looks as if it were simple; I need my user to be able to understand
the flow from one page to another, under what circumstan
Hi,
I'm wondering what will be the best way to detect if a view is being
rendered the very first time? Because in one of the apps that I wrote,
if it is the first time, I would launch a scheduler (kronos.py) and
assign the scheduler some periodic task.
When I was doing the development on my loca
Hi:
I have 2 tables in the database user and person, there is a 1-1
relation between these tables. i am designing my own pages and adding
the person and users to the database using addmanipulator. when
creating the user i want to assign it to an existing person. i am
passing the person_id using th
Hello,
is there some equvalent to rails actions after_create,after_change ??
Or where start write such tasks ?
I'll would like to send e-mails under some actions made in admin
interface - some specific updates or creations..
Regars Spock,
--~--~-~--~~~---~--~~
On Mon, 2006-07-03 at 03:55 -0700, Spock wrote:
> Hello,
> is there some equvalent to rails actions after_create,after_change ??
> Or where start write such tasks ?
>
> I'll would like to send e-mails under some actions made in admin
> interface - some specific updates or creations..
There is a
On Mon, 2006-07-03 at 21:08 +1000, Malcolm Tredinnick wrote:
> On Mon, 2006-07-03 at 03:55 -0700, Spock wrote:
> > Hello,
> > is there some equvalent to rails actions after_create,after_change ??
> > Or where start write such tasks ?
> >
> > I'll would like to send e-mails under some actions made
On Mon, 2006-07-03 at 10:33 +, ama55 wrote:
> Hi:
> I have 2 tables in the database user and person, there is a 1-1
> relation between these tables. i am designing my own pages and adding
> the person and users to the database using addmanipulator. when
> creating the user i want to assign it
after_create is a hook executed when commit in database is made when
new record is craeted:
app/models/ticket.rb
after_create :do_something
def do_something(self)
code ...code ...
end
Such thins allows You to do some tasks when application writes or
change database data i.e send email to
I have a ono-one relationship in my model. here is my view when
creating a new user.
def create_user (request, person_id):
manipulator = Users.AddManipulator()
new_data = request.POST.copy()
if request.POST:
new_data = request.POST.copy()
errors = manipulator.get_validat
On 7/3/06, Spock <[EMAIL PROTECTED]> wrote:
> after_create is a hook executed when commit in database is made when
> new record is craeted:
You can accomplish the same thing by adding a custom 'save' method on
the model[1]; Django used to offer '_pre_save' and '_post_save'
methods, but anything y
And I also missed my footnoted reference:
http://www.djangoproject.com/documentation/model_api/#overriding-default-model-methods
--
"May the forces of evil become confused on the way to your house."
-- George Carlin
--~--~-~--~~~---~--~~
You received this mess
Malcolm Tredinnick wrote:
> However, I suspect that is not what you want (since I don't use Rails, I
> have to guess a bit from the names). We don't currently have any
> post_update and post_create signals being emitted. This sort of
> functionality will eventually be possible, but some reworking
On Mon, 2006-07-03 at 16:16 +0400, Ivan Sagalaev wrote:
> Malcolm Tredinnick wrote:
> > However, I suspect that is not what you want (since I don't use Rails, I
> > have to guess a bit from the names). We don't currently have any
> > post_update and post_create signals being emitted. This sort of
i have made some modification to my code but still it is not working.
before saving the new_data to the new_user, i am setting to it the
person id. as follows:
if not errors:
manipulator.do_html2python(new_data)
new_data['persons_id'] = person_id
new_user = manipulator.sav
On 7/3/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> * Many-to-many editing as it stands is not useful for my application.
> For example I have a case where the object that the user should edit
> can be related to many objects of a different class. There are
> currently more than 3000 obje
On 7/3/06, Harish Mallipeddi <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I'm wondering what will be the best way to detect if a view is being
> rendered the very first time? Because in one of the apps that I wrote,
> if it is the first time, I would launch a scheduler (kronos.py) and
> assign the sched
Hi
I've setup my fcgi server to run through a SysV style init script, but
now the server runs as root.
I am a bit nervous running my fcgi django server as root. Is there a
way of downgrading the process to another user id ? As I understand,
execution does not run through the web server anymore (
One of the great things about Django is that there are lots of people
out there motivated to write about it and share things they've found
or developed which would be useful to the Django community at large,
but even with the community aggregator[1] and various search engines
giving lots of love t
Hii,
please i need the steps for how saving an object to the session and
call one of its attributes in another page.
to be more clear, i have 2 related models person and user (user is
related to the person), i need to once the person has been created, in
a following page create a user that is re
I've got Django running on Sarge and de default mod_python package. No
problem at all.
Rudolph
--~--~-~--~~~---~--~~
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
This worked beautifully. Thanks.
Todd
On Jul 2, 2006, at 5:10 PM, Jorge Gajon wrote:
>
> Hi,
> Maybe you could try this:
>
> user_choices = [(u.id, u) for u in User.objects.filter(query)]
> form['field_name'].formfield.choices = user_choices
>
> choices expects a list of tuples in the form of (
Hi,
As far as i know, you can use the "sessions" framework for that:
http://www.djangoproject.com/documentation/sessions/
As it says:
"""The session dictionary should accept any pickleable Python object."""
So you should be able to save your User in the session and call it
back afterwards.
Some
+1
I've already been doing that myself, tagging everything in del.icio.us
with "django". Any particular reason you want django-tips? I don't
mind changing (they make it easy to rename a tag), but was just
curious.
Jay P.
--~--~-~--~~~---~--~~
You received this me
On Mon, Jul 03, 2006 at 07:09:35AM -0500, James Bennett wrote:
> You can also differentiate between the initial save and later updates
> by checking -- before calling the parent class' 'save' method --
> whether the object has an ID; if it doesn't, then the object is being
> created for the first
On Mon, Jul 03, 2006 at 07:54:44AM -0700, Rudolph wrote:
> I've got Django running on Sarge and de default mod_python package. No
> problem at all.
Perfect, that's what I was hoping someone would say. What about putting
a note at
http://www.djangoproject.com/documentation/install/
that the pre
Hi djangonauts,
I'm currently using the admin interface to create objects with several
ManyToManyFields, and I'd like to be able to limit the list of items
presented on the Select drop-down lists, based on other fields values.
Actually, I'm looking for a user input based equivalent of the
limi
What about a Django wiki for tutorial type things? Gentoo has one that
has been enormously useful to me and could serve well as a model.
Iain
James Bennett wrote:
> One of the great things about Django is that there are lots of people
> out there motivated to write about it and share things they
On 7/4/06, Iain Duncan <[EMAIL PROTECTED]> wrote:
>
> What about a Django wiki for tutorial type things? Gentoo has one that
> has been enormously useful to me and could serve well as a model.
>
There already is one:
http://code.djangoproject.com/wiki
Doesn't contain many full tutorials though.
On 7/3/06, Jay Parlar <[EMAIL PROTECTED]> wrote:
> I've already been doing that myself, tagging everything in del.icio.us
> with "django". Any particular reason you want django-tips? I don't
> mind changing (they make it easy to rename a tag), but was just
> curious.
Mostly I'm thinking in terms
I've been tagging with "django"-joeOn 7/3/06, James Bennett <[EMAIL PROTECTED]> wrote:
One of the great things about Django is that there are lots of peopleout there motivated to write about it and share things they've found
or developed which would be useful to the Django community at large,but ev
I sense I may be trying to do something that's not possible.
I have a model, call it Foo, and I need a page to create a Foo.
Unfortunately, the AddManipulator I get from Foo doesn't exactly
work. As mentioned in a previous post, I need to limit one
MultipleSelectField to only certain items.
[EMAIL PROTECTED] wrote:
> I am a bit nervous running my fcgi django server as root. Is there a
> way of downgrading the process to another user id ? As I understand,
> execution does not run through the web server anymore (which is running
> as nobody)
I'm not a unix admin but I've managed to mak
> There already is one:
> http://code.djangoproject.com/wiki
>
> Doesn't contain many full tutorials though.
Ah oops, I've been there and didn't even realize it was a wiki! Could
certainly do with more fleshed out tutorials on set up and such. Perhaps
I will find time to contribute after my cur
> class MPTTTree(models.Model):
> created_at = models.DateTimeField(_('creation date'), auto_now_add=True)
> updated_at = models.DateTimeField(_('last update date'), auto_now=True)
> parent = models.ForeignKey("self", null = True, blank = True)
> lhs = models.IntegerField(default=0
On 7/3/06, Rudolph <[EMAIL PROTECTED]> wrote:
>
> I've got Django running on Sarge and de default mod_python package. No
> problem at all.
>
I'll second that. All default installs on Sarge and no problems for me.
--
Waylan Limberg
[EMAIL PROTECTED]
--~--~-~--~~~---
hi!
i have a problem. i dont understand... help me please
http://www.animals-superstars.com/photo-109260.html
tank you
patate069
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post
Is there already a task force to translate the docs?
On 7/2/06, Jeremy Dunck <[EMAIL PROTECTED]> wrote:
>
> On 7/2/06, mamcxyz <[EMAIL PROTECTED]> wrote:
> > Con respecto a django, no hay mucha informacion en espaƱol, asi que te
> > tocaria leer la documentacion (que es buena) en ingles.
>
> This
The Django sites related-objects documentation says:
"if a ForeignKey field has null=True set (i.e., it allows NULL values),
you can assign None to it. Example:
e = Entry.objects.get(id=2)
e.blog = None
e.save() # "UPDATE blog_entry SET blog_id = NULL ...;"
But I can't figure out how to set it
In addition, I checked my mysql table and the field in question is
implemented as an integer with Null allowed and default set to Null, so
it appears that syncdb is creating the table properly, but the admin
interface is not letting me put in a null value for some reason.
Thanks
Iain
Iain Duncan
how to use django like web-sever on linux?
i have tried:
python manage.py runserver localhost:80
but give an error on the selected port.
if run for example:
python manage.py runserver myIP:8080
the django site is not visible to other machine in the lan/web, why?
--~--~-~--~~-
Is there a way to twiddle the built-in date filter to convert time to
a local user's timezone? Or is this something which is more likely
require it's own custom filter?
-joe
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google G
*Skipped why this is a really bad idea*
This:
python manage.py runserver 0.0.0.0:80
should do it, however if port 80 on that machine is open to the
Internet then prepare to be horribly cracked/inefficient.
On 03/07/06, Luigi Pantano <[EMAIL PROTECTED]> wrote:
>
> how to use django like web-sever
Yes yes :) That was the case :)
It exactly fit my needs
Thankyou very much..
Regards - Spock - male :P
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email t
hi Joe.
you'll need to do 2 things (as far as I can tell)
1. store your local user's timezone
2. write a custom filter which does the work
then use
{{ object.create_date|convert_tz user.local_timezone }}
or something like that.
On 04/07/2006, at 8:04 AM, Joseph Heck wrote:
>
> Is there a way
On Jul 3, 2006, at 2:56 PM, Luigi Pantano wrote:
>
> how to use django like web-sever on linux?
>
> i have tried:
>
> python manage.py runserver localhost:80
>
> but give an error on the selected port.
>
> if run for example:
> python manage.py runserver myIP:8080
>
> the django site is not visibl
Cool - thanks! I'd suspected it was my own custom filter time, but I
wanted to check to make sure I wasn't missing anything.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this grou
Hi,
The choice between doing a custom manipulator from scratch or using
the automatically generated one depends on many factors. In an
application that I am writing I used a custom manipulator because I
needed to create several different objects (from different models) in
one single step. So inst
I'm utilizing the default admin views for a project, and using a little
documented "feature" of the add forms.
There is a neat trick to filling in values on the admin adder page
where you simple put key/value pairs to the URL. Key's in the URL that
correspond to inputs on the add page are added
On Mon, 2006-07-03 at 08:54 -0700, Glenn Tenney wrote:
> On Mon, Jul 03, 2006 at 07:09:35AM -0500, James Bennett wrote:
> > You can also differentiate between the initial save and later updates
> > by checking -- before calling the parent class' 'save' method --
> > whether the object has an ID; i
On Tue, 2006-07-04 at 05:48 +1300, Jay Parlar wrote:
> On 7/4/06, Iain Duncan <[EMAIL PROTECTED]> wrote:
> >
> > What about a Django wiki for tutorial type things? Gentoo has one that
> > has been enormously useful to me and could serve well as a model.
> >
>
> There already is one:
> http://code
On Tue, Jul 04, 2006 at 10:10:55AM +1000, Malcolm Tredinnick wrote:
> I can't see any real advantage in this. As Ivan shows, it's only a
> couple of lines of code anyway (and a more or less documented feature).
> The boolean test for "not created" at the moment is "if not self.pk:",
> which seems
Jorge,
I can't thank you enough for explaining this, but I'm still a little
stuck.
On Jul 3, 2006, at 6:46 PM, Jorge Gajon wrote:
> # No post, fill up default values
> new_data['some_field'] = 'default value'
>
> form = form.FormWrapper(manipulator, new_data, errors)
>
Malcolm Tredinnick wrote:
> On Mon, 2006-07-03 at 08:54 -0700, Glenn Tenney wrote:
> > Perhaps instead of relying on the behavor of the object's ID not
> > existing until it's been created, that should become a method.
> > something like Model.created() returning true/flase or Model.is_created
>
On Jul 3, 2006, at 7:11 PM, DavidA wrote:
>
> In this case it would be up to the app or developer to populate the
> slug primary key field before saving. But then just testing the pk
> field wouldn't really tell me if it was saved, unless I misunderstand
> what "self.pk" is actually doing behind t
On Tue, 2006-07-04 at 02:11 +, DavidA wrote:
>
> Malcolm Tredinnick wrote:
> > On Mon, 2006-07-03 at 08:54 -0700, Glenn Tenney wrote:
> > > Perhaps instead of relying on the behavor of the object's ID not
> > > existing until it's been created, that should become a method.
> > > something lik
56 matches
Mail list logo