Never mind. I saw the issue about having to create
Question(something='something')
rather than just
Question()
and that solved the problem.
Is this viewed as a bug or just an unfortunate circumstance?
Todd
On Apr 5, 2006, at 11:08 PM, Todd O'Bryan wrote:
>
> I've exported some old data, in
I've exported some old data, in an old (somewhat terrible) format as
XML, and I'm trying to read it back in and populate a Django model.
When I try to save an object, however, I get this error:
File "/Users/tobryan1/Documents/eclipse/workspace/django-projects/
dmi_mr/../dmi_mr/load_questio
I stumbled upon this error message after porting a project to
magic-removal. In the admin, if I try to get the list view for
something like:
class SomeModel(models.Model):
title = models.CharField(maxlength=200)
date_due = models.DateField(blank= True, null=True)
class Admin:
On 4/5/06, Simon Willison <[EMAIL PROTECTED]> wrote:
>
> On 5 Apr 2006, at 12:26, limodou wrote:
>
> > Why you need do this? Because django can auto judge the language from
> > your browser request http head, or context settings, or settings. If
> > you like , you can provide a language selection
On Wednesday 05 April 2006 21:35, Rudolph wrote:
> Is that an inconsistancy to be removed (ie a bug)?
No, it's intended behaviour. The _set stuff is only there because for
the 'other' end of these relationships it is possible that there is no
name defined, so there needs to be a way of coming u
On 4/6/06, Rudolph <[EMAIL PROTECTED]> wrote:
Is that an inconsistancy to be removed (ie a bug)?No - this correct behaviour, as designed. Given the model:class Item(models.Model): name = models.CharField('Name') parent =
models.ForeignKey('self'')you can query myitem.parent and myitem.item_s
timster wrote:
> Should the super() method work even though I'm not using MR?
No. super().save() only works in MR. You'll need the _pre_save() and
_post_save() hooks in .91 or trunk.
--
--Max Battcher--
http://www.worldmaker.net/
"I'm gonna win, trust in me / I have come to save this world /
timster wrote:
> Should the super() method work even though I'm not using MR?
No. super().save() only works in MR. You'll need the _pre_save() and
_post_save() hooks in .91 or trunk.
--
--Max Battcher--
http://www.worldmaker.net/
"I'm gonna win, trust in me / I have come to save this world /
Glad I am not alone :) There is a little irritation in using the
middleware posted above because I obviously have to account for the
language in all lines in my urls.py (r'(\w\w/)?... and so on). I would
prefer for this to have the same result as using an "include"
statement, ie the prefix would b
... and don't forget the excellent Django API browser here:
http://djangoapi.quamquam.org/magic-removal/
Derek
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send emai
On 4/5/06, arthur debert <[EMAIL PROTECTED]> wrote:
> 1) fire the shell (cd to your project dir) then:
>python manage.py shell
>from django.contrib.auth.models import User
>dir(User) or dir(User,objetcts.all()[0])
User.__doc__ will also get you this information, in a form which lets
y
Thank you, thank you, thank you.
On Apr 5, 2006, at 5:10 PM, arthur debert wrote:
> I guess what you are looking for is:
> u = User.objects.get(username='namehere')
>
> but you could also:
>
> 1) fire the shell (cd to your project dir) then:
>python manage.py shell
>from django.contrib.a
Hi Todd.
I guess what you are looking for is:
u = User.objects.get(username='namehere')
but you could also:
1) fire the shell (cd to your project dir) then:
python manage.py shell
from django.contrib.auth.models import User
dir(User) or dir(User,objetcts.all()[0])
2) on the admin sit
In m-r, I want to write
u = User.objects.get(login='namehere')
except that login isn't the name of the attribute.
Where can I look to find all the attributes of an instance? I know
about the dir() function, but it just gives me methods, right?
Is there someplace Python-internal to do this, o
Is that an inconsistancy to be removed (ie a bug)?
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@googlegroups.com
To unsubscribe fro
Here's one technique for optimizing cases where you just get too many
queries:
http://code.djangoproject.com/wiki/CookBookPreloadRelated
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post
Joseph, actually the page behind that link describes my profiling hack
for the internal webserver, not mod_python.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send em
I would like to add another good reason: Another nice effect language
codes in the URL is that search engine crawlers can easily get all your
content.
My customers often want something like this:
www.example.com -> site in the main language of your visitors
www.example.nl -> site in Dutch
www.ex
It's also useful to inspect {{sql_queries}} (see
core/context_processors.py). If Django is doing tons of SQL queries,
you'll have to sort out how to optimize. I reduced the number of
queries on one of my more complex pages from over 6000 to just five.
I'll contribute something about this on the D
First you retrieve the person and e-mail type objects, then add a
PersonEmail object using them.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-user
Kenneth, what, many persons can have the same e-mail address?!?
--~--~-~--~~~---~--~~
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
I very much agree with Simon and Jan. A middleware like this would be
nice to have in django.contrib.
One useful enhancement would be the ability to specify in where in the
URL the language can be specified. On one of my sites the syntax of the
URL is always /userid/locale/page... so it would be
Thanks for the reply Ian.
I seem to have solved this for the most part. The second message in
that thread was very helpful. I was able to use that solution almost
exactly. I added the following save() method to my model:
def save(self):
if self.image:
import shutil
from os im
On 4/5/06, òÏÍÁÎ éÍÁÎËÕÌÏ× <[EMAIL PROTECTED]> wrote:
> Thank you for your reply
>
> 2006/4/5, limodou <[EMAIL PROTECTED]>:
> >
> > I think the answer is NO. And I have a question, if you haven't telnet
> > access, and how to configure your settings.py and how to configure
> > your web server confi
Op wo, 05-04-2006 te 16:34 +0100, schreef Simon Willison:
> I for one much prefer the language to be specified in the URL
Or sometimes using a cookie...
> rather
> than being derived from the browser settings. I would prefer this
> behaviour to be supported (at least as an option) in Django
Rudolph wrote:
> parent = models.ForeignKey('Item', blank = True, null = True,
> related_name = 'child',)
>
> When trying to get the childs of an object by issueing
> item.child_set.all(), it raises an exception:
> 'Item' object has no attribute 'child_set'.
Because you used related_name='ch
On 5 Apr 2006, at 12:26, limodou wrote:
> Why you need do this? Because django can auto judge the language from
> your browser request http head, or context settings, or settings. If
> you like , you can provide a language selection in web page, and
> that's enough. The url doesnot need to be spe
I understand how django does it. Unfortunately I am forced to maintain
a web structure that requires this functionality so that's why I wrote
it. But I actually prefer this over the ambiguity in the browser
settings which most people do not set anyway and the extra step
required to select the righ
For the gentooers, I've built a magic removal svn ebuild
If anyone wants it, pvt-me
--~--~-~--~~~---~--~~
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@googlegrou
On 4/5/06, atlithorn <[EMAIL PROTECTED]> wrote:
>
> Just in case anyone is interested... I wrote my own middleware class to
> support selecting languages from the URL itself. eg:
>
> www.example.com - default english
> www.example.com/de - same page with german trans
>
> It was a simple copy-paste
Just in case anyone is interested... I wrote my own middleware class to
support selecting languages from the URL itself. eg:
www.example.com - default english
www.example.com/de - same page with german trans
It was a simple copy-paste of the LocaleMiddleWare from the distro:
##
Limodou,
Thanks a lot for the explanation and help.
Best regards,
L.
--~--~-~--~~~---~--~~
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 unsubs
On 4/5/06, PythonistL <[EMAIL PROTECTED]> wrote:
>
> Limodou,
> Thanks a lot for your help.
> Now I understand much better.
> Best regards,
> L.
You are welcome.
--
I like python!
My Blog: http://www.donews.net/limodou
My Django Site: http://www.djangocn.org
NewEdit Maillist: http://groups.googl
Limodou,
Thanks a lot for your help.
Now I understand much better.
Best regards,
L.
--~--~-~--~~~---~--~~
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@googlegroup
On 4/5/06, PythonistL <[EMAIL PROTECTED]> wrote:
>
> Limodou,
> Thanks for replies.
> I am also working on a application that more users should be used by.
> So, I would like to learn a little more how to create
> url dynamicly( on fly). Can you please let me know where in you
> file(s) you make
Thanks, it looks like a satisfactory decision for the "poor man's
hosting"
--~--~-~--~~~---~--~~
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
Limodou,
Thanks for replies.
I am also working on a application that more users should be used by.
So, I would like to learn a little more how to create
url dynamicly( on fly). Can you please let me know where in you
file(s) you make that.
Thanks a lot
L.
--~--~-~--~~~--
Thank you for your reply2006/4/5, limodou <[EMAIL PROTECTED]>:
I think the answer is NO. And I have a question, if you haven't telnetaccess, and how to configure your settings.py and how to configureyour web server config?settings.py and .htaccess are configured locally then uploaded on a server
Roman wrote:
>I need to place my django-powered web site on a server which haven't
>SSH-access (ftp only). Can I execute analogues of "django-admin" and
>"manage.py" through web interface?
>
>
There is no web interface but you can write a script with something like
this:
from django.core
On 4/5/06, Roman <[EMAIL PROTECTED]> wrote:
>
> I need to place my django-powered web site on a server which haven't
> SSH-access (ftp only). Can I execute analogues of "django-admin" and
> "manage.py" through web interface?
> Is there something like web-wrapper for these commands?
>
I think the
I need to place my django-powered web site on a server which haven't
SSH-access (ftp only). Can I execute analogues of "django-admin" and
"manage.py" through web interface?
Is there something like web-wrapper for these commands?
Thank you.
--
Roman
--~--~-~--~~~---~
On 4/5/06, PythonistL <[EMAIL PROTECTED]> wrote:
>
> Limodou,thank you for your reply.
> I am sorry but I do not fully understand your answer
>
> You say that every user has his own blog but also that there is not
> user
> directory. But when I want to use my blog as a user, I have a different
>
Limodou,thank you for your reply.
I am sorry but I do not fully understand your answer
You say that every user has his own blog but also that there is not
user
directory. But when I want to use my blog as a user, I have a different
URL, e.i.a directory is also different, from another user.
I wo
On 4/5/06, PythonistL <[EMAIL PROTECTED]> wrote:
>
> Hello Limodou,
> It looks very nice.
> Can you please answer my question?
> What is the file rpc.py for?
woodlog support xmlrpc access. So rpc.py is a xmlrpc functions congif file.
> Does every user have his own blog in his directory?
Yes. Wo
Hello Limodou,
It looks very nice.
Can you please answer my question?
What is the file rpc.py for?
Does every user have his own blog in his directory?
And what files must every user have in his directory and which can be
common(the same )?
Thank you for your reply
L.
--~--~-~--~~
45 matches
Mail list logo