[EMAIL PROTECTED] wrote:
> Yup, I'm suing form_for_model.
I sure hope you two settle out of court! ;-)
--
Nicola Larosa - http://www.tekNico.net/
Se pensavate che Windows Vista vi avrebbe permesso di risparmiarvi
l'acquisto di un antivirus, vi sbagliavate. Se pensavate che fosse
piĆ¹ sicuro de
On Thu, 2007-06-28 at 12:06 -0700, adamjspooner wrote:
> Hello all,
>
> I'm adding a DecimalField to a preexisting app:
>
> foo_bar = models.DecimalField(max_digits=5, decimal_places=2,
> blank=True, null=True, default=0.0, unique=True)
>
> I've added a row in the table:
>
> foo_bar DECIMAL(5,
Hello,
I am trying to use newforms and templates, together with the following
models, to mimic what the admin application does with num_in_admin :
provide a form for Person's fields, and multiple Phone forms.
With just one Phone form things are quite straightforward: validate
the Person form, an
On Thu, 2007-06-28 at 18:46 +, Ryan K wrote:
> Hi. I'm trying to setup an re pattern for /search in my URL conf. How
> can I match an entire string like "red fox" e.g.
> http://example.com/django/search/red%20fox?
> I noticed that Google replaces their query parameter q's spaces with
> '+'s u
On Thu, 2007-06-28 at 17:57 +0300, Alexander Pugachev wrote:
> I still have them as unicode strings in [5559]
Then please file a ticket with a simple example showing how to repeat
the problem so this doesn't get forgotten. I can't repeat this (I
obviously tested the first attempt at a fix).
Rega
On 6/28/07, Jamie Pittock <[EMAIL PROTECTED]> wrote:
>
> I don't want to code myself into a corner, so when I start looking at
> features such as allowing users to search all venues would I be best
> with one parent model or will I be ok keeping them separate? The
> different types of venues hav
On 6/28/07, JimR <[EMAIL PROTECTED]> wrote:
>
> below. When I include the 'def __str__(self)' it displays the user id
> in the admin interface, but when I access the record I get an error
> "__str__ returned non-string (type Userid)"
The error message is telling you the exact problem. Your __str
Take a look at this:
http://www.djangoproject.com/documentation/authentication/#authentication-data-in-templates
You can use this to put something in a base template that all your
site templates can be based on.
Derek
--~--~-~--~~~---~--~~
You received this messa
Do you want to show the user all your content without authentication? Why
not just use @login_required decorator to have then login when needed? Below
are the commands you need.
from django.contrib.auth.decorators import login_required
@login_required
def myfunction(request):
# do stuff
Vinc
Look at the FastCgiAuthenticator directive for mod_fastcgi module. The
FASTCGI protocol does have mechanisms for allowing backend process to
do the authentication, but have no idea how it used or whether it
would work.
Graham
On Jun 29, 12:13 am, Robin Becker <[EMAIL PROTECTED]> wrote:
> I see f
Is there a list of variables that all templates can access? I'm
asking out of general interest, but the problem I'm trying to solve is
that I want to have a "login" or "logout" link on every page of the
site, depending on whether a visitor is currently authenticated, and I
don't want to have to p
I've recently deployed my first non-trivial (by my standards) world
accessible django app. Its not perfect. However, there comes a point
when you just have to get'er done, and so it is.
I bugged a lot of people on #django and got some good feedback, but
just couldn't communicate my question well
thanks James! i just applied the fix manually since it was so small,
and it did the trick.
i'm sure looking forward to multi-db catching up to trunk... :)
On Jun 28, 3:41 pm, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On 6/28/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> > i'm using 0.9
On 6/28/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> i'm using 0.96pre, the multi-db branch.
The bug was in the oldforms system, and has been fixed in trunk and in
the older releases we maintain support for; the multi-db branch went
stagnant for a long time, and is only now being picked up
Note - I know that I am not using a parameter and it's much easier to
do that (I was searching without having created the form yet so this
slipped my mind). But how would you capture something like "red fox"
in a URLconf pattern?
On Jun 28, 2:46 pm, Ryan K <[EMAIL PROTECTED]> wrote:
> Hi. I'm try
see http://dpaste.com/13161/
the error pops up when i try to edit a single User in the admin
interface.
when i remove those two lines i marked in the second model, it works
ok.
i'm using 0.96pre, the multi-db branch.
i hope you can help!
thanks in advance.
--~--~-~--~~~-
I wrote a quick off-list reply to this last night, but thought it
might be worth pointing out parts of it publicly as well so anyone who
searches the archives with similar problems will spot this:
1. Django does still support plain old unsalted md5 passwords for
login (for backwards compatibility
Robin Becker wrote on 06/28/07 19:44:
> Steven Armstrong wrote:
>> Robin Becker wrote on 06/28/07 16:13:
>>> I see from this documentation
>>>
>>> http://www.djangoproject.com/documentation/apache_auth/#configuring-apache
>>>
>>> that it is conceptually possible to configure apache authorization u
Hello all,
I'm adding a DecimalField to a preexisting app:
foo_bar = models.DecimalField(max_digits=5, decimal_places=2,
blank=True, null=True, default=0.0, unique=True)
I've added a row in the table:
foo_bar DECIMAL(5,2) UNI NULL;
But when I try to syncdb or even validate the app I get:
my_
Thanks for the compliments, Leif!
We're running a LAMP VPS (currently with ServerAxis). We use memcache
(right now our traffic doesn't warrant mutliple servers or squid). We
use the built-in django default user paired with a custom userprofile
as detailed in the b-list article.
Thanks for lookin
Hi. I'm trying to setup an re pattern for /search in my URL conf. How
can I match an entire string like "red fox" e.g.
http://example.com/django/search/red%20fox?
I noticed that Google replaces their query parameter q's spaces with
'+'s using Javascript. Is that a better way to go?
Thanks.
--~
On 6/28/07, Vance Dubberly <[EMAIL PROTECTED]> wrote:
> Django suffers from running under mod_python in
> a prefork environment where every process loads a full copy of django. So
> as I'm sure you can imagine RAM gets chewed up very quickly.
Are you running Django behind a load balancer like Pe
> > Ahhh. So after I've used login() once in a test, get() will pass the
> > existing session cookie, in which case my test to retrieve two pages
> while
> > logged in would look like :
> > client.login(...)
> > client.get(...)
> > Does that sound right ? I'll try that later today.
>
> Sounds lik
On 6/28/07, Vance Dubberly <[EMAIL PROTECTED]> wrote:
> However resource intensity is a very big deal. RAM is a huge factor
> here.
Thanks for clearing up the issue.
It's true that the process-per-request model is heavier in terms of
RAM than alternatives, but it's generally fast. Maybe your
Yup, I'm suing form_for_model. I guess when I assigned it to foo
(foo=form.save()), then I was really assigning the returned object to
foo and that's how I can reference what I want from foo.
On Jun 28, 10:00 am, Doug B <[EMAIL PROTECTED]> wrote:
> If you are using the helper functions like form_
Jeremy, I don't know about Java vs Python speeds. I've little doubt Java
is alot faster if for no other reason than the amount of resources Sun puts
behind it. However resource intensity is a very big deal. RAM is a huge
factor here. The Tomcat App was running in a VM limited 256 meg and ser
Steven Armstrong wrote:
> Robin Becker wrote on 06/28/07 16:13:
>> I see from this documentation
>>
>> http://www.djangoproject.com/documentation/apache_auth/#configuring-apache
>>
>> that it is conceptually possible to configure apache authorization using
>> django.
>>
>> However, we have recent
I'm a technical recruiter, but I also just love technology. I like to
get involved with companies doing interesting things especially with
open source. The problem is it's hard to find people that work with
those technologies. I'm currently working with a cutting edge
Internet Marketing and Web
No dynamically assembling the pages via django is faster than serving static
files off disk with Apache.
Vance
On 6/27/07, KpoH <[EMAIL PROTECTED]> wrote:
>
>
> I don't understand. Static files served by django?
>
> Vance Dubberly wrote:
> > Moved http://opensource.arc.nasa.gov to django a couple
Kai, Very very untrue. RAM is much faster than Disk IO. Dynamically
assembling a page from query results cached in database memory is far
faster than going to disk. Caching the rendered page via memcached, squid,
or even in a database table is so much faster than serving static disk bound
fi
I may not totally understand what you are suggesting here - I can use
javascript to manipulate the data that's already on the page, but I
want to filter the choices displayed to me using information that I
have to get out of the database...will put js on that particular admin
page do the trick?
O
If you want to use the admin page, you can add the following into your model
class.
class Admin:
list_display('cars')
list_filter = ('cars')
If you want to create a custom page outside of admin then it is a little
more difficult (for me at least :) ). I made a page like that
Python 2.5 uses hashlib and no longer has a module "md5".
There's at least 1 patch dealing with this for users and passwords:
http://code.djangoproject.com/ticket/3604
Though the "_md5" doesn't seem right either.
-Rob
On Jun 27, 6:58 am, jeffself <[EMAIL PROTECTED]> wrote:
> Just updated Djang
On 6/28/07, Doug B <[EMAIL PROTECTED]> wrote:
>
> Are you sure the request is actually being made, and not ignored by
> the browser? If you do GETs to the same url with the same parameters
If you do requests that have side effects, you shouldn't be using GET.
Consider POST.
--~--~-~--~
On 6/27/07, Vance Dubberly <[EMAIL PROTECTED]> wrote:
> Moved http://opensource.arc.nasa.gov to django a couple of weeks ago.
> Thought ya'll might want to know that.
Congrats :)
> Also thought you might want to know the site was running on Tomcat/Mysql and
> the performance difference is mind b
Are you sure the request is actually being made, and not ignored by
the browser? If you do GETs to the same url with the same parameters
(your boolean I assume) the browser will simply ignore the request. I
ran into that trying to do some ajax stuff, and ended up appending a
timestamp number as
If you are using the helper functions like form_for_model, form.save()
should return the saved object. The helper functions build the save
method for you based on the model definition. If you are doing custom
forms, it's up to you to make the form.save() method to handle the
form->model mappings
I still have them as unicode strings in [5559]
2007/6/11, Malcolm Tredinnick <[EMAIL PROTECTED]>:
>
>
> On Mon, 2007-06-11 at 11:39 +, Christian Schmidt wrote:
> > I use at this time the ugly version with eval(). I really don't know
> > how ugly it is. Can I have problems if there is python co
Nevermind. I just needed to have foo = form.save(), and then I can
access foo.
On Jun 28, 8:37 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Using newforms, I do form.save(), and then need to get the object I
> just saved. How can I do this?
>
> Here's the flow:
>
> User submits form. If
I have a table that consists entirely of foreign keys. I'd like to
display the User Id (and possibly retrieve and display the person's
name from another table?) in the admin interface. The model is
below. When I include the 'def __str__(self)' it displays the user id
in the admin interface, but
Hi, I'm using the admin interface, I need use a change_list.html
filtered.
Example:
Show only Ford cars
Any ideas to do that??
Regards
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post t
Hi all,
Been reading this group for a while, decided to give an idea for
dynamic forms a try after reading the article on dynamicmodels
http://code.djangoproject.com/wiki/DynamicModels
I cooked up a some models and a view
see: http://statix.net/dynaform
if one creates a form with some info an
Robin Becker wrote on 06/28/07 16:13:
> I see from this documentation
>
> http://www.djangoproject.com/documentation/apache_auth/#configuring-apache
>
> that it is conceptually possible to configure apache authorization using
> django.
>
> However, we have recently decided to de-couple django
I see from this documentation
http://www.djangoproject.com/documentation/apache_auth/#configuring-apache
that it is conceptually possible to configure apache authorization using django.
However, we have recently decided to de-couple django from mod_python by using
fastcgi. This is because we w
2007/6/28, David Larlet <[EMAIL PROTECTED]>:
> 2007/6/26, David Larlet <[EMAIL PROTECTED]>:
> > 2007/6/22, Chris Brand <[EMAIL PROTECTED]>:
> > >
> > > > > I just wonder why this permission is not part of the default
> > > > > permissions (like add, change and delete)?
> > > > >
> > > > > David
> >
2007/6/26, David Larlet <[EMAIL PROTECTED]>:
> 2007/6/22, Chris Brand <[EMAIL PROTECTED]>:
> >
> > > > I just wonder why this permission is not part of the default
> > > > permissions (like add, change and delete)?
> > > >
> > > > David
> > > >
> > > No more thoughts about that? I'm really surprise
Using newforms, I do form.save(), and then need to get the object I
just saved. How can I do this?
Here's the flow:
User submits form. If valid, it's saved, and I need to take them to a
review page. At this point, the object has an "active" boolean set to
false.
The review page needs a paypal f
On Jun 28, 12:31 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Wed, 2007-06-27 at 18:58 -0700, dailer wrote:
> > I have a models.py module that I thought I would test pydoc on. So I
> > try.
>
> > $ python manage.py shell
> > Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1
Found it. In line 745 and 746 in main.py in django/contrib/admin/
views
if self.opts.one_to_one_field:
qs =
qs.complex_filter(self.opts.one_to_one_field.rel.limit_choices_to)
What was the thought behind this, and why wouldn't this be optional?
On Jun 28, 8:52 am, Joe <[EMAI
A while back when I was trying to do a similar thing, someone mentioned
using elementree to do this. I tried a bunch of other ways but in the end,
elementree was the easiest way for me. If you'd like to see the template
tag I created, you can see it here -
http://www.satchmoproject.com/trac/brows
Hi,
I have a model that has a OneToOneField to User and a limit_choices_to
parameter set:
class Profile(models.model):
[---tab---] user = models.OneToOneField(User,
limit_choices_to={'is_staff':True})
When I use this is_staff parameter, I can only see staff users when I
log in to the Django adm
I'm still new to Django so bear with me ;)
I have models for different types of venues (Bars, Clubs, etc).
Because for example, I'd like to use one Rating model across all these
venue Models I'd presumed that I'd need a parent Venue Model, using
some kind of one-to-one relationship (until model i
On 6/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I'm writing tests for an application, and I sort by update_time for
> one model. Is it possible in my fixtures to set fixed times? Right
> now, the update_time attribute is always almost "right now". If I try
> to set it in my JSON fi
On 6/28/07, grassoalvaro <[EMAIL PROTECTED]> wrote:
>
> text: 1.149759
> name: 0.017819
> -
>
> Can someone explain me, why when i'm doing gettatr(test, "text")
> (ManyToMany) i have so long delay? That is django (not database)
>
No, it doesn't depend on server. Like i said - this is django problem.
On Jun 28, 1:37 am, l5x <[EMAIL PROTECTED]> wrote:
> On Jun 27, 11:32 pm, grassoalvaro <[EMAIL PROTECTED]> wrote:
>
>
>
> > Here some code:
> > -
> > class T
Hi
There is a branch that supports multiple databases and I'm working on
getting the merges I've made from trunk checked in at the moment... That's
probably your best bet, watch this space!
Ben
On 28/06/07, AnaReis <[EMAIL PROTECTED]> wrote:
>
>
> Hi!
> As I said in previous posts I'm a newbie in
Hi!
As I said in previous posts I'm a newbie in these django stuff.
I'm creating a project that consists in a web based GUI for managing
some databases. This project has several modules. The user is
presented with a start page where it is possible to chose which
database to manage.
I have now fini
You tried, thanks!
The errors I get come before any major piece of code. They come after
some simple statements:
OrderDetailForm = form_for_model(Order_Detail)
f = OrderDetailForm()
f.save()
f.is_bound
which means my 0.96-pre (not a typo :) ) version might not be up to
the challenge of newforms.
What I need is a way to create nested menus using and with
the data coming from a model. I need to be able to get the entire
list:
Home
Some Category
Page
Even Deeper
Another Deeper Page
On Jun 27, 9:41 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Wed, 2007-06-27 at 02:26 -0700, AnaReis wrote:
> > Hi again,
> > This is getting very frustrating because I can't make this work...
> > This is exactly what I wrote in the files:
>
> In future, please remember that when you s
On Jun 27, 9:42 pm, robo <[EMAIL PROTECTED]> wrote:
> Yes, Alberto is right.
>
> Also, I ran into this problem a few days ago. Basically, after you
> write your view processing like Alberto suggested, you need to do a
> response redirect or HttpResponseRedirect and pass it "." (which is to
> the
61 matches
Mail list logo