On Sat, 2007-02-17 at 23:42 -0800, kbochert wrote:
>
>
> On Feb 17, 11:04 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
> wrote:
[...]
> > It will very much vary on a per-host basis. Django code may not be
> > responsible for serving all of the URLs for a particular site, for
> > example. Somewhere
On Feb 18, 12:05 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sat, 2007-02-17 at 23:42 -0800, kbochert wrote:
>
> > On Feb 17, 11:04 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
> > wrote:
> [...]
> > > It will very much vary on a per-host basis. Django code may not be
> > > responsible
On Sun, 2007-02-18 at 00:20 -0800, kbochert wrote:
>
>
> On Feb 18, 12:05 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
> wrote:
[...]
> >
> > If you are really confused about this, then trying to install your app
> > in a hosting environment without first testing it on your local machine
> > with
On Feb 18, 12:29 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sun, 2007-02-18 at 00:20 -0800, kbochert wrote:
> No it doesn't *require* Apache, although that is one popular option.
> Please read the installation documentation, which contains pointers to
> setup instructions for other
i think you are a little confused. i'll try to clear things up.
first, the url.py does not depend on the apache configuration in the
sense you imply.
but apache does have to know when to call the django/python handler,
and that can be host based, directory based, virtualhost based (if the
apache
Thanks for the replies. As always, reading the docs again teaches you
a bit more than the first time; I now see that that initial was not
what I was after.
Arnaud, I think your method is more what I was after and as you say,
it does exactly what I wanted.
It seems to be much simpler than overrid
On 2/18/07, paulh <[EMAIL PROTECTED]> wrote:
>
> Thanks for the replies. As always, reading the docs again teaches you
> a bit more than the first time; I now see that that initial was not
> what I was after.
>
> Arnaud, I think your method is more what I was after and as you say,
> it does exactly
Hi,
how to set modelClass.Meta.ordering = ( ... )
for sorting same as "ORDER BY (description IS NULL)"
or same as "ORDER BY LOWER(item)"
Thx
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" grou
I think I almost get it.
If I configure Apache as you suggest, and a user surfs to
"www.mysite.com"
what url gets 'passed' to urls.py?
Will that url match:
1:(r'^$', 'mysite.myapp.views.index'),
or
2: (r'^myapp/$', 'mysite.myapp.views.index'),
or
3: (r'^index$', 'mysite.myapp.views.index'),
Hi,
I have db-model like this:
class Action(models.Model):
name = models.CharField(maxlength=64, unique=True)
photo = models.ForeignKey('Photo', null=True, blank=True)
class Album(models.Model):
action = models.ForeignKey(Action, null=True, blank=True)
name = models.CharField(maxle
I am running revision 4541 and experimenting with the new {% url
path.to.view %} syntax.
My template for displaying a set of thumbnail images is like:
{% for photo in photo_set %}
{% endfor %}
And url pattern that matches the view is
(r'^photo/(?P[-\w]+)/(?P\d+)/$',
'artist.views.artist_phot
Hi dear friend some pictures for you.
See all the pictures one by one
Ayesha Takia pictures.
http://ifs1.imagefly.info/v/f9/jpg/aye16v.html
http://ifs1.imagefly.info/v/55/jpg/aye17a.html
http://ifs1.imagefly.info/v/cc/jpg/aye18v.html
http://ifs1.imagefly.info/v/82/jpg/aye19a.html
http:
How can I tweak the normal save button (by hooking into the save
method) to, instead of updating the record, add it as new one and mark
the old one as deleted (to mark it as deleted I would like to change
an boolean attribute...)?
Thx Florian
--~--~-~--~~~---~--~
I second the SliceHost VPS recommendation... my experience with them
has been nothing but positive.
- Ben
On 2/17/07, Scott Paul Robertson <[EMAIL PROTECTED]> wrote:
> On Sat, Feb 17, 2007 at 04:41:46PM -, akonsu wrote:
> >
> > www.prgmr.com seem to have affordable VPS hosting. but i agree,
Is it possible that I can pay somebody to help me learning
Django/python. I'm starting a project with Django and don't want to get
stuck. I simple want to ask quickly via Jabber. How do you do this/that
and get some help on it. Maybe you can have some overview of what I'm
doing and give pointers..
you simply override the save() function to do what you described:
create another instance and mark this one as deleted...
the only problem I can think of is with the instance
for example if I do
m = Model.objects.all()[0]
m.some_field = 'new value'
m.save()
what is now in 'm' ?? the new obj
On 2/18/07, VIK_Tomas <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I have db-model like this:
>
> class Action(models.Model):
>name = models.CharField(maxlength=64, unique=True)
>photo = models.ForeignKey('Photo', null=True, blank=True)
>
> class Album(models.Model):
>action = models.ForeignK
You Learn From this How to in dollars within a week
www.freewebs.com./khaja_mohai <[EMAIL PROTECTED]>
<[EMAIL PROTECTED]>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, se
AFAIK this is currently not possible with django's ORM, you can work
around that by using:
queryset.order_by().extra( where=[ ' 1=1 ORDER BY whatever' ] )
which means: on queryset, reset sorting and to where clause append 1=1
(so if the SQL has correct syntax) and ORDER BY whatever...
but I consi
thanks for your response.
specifying null=True for ManyToManyField will allow nulls in the
corresponding field in the association table, right? but since this
table is just a list of pairs this is not needed because having no
row at all has the same effect. correct? if so null=True is not
really
On 2/18/07, akonsu <[EMAIL PROTECTED]> wrote:
>
> thanks for your response.
>
> specifying null=True for ManyToManyField will allow nulls in the
> corresponding field in the association table, right? but since this
> table is just a list of pairs this is not needed because having no
> row at all h
>
> http://www.djangoproject.com/documentation/model_api/#list-select-related
>
a try add
class Admin:
list_select_related = True
to all models, but it has no effect - "Edit Action" is still very
slow.
with this option in all models: 3598 queries
without this option: 3598 queries
-
On 2/18/07, VIK_Tomas <[EMAIL PROTECTED]> wrote:
>
> >
> > http://www.djangoproject.com/documentation/model_api/#list-select-related
> >
>
> a try add
>
>class Admin:
> list_select_related = True
>
> to all models, but it has no effect - "Edit Action" is still very
> slow.
>
> with this o
models.py attached.
On Sun, 2007-02-18 at 16:51 +0100, Honza Král wrote:
>
> that's odd can you post your Model definition?
> >
> >
> > >
> >
>
>
--
Tomá Pokorný
=
email: [EMAIL PROTECTED]
mobil: +420 776 379 631
icq# 22996508
==
1.Robotická s.r.o.
h
> you simply override the save() function to do what you described:
> create another instance and mark this one as deleted...
That's what I want to do
> what is now in 'm' ?? the new object, the one merked for deletion? etc.
> if you only need this in admin, then you shouldn't have to worry a
On 2/18/07, Florian Apolloner <[EMAIL PROTECTED]> wrote:
>
> > you simply override the save() function to do what you described:
> > create another instance and mark this one as deleted...
> That's what I want to do
>
> > what is now in 'm' ?? the new object, the one merked for deletion? etc.
>
On 2/18/07, Tom� Pokorn� <[EMAIL PROTECTED]> wrote:
> models.py attached.
>
>
> On Sun, 2007-02-18 at 16:51 +0100, Honza Kr�l wrote:
>
> >
> > that's odd can you post your Model definition?
definitely odd, list_select_related appears to have no effect on the
sql queries.
even if I add photo to li
> def save( self ):
> old_data = self.__class__.objects.get(pk=self.id).__dict__
> old_data['deleted'] = True
> self.__class__.objects.create( **old_data )
> super( models.Model, self ).save()
>
> then when you do
>
> m = Model.objects.get(pk=42)
> m.some_field='some new value'
> m
hello,
class A(models.Model):
bs = models.ManyToManyField('B')
class B(models.Model):
how to implement this query:
select *
from myapp_a
inner join (select a_id, count(*)
from myapp_a_bs
group by a_id) as a
on myapp_a.id=a
As far as I can see the __init__ way of doing things creates a field
as opposed to a base_field. Given that this is done in the __init__
method every instance will have this field. Is there any disadvantage
in this? I suppose you could also have a base_field with the same name/
key. Looking at the
omat * gezgin.com wrote:
> And url pattern that matches the view is
> (r'^photo/(?P[-\w]+)/(?P\d+)/$',
> 'artist.views.artist_photo'),
>
> Images are displaying fine but the links does not appear. (i.e. {% url
> artist.views.artist_photo slug=artist.slug,id=photo.id %} does not
> render anything.
Hi Dear Friend.
See all the pictures
Amrita Rao picture
http://ifs3.imagefly.info/v/f6/jpg/amr34a.html
http://ifs3.imagefly.info/v/92/jpg/amr17v.html
http://ifs3.imagefly.info/v/fa/jpg/amr18a.html
http://ifs3.imagefly.info/v/3f/jpg/amr19a.html
http://ifs3.imagefly.info/v/bc/jpg/amr20v.html
ht
Jeff,
Looks like you are rendering out the form class itself rather than an
instance of the form.
You could try this approach.
from django import newforms as forms
from django.template import Context, Template
from django.http import HttpResponse
class MedForm(forms.Form):
def __init__(self,
On Feb 18, 10:48 am, "Honza Král" <[EMAIL PROTECTED]> wrote:
> On 2/18/07, Tom? Pokorn? <[EMAIL PROTECTED]> wrote:
>
> > models.py attached.
>
> > On Sun, 2007-02-18 at 16:51 +0100, Honza Kr?l wrote:
>
> > > that's odd can you post your Model definition?
>
> definitely odd, list_select_related ap
I got a few questions cause it is not working (I assume I am to
silly):
> def save( self ):
> old_data = self.__class__.objects.get(pk=self.id).__dict__
I can substitue pk with id (this is my primary...)
> old_data['deleted'] = True
Mark the old_data as deleted
> self.__class__.objects
On 2/18/07, Gary Wilson <[EMAIL PROTECTED]> wrote:
>
> On Feb 18, 10:48 am, "Honza Kr�l" <[EMAIL PROTECTED]> wrote:
> > On 2/18/07, Tom? Pokorn? <[EMAIL PROTECTED]> wrote:
> >
> > > models.py attached.
> >
> > > On Sun, 2007-02-18 at 16:51 +0100, Honza Kr?l wrote:
> >
> > > > that's odd can you po
On 2/18/07, Florian Apolloner <[EMAIL PROTECTED]> wrote:
>
> I got a few questions cause it is not working (I assume I am to
> silly):
> > def save( self ):
> > old_data = self.__class__.objects.get(pk=self.id).__dict__
> I can substitue pk with id (this is my primary...)
sure, that's exactly
Hi,
I believe you could use
queryset.extra( select={ 'B_count' : 'SELECT COUNT(*) FROM myapp_a_bs
WHERE a_id = myapp_a.id' } )
it will result in a slightly different, but equivalent, query:
SELECT
myapp_a.id,
myapp_a,
...,
( SELECT COUNT(*) FROM myapp_a_bs WHERE a_id = myapp_a.id ) AS "B_
Has anyone else run into the following error when deleting objects using the
newforms-admin branch?
Exception Value: global name '_get_deleted_objects' is not defined
Exception Location:
/usr/lib/python2.4/site-packages/django/contrib/admin/options.py in
delete_view, line 466
Obviously _get_delet
On 2/18/07, Robin Percy <[EMAIL PROTECTED]> wrote:
> Has anyone else run into the following error when deleting objects using the
> newforms-admin branch?
>
> Exception Value: global name '_get_deleted_objects' is not defined
> Exception Location:
> /usr/lib/python2.4/site-packages/django/contrib/a
2007/2/18, Honza Král <[EMAIL PROTECTED]>:
> I just wrote it into the email as an example of how I would go about
> doing something like this, I said you will have to tweak it a bit, try
> it in shell first and see how its behaving...
I got something like this now:
def save(self):
try
On 2/18/07, Florian Apolloner <[EMAIL PROTECTED]> wrote:
>
> 2007/2/18, Honza Kr�l <[EMAIL PROTECTED]>:
> > I just wrote it into the email as an example of how I would go about
> > doing something like this, I said you will have to tweak it a bit, try
> > it in shell first and see how its behaving.
thanks.
this is good enough, although in general having to fall back to sql is
not portable between different database engines.
i think that at least having methods that return the names of the
underlying database tables and/or fields would be helpful. so that i
could use them in stead of 'myapp
On 2/18/07, VIK_Tomas <[EMAIL PROTECTED]> wrote:
> class Action(models.Model):
>name = models.CharField(maxlength=64, unique=True)
>photo = models.ForeignKey('Photo', null=True, blank=True)
Set 'raw_id_admin=True' on the 'photo' field -- otherwise Django will
query the full list of Photos
On 2/18/07, James Bennett <[EMAIL PROTECTED]> wrote:
>
> On 2/18/07, VIK_Tomas <[EMAIL PROTECTED]> wrote:
> > class Action(models.Model):
> >name = models.CharField(maxlength=64, unique=True)
> >photo = models.ForeignKey('Photo', null=True, blank=True)
>
> Set 'raw_id_admin=True' on the 'ph
I can't afford it right now. I would be good anyway.
In bluehost, they offer me modpython, but i have some questions about
that.
First of all, modpython is running through cgi. As Nathan said, this
would be a a loss of permormance, but what about security? I have read
that with fastcgi, only one i
[EMAIL PROTECTED] wrote:
> Yes, most of the hostings have fastCGI, but not flup.
> I know the best is to have VPS hosting, but they are very expensive,
> and I think I can manage with a shared hosting.
> I think Blouehost looks good.
>
For VPS i can't recommend http://www.rimuhosting.com/ enoug
On Sun, 2007-02-18 at 21:36 +, akonsu wrote:
> thanks.
>
> this is good enough, although in general having to fall back to sql is
> not portable between different database engines.
It usually is possible, providing you get the table and column names
correct (as you indicate below). The main
Somebody else has posted an alternative phrasing of the solution, but
let's just clear up a couple of items for the archives...
On Sun, 2007-02-18 at 00:51 -0800, kbochert wrote:
[...]
> So perhaps "install apache and mod_python" really means "insure that
> your host has apache and mod_python ins
Thank you Ivan, the check list helped a lot. Now it is working.
The problem was, I was including a not-yet-existing urls.py in the
root urls.py. This doesn't cause any problem as long as its pattern is
not matched. But if you try to do the reverse match with the {% url
%}, it fails if there is a
On Sun, 2007-02-18 at 23:26 +, omat * gezgin.com wrote:
[...]
> Another thing is that, if there are multiple patterns matching the
> same view function, it seems like, only the first match is considered.
> Lets say the artist_photo function has an optional "id" parameter
> which defaults to No
> First of all, modpython is running through cgi. As Nathan said, this
> would be a a loss of permormance, but what about security? I have read
1. to me, the phrase "modpython is running through cgi" makes no
sense. do you mean to say "python is running through cgi"?
2. what kind of security do
On Feb 18, 12:00 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> Looks like you are rendering out the form class itself rather than an
> instance of the form.
Monster,
Thanks, but Honza had the correct reply. I need to access the
individual fields in the template, and BoundField is the way
>
> You can extract this information from the _meta attribute on a model.
> This isn't documented (yet), but it's on the TODO list for things to
> document before 1.0.
>
thanks, i will check out this _meta attribute.
it seems to me that ManyToManyField is not a field, it is a table. so
if we did
Free Computer Education Ebooks,Tutorials and much more
ASP, Business, C++, Careers, CISCO, e-books, Engineering, English,
Filmmaking, Finance, Health,
Leadership, Management, Marketing, Mathematics, Mobile, Oracle,
Perl , Photography, PHP,
Programming, VOIPand much more
visit
htt
Is there a was to install the contrib.admin app without the
contrib.auth app??
While learning, I am eraseing the database and doing manage.py syncdb
a lot, and it would be real nice to have it come up without having to
enter username email etc. each time.
Karl
--~--~-~--~~-
56 matches
Mail list logo