On Fri, May 8, 2009 at 8:01 AM, George Song wrote:
>
> On 5/7/2009 9:23 PM, Shadow wrote:
> > If i get a model object with Model.objects.get()
> >
> > Is their a way to turn that into a dictionary?
>
> Why not just filter for it and use values()?
>
> --
> George
>
> >
>
You can do .filter(stuff).
Hello,
Please guid me to some good resource on django logging.
Thanks,
Raashid Malik
--~--~-~--~~~---~--~~
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@google
First define some list contain random values such as:
>>> foo_list = (3, 4, 5, 2)
Then use QuerySet to query the list in a table, but it returns objects
will increase id value.
>>> foo = Foo.objects.filter(id__in = foo_list)
Actually result:
>>> print foo.values
[{'id': 2}, {'id': 3}, {'id': 4
Simple way:
>>> model = Model.objects.get(id = 1)
>>> print model.__dict__
On May 8, 12:23 pm, Shadow wrote:
> Hi,
>
> If i get a model object with Model.objects.get()
>
> Is their a way to turn that into a dictionary?
>
> Thanks
--~--~-~--~~~---~--~~
You receiv
On 08-May-09, at 8:17 AM, jfenton wrote:
> Has anyone seen this behavior before and fixed it? It seems weird
> that there aren't any errors. I recall that when I moved servers a
> few months ago that dev admin pages took a really unreasonable time
> to load, but I couldn't say when this actually
You can have try this snippet:
http://www.djangosnippets.org/snippets/16/
On May 8, 3:39 pm, Raashid Malik wrote:
> Hello,
>
> Please guid me to some good resource on django logging.
>
> Thanks,
> Raashid Malik
--~--~-~--~~~---~--~~
You received this message b
Actually I always prefer enable DEBUG_PROPAGATE_EXCEPTIONS = True in
settings then use print to output log for debug.
On May 8, 3:39 pm, Raashid Malik wrote:
> Hello,
>
> Please guid me to some good resource on django logging.
>
> Thanks,
> Raashid Malik
--~--~-~--~~~
This means i have to call debug function with some message as argument. But
my requirement is that all the django activity should be logged. Is there a
way where in all operations of an application are logged.
On Fri, May 8, 2009 at 2:37 PM, K*K wrote:
>
> You can have try this snippet:
>
> http
Hi,
I created a website with django.
My problem: When I insert all .html pages in my directory, I can see the
website but without using the 'base' template.
I would be glad for your help.
Lisa
--~--~-~--~~~---~--~~
You received this message because you are subscr
On May 8, 2009, at 4:35 PM, lisa holper wrote:
> Hi,
>
> I created a website with django.
> My problem: When I insert all .html pages in my directory, I can see
> the website but without using the 'base' template.
Do you have {% extends 'base.html' %} at the top of all your
templates? You h
> First define some list contain random values such as:
>
foo_list = (3, 4, 5, 2)
>
> Then use QuerySet to query the list in a table, but it returns objects
> will increase id value.
>
foo = Foo.objects.filter(id__in = foo_list)
>
> Actually result:
print foo.values
> [{'id': 2}
On May 8, 4:21 am, andre wrote:
> """
> Background:
>
> As described on the "User Authentication in Django" manual, I am using
> an additional model to store extra information about users. This
> additional model (J2User) model uses a ForeignKey to the User model
> and is specified below.
>
> Pro
On May 8, 12:03 am, Daniel Roseman
wrote:
> On May 7, 5:56 pm, Eric Chamberlain wrote:
>
> > Our view is taking too long to render, can anyone offer suggestions to
> > improve its speed?
>
> > There are 5830 profiles.
>
> > Total query count: 23809
> > Total duplicate query count: 493
> > Tota
Hi,
I'm overriding save_formset in a subclass of ModelAdmin. This worked fine
using svn 9382, but I've just updated to svn 10674 and it's not working.
def save_formset(self, request, form, formset, change):
"""
Stamp the model as last changed by the current user
Set the
On Fri, May 8, 2009 at 1:38 PM, Tim Sawyer wrote:
> Hi,
>
>
> I'm overriding save_formset in a subclass of ModelAdmin. This worked fine
> using svn 9382, but I've just updated to svn 10674 and it's not working.
>
>
> def save_formset(self, request, form, formset, change):
> """
> Stamp the model a
On Friday 08 May 2009 12:39:59 Alex Gaynor wrote:
> On Fri, May 8, 2009 at 1:38 PM, Tim Sawyer
wrote:
> > Hi,
> >
> >
> > I'm overriding save_formset in a subclass of ModelAdmin. This worked fine
> > using svn 9382, but I've just updated to svn 10674 and it's not working.
> >
> This was fixed earl
Still stuck on this one. Does anybody have any ideas?
On Apr 29, 8:36 am, cfiles wrote:
> Let me try to explain this a little more. Here are some example models
>
> class Account(models.Model):
> user = models.ForeignKey(User)
> name = models.CharField('Name on Account', max_lengt
Will this do?
http://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.ForeignKey.limit_choices_to
You could always fallback on doing the droplist manually.
Tim.
On Friday 08 May 2009 14:23:36 cfiles wrote:
> Still stuck on this one. Does anybody have any ideas?
>
> On Apr 29, 8
yes, gotcha - that makes sense. Thanks.
Margie
On May 7, 10:59 pm, George Song wrote:
> On 5/7/2009 9:19 PM, Margie wrote:
>
>
>
> > Thanks much George, that was a big help. I have some "proof of
> > concept code below" that simply limits choices to the first four
> > users, and I have verifi
In your form for your payment, you need to create an __init__ function
that sets the queryset for thh account field. This allows you to set
it dynamically for each form. Something like this:
class PaymentForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
accountQuerySet = kwarg
I am working in a project , in which i ahve to use jstl tags , so i
have to know how to declare primitive variables with jstl tags
regards
Ajil
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users"
Hi
I have a running perl/cgi app in conjunction with mysql which works
fine.
For various reasons i want to move to either django or RoR. I've
pretty much decided to go with Django, however i'm wondering about one
thing.
Ideally i would like to use the mysql database that i have, does
Django pro
Duplicate login should not done is my requirement. with the username
one login shoud be happend, if another user is trying to login in the
system, he should be informed this login is currently in use.
Thanks
Veera
On Apr 1, 11:43 am, Briel wrote:
> Hi.
> You don't really have to log the user out
On Fri, May 8, 2009 at 9:55 AM, consiglieri wrote:
>
> I have a running perl/cgi app in conjunction with mysql which works
> fine.
>
> For various reasons i want to move to either django or RoR. I've
> pretty much decided to go with Django, however i'm wondering about one
> thing.
>
> Ideally i w
On 8 May 2009, at 16:35 , veeravendhan wrote:
> Duplicate login should not done is my requirement. with the username
> one login shoud be happend, if another user is trying to login in the
> system, he should be informed this login is currently in use.
>
> Thanks
> Veera
This doesn't really make
On 5/8/2009 6:55 AM, consiglieri wrote:
> I have a running perl/cgi app in conjunction with mysql which works
> fine.
>
> For various reasons i want to move to either django or RoR. I've
> pretty much decided to go with Django, however i'm wondering about one
> thing.
>
> Ideally i would like to
Didn't find solution yet. So if you can please help me!
On Wed, May 6, 2009 at 6:29 PM, Oleg Oltar wrote:
> Hi!
> I am using ImageField to add optional images to my articles from admin.
>
> image2 = models.ImageField(upload_to="upload", blank=True)
>
> I added one image from my server to this fi
On Fri, May 8, 2009 at 5:10 PM, Oleg Oltar wrote:
> Didn't find solution yet. So if you can please help me!
>
>
> On Wed, May 6, 2009 at 6:29 PM, Oleg Oltar wrote:
>
>> Hi!
>> I am using ImageField to add optional images to my articles from admin.
>>
>> image2 = models.ImageField(upload_to="uplo
Good idea, thank you! :-D
On May 8, 6:10 pm, Tim Chase wrote:
> > First define some list contain random values such as:
>
> foo_list = (3, 4, 5, 2)
>
> > Then use QuerySet to query the list in a table, but it returns objects
> > will increase id value.
>
> foo = Foo.objects.filter(id__
Olá pessoal! Fiz uma pesquisa e vi uns tópicos falando sobre
hospedagem.
No entanto queria saber a opinião de vocês sobre duas hospedagens:
webfaction e locaweb, alguém hospeda nesses servidores ? recomenda ?
Um grande abraço,
--~--~-~--~~~---~--~~
You received t
On May 8, 10:33 am, Raashid Malik wrote:
> This means i have to call debug function with some message as argument. But
> my requirement is that all the django activity should be logged. Is there a
> way where in all operations of an application are logged.
Perhaps AuditTrail is what you are a
Thanks, i'll look into it.
On 8 Maj, 16:53, Karen Tracey wrote:
> On Fri, May 8, 2009 at 9:55 AM, consiglieri wrote:
>
> > I have a running perl/cgi app in conjunction with mysql which works
> > fine.
>
> > For various reasons i want to move to either django or RoR. I've
> > pretty much decided
Thanks, appreciate the input
On 8 Maj, 17:03, George Song wrote:
> On 5/8/2009 6:55 AM, consiglieri wrote:
>
> > I have a running perl/cgi app in conjunction with mysql which works
> > fine.
>
> > For various reasons i want to move to either django or RoR. I've
> > pretty much decided to go with
hi everyone
me again...
i need some help
i want to change the error_class in a modlefrom instance
the class looks like this:
# in a models.py file
1 .class ProfileForm(forms.ModelForm):
2.
3. error_class = DivErrorList
4.
5. class Meta:
6. model = P
7. exclude
On May 8, 7:03 pm, "K*K" wrote:
> Simple way:
>
> >>> model = Model.objects.get(id = 1)
> >>> print model.__dict__
>
Awesome, thanks!
I did try "dict(object)" :P
btw: I didn't want to use a filter because it was all nicely wrapped
in:
get_object_or_404(model, id=x)
--~--~-~--~~---
Try this, not tested but it might work.
class ProfileForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
self.error_class = DivErrorList
super(ProfileForm, self).__init__(*args, **kwargs)
class Meta:
model = P
exclude = ('date', 'user', 'public')
I was having trouble with the permissions of directories created by
Django during file uploads. One solution would be a setting like
FILE_UPLOAD_PERMISSIONS that would be used when directories are
created. This is what is currently done in FileSystemStorage:
def _save(self, name, content):
Hello,
I know there are several posts with this topic, but I have yet to
solve my issue. I currently setup my system to have email
notifications for 500 successfully. I have managers set,
SEND_BROKEN_LINK_EMAILS = True, and am including CommonMiddleware.
I am able to view my 404.html page, but
Issue resolved. Thanks for any views.
On May 8, 11:00 am, matt barto wrote:
> Hello,
>
> I know there are several posts with this topic, but I have yet to
> solve my issue. I currently setup my system to have email
> notifications for 500 successfully. I have managers set,
> SEND_BROKEN_LINK_
Hi, guys all:
Django powered by a fancy admin backend with secured control.
In my app, there needs to be an other backend which responsible
for more complex functions(views) .To do this on my own ,I had to
create auth,view,url etc. Is there a way that I could CREAET A NEW
Template NOT OVE
Hi,
Yes, I did and this shows up written on the page.
I can see the website on http://127.0.0.1:8000/ but not on my website-url.
Do I need to change the settings?
Thanks, Lisa
On Fri, May 8, 2009 at 5:57 AM, Eric Abrahamsen wrote:
>
>
> On May 8, 2009, at 4:35 PM, lisa holper wrote:
>
> Hi,
>
We've had something up and running for a while (but still developing).
Something that's been working is now broken somehow: when another
server logs out they report the connection was closed before they get
a final msg from our server.
My logout is pretty trivial
def logoff(request):
logout(
On Wed, May 6, 2009 at 4:16 PM, ringemup wrote:
>
> Well, this still isn't working. I was able to get rid of the
> exception described above by creating a custom form to attach to the
> Inline. But now I'm just getting a "Please correct the errors below"
> error message whenever I submit the fo
On Fri, May 8, 2009 at 9:54 AM, Ajil wrote:
>
> I am working in a project , in which i ahve to use jstl tags , so i
> have to know how to declare primitive variables with jstl tags
>
> regards
> Ajil
>
> >
> Hi Ajil,
I couldn't understand your problem. Could you be more specific and give
On Tue, 2009-05-05 at 21:59 -0500, Keith Pettit wrote:
> I'm trying to display a list on a page that is a combination of two
> different models. In development I use sqlite and the list works
> great, but when I go to MySQL I don't get any results. It's odd
> because I use pagination and I can s
Crud. That means upgrading a half dozen projects and worrying about
instability on trunk. Is there a specific patch that maybe I could
apply?
This is the only ticket I could find that seems to be relevant:
http://code.djangoproject.com/ticket/10015 -- that's for Postgres,
though, and I'm on My
On Wed, 2009-05-06 at 13:14 -0700, jrs_66 wrote:
> Thanks! This is a great starting point. My real queryset requires me
> to go a few joins deeper, however. I will try nesting loops to get
> there, but this seems frightfully like querying in a loop (maybe I'm
> wrong, I'll check the end query t
On Thu, 2009-05-07 at 07:12 -0700, Aldo wrote:
> Hello,
>
> I have a problem for a quite simple model.
> I would like to model a person marriage relation.
>
> example :
>
> class Person(models.Model):
> name=models.CharField(max_length=100)
> married_to=models.OneToOneField('sel
Hi,
I'm just started to play with Django, and ran into this problem right
away.
* I'm using the python script at the bottom to POST to the url.
* I'm using "manage.py runserver" to run my app
* Everything works fine when I'll run my tests with "manage.py test".
When I set a breakpoint at django
My model :
url = models.URLField(max_length=500,blank=True,verify_exists=False)
and I want the column url display url as a link ()
Any ideas ?
Thanks for your help.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
On Fri, May 8, 2009 at 3:26 PM, Tom wrote:
>
> My model :
>
> url = models.URLField(max_length=500,blank=True,verify_exists=False)
>
> and I want the column url display url as a link ()
>
> Any ideas ?
>
> Thanks for your help.
>
In general the models are for your database logic and display logi
On Fri, 2009-05-08 at 11:24 -0700, Kalle wrote:
> Hi,
>
> I'm just started to play with Django, and ran into this problem right
> away.
>
> * I'm using the python script at the bottom to POST to the url.
> * I'm using "manage.py runserver" to run my app
> * Everything works fine when I'll run my
Before I go off and re-invent the wheel, does anyone have a unit/
functional test for the Django poll tutorial (http://
docs.djangoproject.com/en/dev/intro/tutorial01/)? I ask because I'm
teaching a class on Python, and we're moving into Django. I'd like to
give the tutorial as a softball pitch
I am new to Django.
When I try to execute: python manage.py runserver, I get the following
error
Error: [Errno 10104] getaddrinfo failed
What is going on and what should I do?
I am running Django Version 1.0.2-final and Python 2.6
--~--~-~--~~~---~--~~
You recei
Hi;
I get the error below at a point I'm trying to add 1 to an int field.
I'm understanding the error that django doesn't know what the type is
for sn.
Model:
class Sequence_Number(models.Model):
Sequence_Name = models.CharField(max_length=100)
Next_Sequence_Number = models.IntegerFiel
I didn't realize that id was a python builtin function.
I have a large pre-existing database that I wrote a bunch of models
for.
I used 'id' as the primary key field for all of them.
"""
class SalesQuoteItemDetail(models.Model):
id = models.AutoField(primary_key=True, db_column='ID')
..
On 5/8/2009 4:32 PM, Lee Hinde wrote:
> Hi;
>
> I get the error below at a point I'm trying to add 1 to an int field.
> I'm understanding the error that django doesn't know what the type is
> for sn.
>
>
> Model:
>
> class Sequence_Number(models.Model):
> Sequence_Name = models.CharField(m
On 5/8/2009 4:31 PM, paul wisehart wrote:
> I didn't realize that id was a python builtin function.
>
> I have a large pre-existing database that I wrote a bunch of models
> for.
>
> I used 'id' as the primary key field for all of them.
>
> """
> class SalesQuoteItemDetail(models.Model):
>
On Fri, 2009-05-08 at 16:31 -0700, paul wisehart wrote:
> I didn't realize that id was a python builtin function.
>
> I have a large pre-existing database that I wrote a bunch of models
> for.
>
> I used 'id' as the primary key field for all of them.
>
> """
> class SalesQuoteItemDetail(models.
On Fri, May 8, 2009 at 4:48 PM, George Song wrote:
>
> On 5/8/2009 4:32 PM, Lee Hinde wrote:
>> Hi;
>>
>> I get the error below at a point I'm trying to add 1 to an int field.
>> I'm understanding the error that django doesn't know what the type is
>> for sn.
>>
>>
>> Model:
>>
>> class Sequence_
thank you,s ean
i will try
ahh one thing i'd like to comment...
when creating an ProfileForm object I even give it the class as an
argument like this:
...
profile, created = Profile.objects.get_or_create(user=request.user)
myProfileForm = ProfileForm(request.POST, instance=profile,
error_class=Div
On Fri, May 8, 2009 at 5:12 PM, Lee Hinde wrote:
> On Fri, May 8, 2009 at 4:48 PM, George Song wrote:
>>
>> On 5/8/2009 4:32 PM, Lee Hinde wrote:
>>> Hi;
>>>
>>> I get the error below at a point I'm trying to add 1 to an int field.
>>> I'm understanding the error that django doesn't know what th
Can I wrap something like : "Click here to go
back." inside a blocktrans tag? If not is there some sort of work
around for this? I know in this particular case it wouldn't be to bad
to make the whole text the link, but this is just and example.
Thanks
--~--~-~--~~~--
hi all
something like this had already been reported:
http://code.djangoproject.com/ticket/6138
i tried sean's solutions but nothing happens...
stand by...
;)
On May 8, 7:25 pm, Julián C. Pérez wrote:
> thank you,s ean
> i will try
> ahh one thing i'd like to comment...
> when creating an Profi
Thanks all!
Finally, i got django working with apache 2.2 mod_python3.1
settings:
SetHandler python-program
PythonHandler django.core.handlers.modpython
PythonOption django.root /web
SetEnv DJANGO_SETTINGS_MODULE web.settings
PythonPath "['C:/depot/projects'] + sys.path"
On 5/8/2009 5:58 PM, Lee Hinde wrote:
> On Fri, May 8, 2009 at 5:12 PM, Lee Hinde wrote:
>> On Fri, May 8, 2009 at 4:48 PM, George Song wrote:
>>> On 5/8/2009 4:32 PM, Lee Hinde wrote:
Hi;
I get the error below at a point I'm trying to add 1 to an int field.
I'm understanding
On Fri, May 8, 2009 at 6:51 PM, George Song wrote:
>
> On 5/8/2009 5:58 PM, Lee Hinde wrote:
>> On Fri, May 8, 2009 at 5:12 PM, Lee Hinde wrote:
>>> On Fri, May 8, 2009 at 4:48 PM, George Song wrote:
On 5/8/2009 4:32 PM, Lee Hinde wrote:
> Hi;
>
> I get the error below at a poi
awesome, thanks for the replies!
--paul
--~--~-~--~~~---~--~~
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@googlegroups.com
To unsubscribe from this group, send em
Do you have firewall running?It could be blocking incoming local connection
to port 8000.
- Addy
On Sat, May 9, 2009 at 7:01 AM, Chris DPS wrote:
>
> I am new to Django.
>
> When I try to execute: python manage.py runserver, I get the following
> error
>
> Error: [Errno 10104] getaddrinfo faile
On May 9, 2009, at 2:37 AM, lisa holper wrote:
> Hi,
>
> Yes, I did and this shows up written on the page.
> I can see the website on http://127.0.0.1:8000/ but not on my
> website-url. Do I need to change the settings?
These are two very different questions... Are the other template
element
Gostaria de recomendar webfaction sempre :)
- Addy
On Fri, May 8, 2009 at 11:35 PM, Fabrício wrote:
>
> Olá pessoal! Fiz uma pesquisa e vi uns tópicos falando sobre
> hospedagem.
> No entanto queria saber a opinião de vocês sobre duas hospedagens:
>
> webfaction e locaweb, alguém hospeda nesses
On Sat, May 9, 2009 at 6:09 AM, Charles Anderson
wrote:
>
> Before I go off and re-invent the wheel, does anyone have a unit/
> functional test for the Django poll tutorial (http://
> docs.djangoproject.com/en/dev/intro/tutorial01/)? I ask because I'm
> teaching a class on Python, and we're movi
Hi,
I thanks for your answer again.
Everything is showing up as plain text! It seems that the template base.html
would not be used.
Do you have a further idea?
Lisa
On Fri, May 8, 2009 at 11:10 PM, Eric Abrahamsen wrote:
>
> On May 9, 2009, at 2:37 AM, lisa holper wrote:
>
> Hi,
>
> Yes, I di
73 matches
Mail list logo