Malcolm Tredinnick írta:
>This is the sort of thing that maybe starts crossing the line between
>representation and presentation a bit too much. You are putting a lot of
>presentation information into the data model description and they
>should, as much as possible be separate. That is why I (and
If we have radio_admin for ForeignKeys (we do), then I can't see why we
wouldn't want checkbox_admin for M2M.
The danger with ether of these is that it becomes a very poor UI when
there starts to be more than a handful of choices. But...if we've
decided it's okay for one, it seems that it ought t
Well, you beat me to it, but I was going to say that a cutsom manager
is probably the way I'd do this. :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to dj
It is the same model.
Seth
--~--~-~--~~~---~--~~
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 email to [EMA
On 28-Jul-06, at 9:00 PM, Josh Trutwin wrote:
> Is there any way in models.TextField to specify the number of
> rows/columns that the uses?
it is hardcoded in the css - change it there
--
regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/
--~--~-~--~~
It might be something to do with this:
http://code.djangoproject.com/ticket/2019
Chris
--~--~-~--~~~---~--~~
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
Is program is another model? Is there an __str__ method for it?
Chris
--~--~-~--~~~---~--~~
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 unsu
On 28-Jul-06, at 6:30 PM, Ian Holsman wrote:
> could it be that you only have 256M on the machine?
only? even before upgrading to 256M i found django faster than that
--
regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/
--~--~-~--~~~---~--
On 7/28/06, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote:
>
> On Jul 28, 2006, at 11:54 AM, Jay Parlar wrote:
> > Not that I mind :)
>
> http://code.djangoproject.com/changeset/3477
>
>
>
Ha, victory is mine!
Thanks,
Jay P.
--~--~-~--~~~---~--~~
You received this
On 7/28/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
> I've reverted the assignment of __name__ -- thanks for pointing this
> out! Looks to be a problem with different behavior across Python
> versions, perhaps?
>
Yep, see
http://www.python.org/download/releases/2.4/notes/#what-s-new-in-pytho
On 7/28/06, Jeremy Osterhouse <[EMAIL PROTECTED]> wrote:
> I ran into this problem as well. I believe the source of the problem is
> here:
> > File
> > "/usr/lib/python2.3/site-packages/Django-0.95-py2.3.egg/django/contrib/auth/decorators.py"
> > in _dec
> > 18. _checklogin.__name__ = view_func._
I ran into this problem as well. I believe the source of the problem is
here:
> File
> "/usr/lib/python2.3/site-packages/Django-0.95-py2.3.egg/django/contrib/auth/decorators.py"
> in _dec
> 18. _checklogin.__name__ = view_func.__name__
If "readonly attribute" is to be believed, then I *think* __
On 7/28/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
>
> On 7/28/06, Deryck Hodge <[EMAIL PROTECTED]> wrote:
> > Is it possible to do a self referencing manytomanyfield pre magic
> > removal?
>
> No, I don't believe we supported self-referencing many-to-many fields
> before magic-removal.
Thank
On Jul 28, 2006, at 11:54 AM, Jay Parlar wrote:
> Not that I mind :)
http://code.djangoproject.com/changeset/3477
Jacob
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group,
On 7/28/06, Deryck Hodge <[EMAIL PROTECTED]> wrote:
> Is it possible to do a self referencing manytomanyfield pre magic
> removal?
No, I don't believe we supported self-referencing many-to-many fields
before magic-removal.
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com
--~--~-
I have a model class that returns the string as below:
def __str__(self):
return "%s %s" % (self.program, self.course_number)
In the list_display I have:
list_display = ('__str__', 'uploaded')
I want to be able to order by my __str__ value, but I don't know how.
Can this be done? I ha
Is it possible to do a self referencing manytomanyfield pre magic
removal? Something like:
class Url(models.Model):
location = models.URLField()
referrers = models.ManyToManyField('self', blank=True, null=True)
Cheers,
deryck
--
Deryck Hodgehttp://www.devur
On Fri, 2006-07-28 at 12:57 -0700, Akatemik wrote:
> I got errors when user.get_profile returned None in my view. When
> trying the same in manage.py shell, I noticed that get_model doesn't
> find my profile model unless I have imported something from that
> models.py
>
> $ python manage.py shell
Hello. I noticed a weird problem with the order of parameters specified
in unique_together for a Meta class inside another class. I have the
following definitions:
class Obligation(models.Model):
organization = models.ForeignKey(Organization)
name = models.CharField(maxlength=80)
cla
I got errors when user.get_profile returned None in my view. When
trying the same in manage.py shell, I noticed that get_model doesn't
find my profile model unless I have imported something from that
models.py
$ python manage.py shell
Python 2.3.5 (#2, Jun 13 2006, 23:12:55)
[GCC 4.1.2 20060613 (
On 07/28/06 19:46, Malcolm Tredinnick wrote:
> On Fri, 2006-07-28 at 18:19 +0200, Steven Armstrong wrote:
>> On 07/28/06 02:02, Malcolm Tredinnick wrote:
>> > On Thu, 2006-07-27 at 16:44 -0700, Malcolm Tredinnick wrote:
>> >> On Thu, 2006-07-27 at 17:30 -0600, Jay Klehr wrote:
>> >> > Nagy Károly
> use the ordinary addmanipulator example from the docs
> remember that the fileinfo is in request.FILE and not request.POST
> form type should be multipart/mime-encoded
>
> with these changes you are set
Thanks, together with the example of the link I posted I got it working
now. What I was afte
Revision 3461 breaks down my app oddly. Somehow I'm able to access some
of the views (general views) but when I use a view in my app, I get:
Exception Type: TypeError
Exception Value:readonly attribute
Exception Location:
/usr/lib/python2.3/site-packages/Django-0.95-py2.3
Thanks Chris.
I was trying to access the _meta in the __init__ method and it didn't
worked because I didn't have an instance.
Then I used a post_init method to set up my custom "upload_to".
Now I don't have to worry about where to put my uploads! That's nice!
:)
Regards.
Enrico
--~--~---
On 7/28/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
>
> Once we take one thing, where does it stop? Ultimately, we are going to
> have to draw the line and it will seem arbitrary to people who aren't
> thinking of this as "every single presentation item in a model is there
> as a slight wart
Hi all,
I saw the recent posts about Search Functionality and how some of you, Adrian
included, are using it for searching. I'd like your opinion on whether
Swish-e would make sense for searching/indexing 12 varchar(<=255) fields in a
large table (~10M records).
The search is currently takin
On Fri, 2006-07-28 at 18:19 +0200, Steven Armstrong wrote:
> On 07/28/06 02:02, Malcolm Tredinnick wrote:
> > On Thu, 2006-07-27 at 16:44 -0700, Malcolm Tredinnick wrote:
> >> On Thu, 2006-07-27 at 17:30 -0600, Jay Klehr wrote:
> >> > Nagy Károly wrote:
> >> > > And Jay, (afaik) CSS controls visua
Steven Armstrong írta:
>I've extended some of django's built in model and form fields to accept
>an additional kwarg named 'html_attributes'.
>
>It works like this:
>
>class Whatever(models.Model):
> ...
> title = models.CharField(maxlength=128,
> html_attributes={
> 'size': 15,
>
That's not a bad solution.
I just came up with a solution I'm very happy with. I created a custom
manager that only returns visible objects.
This way I can just do categories = Category.objects.all() and
category.forum_set.all() in my template and it will only display
visible objects. It works g
On 7/28/06, James Bennett <[EMAIL PROTECTED]> wrote:
>
> I'm pretty sure everyone who has a patch committed ends up in the
> AUTHORS file, though.
>
I can personally attest to that *not* being true. I've had two
accepted patches, and looking at it now, it appears I'm not in the
AUTHORS file.
Not
On Fri, 28 Jul 2006 16:08:14 -
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
>
> If you are creating your own manipulator and using that you can
> use the form field LargeTextField where you can specify the row
> and columns.
>
> class LargeTextField(TextField):
> def __init__(se
On 7/28/06, Jeremy Dunck <[EMAIL PROTECTED]> wrote:
> Doesn't that just go along with no one owning the code?
I'm pretty sure everyone who has a patch committed ends up in the
AUTHORS file, though.
--
"May the forces of evil become confused on the way to your house."
-- George Carlin
--~--~-
On 07/28/06 02:02, Malcolm Tredinnick wrote:
> On Thu, 2006-07-27 at 16:44 -0700, Malcolm Tredinnick wrote:
>> On Thu, 2006-07-27 at 17:30 -0600, Jay Klehr wrote:
>> > Nagy Károly wrote:
>> > > And Jay, (afaik) CSS controls visual size of field, not the number of
>> > > characters you can type in
On 7/28/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
> Sure -- it was the presentation Wednesday evening about managing
> open-source communities and dealing with "poisonous people." The two
> presenters encouraged projects to have a written policy that
> developers' names don't get put in code.
Could create a list and loop through that, e.g.
cat_list = Category.objects.filter(visible=True)
list = []
for c in cat_list:
list.append({"cat":c, "forums":c.forum_set.filter(visible=True,
category__visible=True})
Then:
{% for x in list %}
{{ c.cat.name }}
{% if c.forums %}
{% for forum in
Thanks. Added in the extra Tiny MCE options (like the full screen one),
and it works pretty well just using the tags.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, sen
If you are creating your own manipulator and using that you can use the
form field LargeTextField where you can specify the row and columns.
class LargeTextField(TextField):
def __init__(self, field_name, rows=10, cols=40,
is_required=False, validator_list=None, maxlength=None):
Othe
I am using "manage.py runserver".
I will try your idea about hosts file and will reply to you this monday.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
Malcolm, everything you said is absolutely true and reasonable, in general
(actually very self-explanatory). But I was talking about these particular
cases, not about common development philosophy. I was merely worried about
how active is the development - after seeing a few character fix (even if
Hi,
I'm trying to make a custom upload field that generate the "upload_to"
option automatically, based on the app, model and field names and the
primary key.
For example, having an app 'Album' with a model 'Picture' with a field
'pic' as the upload field, the path should be:
album/picture/pic/1.
You can get the application and model name from the object by doing
To get app name:
obj._meta.app_label
To get model name(I think, I've never tried this):
obj._meta.module_name
Chris
--~--~-~--~~~---~--~~
You received this message because you are subscribe
On Fri, 2006-07-28 at 07:09 -0700, and_ltsk wrote:
> But I don't want to enable internet.
One more thing: does you network configuration specify a DNS server? Is
the server accessible? My guess is that you still have a DNS server
address in the configuration (command "ipfconfig /all"), but the IP
On Fri, 2006-07-28 at 07:09 -0700, and_ltsk wrote:
> May be it is the case.
> But I don't want to enable internet.
> Can I disable Django' reverse DNS queries or it is impossible?
Are you using ./manage.py runserver or Apache? If Apache, you can look
into its config, maybe you have a line "Hostna
I have just thought of a simple - still ugly - fix to my
problem (remember, a method that return a dict, and my
template rerunning the method for each key of the dictionary).
Previously I had something like:
-
{% for slave in master.get_slaves %}
{{ slave.d
Maybe you can change it with CSS.
--~--~-~--~~~---~--~~
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 email t
On 7/28/06, Josh Trutwin <[EMAIL PROTECTED]> wrote:
> Is there any way in models.TextField to specify the number of
> rows/columns that the uses?
Hi Josh,
Nope, there's no way to specify that in the model, but you can target
the field's form field using CSS. The textarea will have an HTML ID
ca
On Friday 28 July 2006 06:42, Maciej Bliziński wrote:
> So the delay probably comes from the reverse-DNS queries. The machine
> asks a question (who is asking me to serve a webpage? 192.168.0.1? who
> is 192.168.0.1?) and waits 60s for the answer.
This is where I'm putting my money. I vaguely re
Is there any way in models.TextField to specify the number of
rows/columns that the uses?
Josh
--~--~-~--~~~---~--~~
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
Yuck. I don't want to do it that way. It couples the display logic with
the template. If I ever need to change the criteria that determines
when to display forums/categories, I will need to change it in two
places (view and template).
--~--~-~--~~~---~--~~
You rec
On 7/26/06, Cheng Zhang <[EMAIL PROTECTED]> wrote:
> > Log:
> > Added 'Please do not put your name in the code' section to docs/
> > contributing.txt. Thanks to OSCON presentation for the inspiration
>
> Would you mind to point out which OSCON presentation it is? Just
> curious. Thanks.
Sure -- i
timster escribió:
> {% for category in categories %}
> {{ category.name }}
> {% if category.forum_set.count %}
> {% for forum in category.forum_set.all %}
> {{ forum.name }}
> {% endfor %}
> {% else %}
> no forums in this category
> {% endif %}
>
To start off, I have two models:
class Category(models.Model):
name = models.CharField(maxlength=50)
visible = models.BooleanField(default=True)
class Forum(models.Model):
category = models.ForeignKey(Category)
name = models.CharField(maxlength=50)
visible = models.BooleanFie
oggie rob wrote:
> Since we're being helpful...
> You might be interested in the clock change I submitted some time ago.
> It shows the clock in 30 minute increments instead of just 4 areas. You
> can either replace your django copy or use the patched file in your own
> admin directory somewhere.
On 7/28/06, Maciej Bliziñski <[EMAIL PROTECTED]> wrote:
> So the delay probably comes from the reverse-DNS queries. The machine
> asks a question (who is asking me to serve a webpage? 192.168.0.1? who
> is 192.168.0.1?) and waits 60s for the answer.
By default, 'runserver' binds to 127.0.0.1, whic
Maciej Blizinski wrote:
> On Fri, 2006-07-28 at 05:50 -0700, and_ltsk wrote:
> > > What is the processor load during those 60 seconds? Is it 100% busy or
> > > is it idle?
> >
> > Processor is busy about 20-30%.
> >
> > (BTW. One moth ago one of svn versions of django gave 90-100%.)
> >
> > HD lo
nice - this worked for my hidden field update as well. Thanks!
--~--~-~--~~~---~--~~
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
On 7/28/06, Guillaume Pratte <[EMAIL PROTECTED]> wrote:
> What I wan't to do is to create applications configuration files from a
> template. It's not a web-related project at all, but since I find Django so
> well done, I was trying to use it for something it was not conceived to
> perform.
As I
On 20 Jun 2006, PythonistL wrote:
> But why do you use/prefer FastCGI to mod_python ?
This doesn't require apache at all. In example we use nginx
(http://sysoev.ru/nginx/) which serves our several projects.
--
Igor Goryachev E-Mail/Jabber: [EMAIL PROTECTED]
--~--~-~-
On Fri, 2006-07-28 at 06:09 -0700, and_ltsk wrote:
>
> Ian Holsman wrote:
> > could it be that you only have 256M on the machine?
>
> May be.
> What is the memory requirements of Djando?
If the system would be out of memory, it would swap the memory to the
hard disk. But you say that the HD is
On Fri, 2006-07-28 at 05:50 -0700, and_ltsk wrote:
> > What is the processor load during those 60 seconds? Is it 100% busy or
> > is it idle?
>
> Processor is busy about 20-30%.
>
> (BTW. One moth ago one of svn versions of django gave 90-100%.)
>
> HD load is low too.
So the delay probably co
It's not about "crashing" the templating engine, but more ensuring that all
variables defined in the template are filled.
What I wan't to do is to create applications configuration files from a
template. It's not a web-related project at all, but since I find Django so
well done, I was trying
Ian Holsman wrote:
> could it be that you only have 256M on the machine?
May be.
What is the memory requirements of Djando?
>
> --
> Ian Holsman
> [EMAIL PROTECTED]
> http://economy-chat.com It's what the economists talk about
--~--~-~--~~~---~--~~
You receive
[EMAIL PROTECTED] wrote:
> >
> >
> > What is the processor load during those 60 seconds? Is it 100% busy or
> > is it idle?
> >
>
> You might check you dns/resolver settings.
Internet is disabled on this machine.
--~--~-~--~~~---~--~~
You received this message b
could it be that you only have 256M on the machine? --Ian Holsman[EMAIL PROTECTED]http://economy-chat.com It's what the economists talk about
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Django users" group. To p
[EMAIL PROTECTED] wrote:
> Hello,
>
> I experienced the same downtime with my Django apps:
> - at work, on Windows 2000, everything fast and reactive
> - at home, on Windows XP, 5 to 10s of delay when hitting a URL.
> All this with the same app, same empty database, on the Django
> dev server.
A
Maciej Blizinski wrote:
> On Fri, 2006-07-28 at 01:28 -0700, and_ltsk wrote:
> > My app is my first attempt in django.
> > This is simple task manager with task and userprofiles models( 2 tables
> > in the db). Django admin is used too. Database has few test records
> > only. TCPView shows many b
Ian Holsman wrote:
> Hi Andrew.
> I have no idea from the information you have provided me.
>
> are you running it via mod-python, fastcgi, or the django-admin?
No, while developing the app I'm using django' own web server.
When the app will be ready I will use existing linux and apache 1.3
envi
What is the processor load during those 60 seconds? Is it 100% busy oris it idle?
You might check you dns/resolver settings.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group
Hello,
I experienced the same downtime with my Django apps:
- at work, on Windows 2000, everything fast and reactive
- at home, on Windows XP, 5 to 10s of delay when hitting a URL.
All this with the same app, same empty database, on the Django
dev server.
For me, it was a sign that I should not
On 28-Jul-06, at 5:29 PM, cyberco wrote:
>
> I'm having troubles understanding the logic of uploading files. I
> saw a
> lot of code snippets, but nowhere I can find an example that explains
> all the steps. This article comes close but is lacking some info as
> well:
> http://blog.go4teams.co
I'm having troubles understanding the logic of uploading files. I saw a
lot of code snippets, but nowhere I can find an example that explains
all the steps. This article comes close but is lacking some info as
well:
http://blog.go4teams.com/?p=56
I hope somebody here has a pointer to a good examp
On Fri, 2006-07-28 at 01:28 -0700, and_ltsk wrote:
> My app is my first attempt in django.
> This is simple task manager with task and userprofiles models( 2 tables
> in the db). Django admin is used too. Database has few test records
> only. TCPView shows many browser-server "blinking" connection
Hi Andrew.I have no idea from the information you have provided me.are you running it via mod-python, fastcgi, or the django-admin?besides from actually uploading your app somewhere where people can see, I'm not sure what else we can do.FWIW.. I will only look at your code if it's open source.. oth
On 7/28/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> It makes sense for anybody?, have anybody experimented something
> similar?
This is actually what's supposed to happen; when you delete an object
that's referred to by other objects, Djangos' behavior is to emulate
the standard SQL 'ON DE
Hi guys - thanks for the replies.
I guess what I'm trying to do is get the file references inserted into
the DB so that I don't have to do any custom procesing when retrieving
data. Parsing the path once it's retrieved is an option, but creates
complications when viewing stuff in admin etc.
At
Yesterday I was writing a part of a test application that I'm
developing using Django and I get an extrange result.
I have a pair of models related by foreign key fields in the way I show
under:
class Galery(models.Model):
...
class Profesional(models.Model):
...
models.ForeignKe
Is it possible to set a Date and Time format for an input field in a
form?
For example instead of 2006-7-27 for Date I would like to use
27-7-2006
and istead of 10:21 for Time field I would like to use 10/21
Thank you for help
L.
--~--~-~--~~~---~--~~
You receiv
I found the solution.
It must be
{{form.EndTime_date}} {{form.EndTime_time}}
--~--~-~--~~~---~--~~
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
Another one ...
PgAdmin works very fast with my database.
--~--~-~--~~~---~--~~
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
hi Ian,
>you have to give us a bit more >information.
>what does your app actually do in that 60 >seconds?
>personally it sounds like your database >isn't tuned... but I'm just
>guessing
My app is my first attempt in django.
This is simple task manager with task and userprofiles models( 2 ta
Since we're being helpful...
You might be interested in the clock change I submitted some time ago.
It shows the clock in 30 minute increments instead of just 4 areas. You
can either replace your django copy or use the patched file in your own
admin directory somewhere.
http://code.djangoproject.
hi and_itsk.you have to give us a bit more information.what does your app actually do in that 60 seconds?personally it sounds like your database isn't tuned... but I'm just guessing regardsIanOn 28/07/2006, at 5:16 PM, and_ltsk wrote:I have a problem with performance of django.WinXP, 2GHz, 256 MB,
I have a problem with performance of django.
WinXP, 2GHz, 256 MB, postgresql-8.1.4 or postgresql-8.0., fresh svn
django.
Every url takes 60 or more seconds to load.
For comparison, Zope takes 2-3 sec.
How speed up it?
--~--~-~--~~~---~--~~
You received this mess
83 matches
Mail list logo