[EMAIL PROTECTED] wrote:
> I apologize in advance if this is a stupid question - I'm new to
> Django, and a little over my head (but loving it!)
>
> I'm trying to return a field from a foreign key relationship as part of
> my __str__ method. When I do, I get this output in the admin interface:
>
Hi folks,
I don't like replying to my own mails, but I'm working against a
deadline here. Is it possible to do what I want? Luke wrote:
> limit_choices_to is (essentially) a class level attribute, and has
> no access to instance level data.
which probably means that I can't do what I want base
Hi all,
i have the following scenario for a real-estate search engine:
"Ad" table where i define the properties of the ad such as created_on,
expires_on, user_id and is related with a 1-1 FK to the "Property"
table which defines stuff such as sq_feet, district_id etc...
I'd like to keep them se
Regarding (7) and (8) you might want to have a look at
http://www.vonautomatisch.at/django/filebrowser/
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to djan
Thanks
i will take a look at it and see if i can use it.
richard
--~--~-~--~~~---~--~~
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 unsubscri
http://groups.google.com/group/django-users/browse_thread/thread/a28f4d79a801ae5e/4011309ec4836dff?lnk=gst&q=FCKeditor&rnum=2#4011309ec4836dff
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
"Ruby has different libraries that provide higher-level access to
network protocols such as FTP, HTTP or HTTPS. This article shows the
usage of net::http, net::https, open-uri and the rio library."
(http://www.juretta.com/log/2006/08/13/ruby_net_http_and_open-uri/)
I would like django to connect
does urllib2 ( http://pydoc.org/2.4.1/urllib2.html ) do what you need?
On 23/08/2006, at 7:54 PM, zenx wrote:
>
> "Ruby has different libraries that provide higher-level access to
> network protocols such as FTP, HTTP or HTTPS. This article shows the
> usage of net::http, net::https, open-uri an
Oh yes!!! Thank you Ian!
I've search for more info about urllib2 and I have come to this:
http://www.holovaty.com/blog/archive/2004/06/20/0242 It seems that
Adrian had already created a python interface to Gmail using urllib2 :D
Thank you for your help and thanks to Adrian, too!
--~--~
I need to provide webdav access (upload) to my customer.
Problem is, uploaded files should hold not in filesystem,
but in database (which other "end" is in django).
Our diversified solutions are converges to python, so i'm
searching for pythonic way. Google gives me a lot of hits
about webdav clie
On 8/22/06, Enrico <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I've made custom file upload fields with some extra features:
>
> - automatic upload_to path (based on app/model/field names)
> - automatic renaming the filename based on the primary key
> - maximum width and/or height for images
>
> I'
Hi
Thanks for the reply.
I *think* I get the forms stuff generally, the bit I'm having trouble
with is having a maniplator deal with a list of objects of the same
type.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Grou
[EMAIL PROTECTED] wrote:
> Hi all,
>
> i have the following scenario for a real-estate search engine:
>
> "Ad" table where i define the properties of the ad such as created_on,
> expires_on, user_id and is related with a 1-1 FK to the "Property"
> table which defines stuff such as sq_feet, distri
DavidA wrote:
> The identity value is set in the new instance once you call save so you
> can simply do this:
>
> p = Property(sq_feet=2300, ...)
> p.save() # now p.id is set
>
> a = Ad(property=p, ...)
> a.save()
>
> The equivalent of the @@Identity trick is handled during 'save'
Thanks to everyone here, this really helped me out.
One thing I still have questions about it Eric's remark:
> ---
> Take note that, since the is_superuser is not a required field, iirc,
> you don't have to set it in new_data if your intent leave the value the
> same.
> ---
I indeed want to keep
Makes sense. :)
--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED
I was reading some django performance tips:
http://www.jacobian.org/writing/2005/dec/12/django-performance-tips/
One of them is: "Use a separate media server"
But how could I upload files with Django FileField or ImageField to
another webserver than the one using django?
--~--~-~--~~
I've never edited a wiki, but seems easy, I'll post the code soon.
Regards.
Enrico
--~--~-~--~~~---~--~~
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
Hi,
I realized that using the IN field lookup with an empty list, it
generates a SQL error (at least on MySQL).
Maybe the lookup could check if the list is empty before writing the
SQL condition.
I know that I could the check myself before applying the filter, but
doing directly on the DB api c
On 8/22/06, Baczek <[EMAIL PROTECTED]> wrote:
>
> Just wanted to add that I got hit by that too, just now. Hoping for a
> quick fix here or in django...
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=383603
python-mysqldb_1.2.1-p2-3_i386.deb <-- Corrects the problem
Max
--
-BEGIN GEEK CO
Hi.
Today I've been trying (preparing) to switch from my testing
configuration (lighttpd+flup+django-fastcgi) to apache+mod_python, so
far without success .
From my point of view, there is something wrong happening between
sqlite and mod_python, but the error messages look enigmatic. I've
c
Does nobody have any ideas about this?!? I stumbled across a link which
tells part of the story, so I now think it's more correct to use this:
def save(self, data):
temp = Message(
contact_type = data['contact_type'],
mobile_number = data['mobile_number'],
James Mulholland wrote:
> temp.set_teams(data['teams'])
> temp.save()
This looks like 0.91 syntax that was changed in 'magic-removal' process.
Now it should look like this:
temp = Message(...)
temp.save()
for id in data['teams']:
temp.teams.add(Team(id))
BTW, sav
On 8/23/06, zenx <[EMAIL PROTECTED]> wrote:
> But how could I upload files with Django FileField or ImageField to
> another webserver than the one using django?
I think it meant something like a separate server, not a machine.
Like using apache to run Django and lightTPD to serve the media files
On 8/23/06, Gabriel Puliatti <[EMAIL PROTECTED]> wrote:
>
> On 8/23/06, zenx <[EMAIL PROTECTED]> wrote:
> > But how could I upload files with Django FileField or ImageField to
> > another webserver than the one using django?
>
> I think it meant something like a separate server, not a machine.
>
>
We've got a couple of cases in our current PHP libraries that we're
trying to find equivalents for in Django. Here are a few scenarios we
have currently to pull media (mostly videos) from different places
depending on the user or user preferences...
1. During development and testing we host the
Following up on my message last week, I've released a simple connector
to connect FCKeditor's image browser to a Django application. You can
find the project at http://code.google.com/p/django-fckconnector/, and
basic documentation in
http://django-fckconnector.googlecode.com/svn/trunk/fckeditor_
On 8/22/06, cyberco <[EMAIL PROTECTED]> wrote:
>
> In my model:
>
> =
> image = models.ImageField(upload_to='pics',
> validator_list=[validators.isValidImage], blank=True)
> =
Without looking more closely at the code involved, I'm not sure why
you'd
Thank you! I will take a look at it.
--~--~-~--~~~---~--~~
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 emai
That's it, my first wiki page. :)
http://code.djangoproject.com/wiki/CustomUploadAndFilters/
--~--~-~--~~~---~--~~
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@g
Thank you. I took your advice and changed "photoid" to "entry". I'm new
to this, so can you elaborate a bit on why it's better to name that
field 'entry'?
SmileyChris wrote:
> {% for photo in object.photo_set.all %}
>
> {% endfor %}
>
> PS: It would be better to call the field 'entry' rather tha
>>> from django import forms
>>> f = forms.DatetimeField(field_name='dt')
>>> f.html2python("")
>>> f.html2python(None)
Traceback (most recent call last):
File "", line 1, in ?
File
"/usr/lib/python2.3/site-packages/Django-0.95-py2.3.egg/django/forms/__init__.py",
line 779, in html2python
I've got a product page that submits to the PayPal shopping cart, and I
have form controls on that page with values that need to modify the
price. (discount codes)
In my research, it appears that I need to post the page to a view,
check the discount code, and then send the data via post to the Pa
I've hit the same problem :(after searching on this group and net I found thatcurently django dosen't work well with sqlite.Try to use mysql or psqlOn 8/24/06,
Wiktor Grębla <[EMAIL PROTECTED]> wrote:
Hi.Today I've been trying (preparing) to switch from my testingconfiguration (lighttpd+flup+djang
On 8/23/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> So far, so good, but I'm not sure how to proceed. I should be able to
> capture and modify the post data, then urlencode the post values using
> urllib, but I cannot figure out how to post the form data AND redirect
> the page to the paypa
On 8/23/06, keukaman <[EMAIL PROTECTED]> wrote:
>
> Thank you. I took your advice and changed "photoid" to "entry". I'm new
> to this, so can you elaborate a bit on why it's better to name that
> field 'entry'?
I will assume I'm actually in the same channel that Chris here.
On django models, eve
Hi,
After setting up the admin interface, I get access to the users and
groups list.
>From the FAQ, I've read that
"""
If you'd like to use the admin site to create users, upgrade to the
Django development version, where this problem was fixed on Aug. 4, 2006.
"""
Not only, I'd like to create u
On 8/23/06, Luis P. Mendes <[EMAIL PROTECTED]> wrote:
> My admin interface has another issue that I think it was not supposed to
> happen. I can see a list of the users but when I try do access each of
> them, the web page required is not found. Do I have to insert some url
> definitions in the
Michael napisa³(a):
> I've hit the same problem :(
> after searching on this group and net I found that
> curently django dosen't work well with sqlite.
I can't believe it's that bad ;(, if so, I'll have to switch to mysql or
postgress. I hope it's gonna
be clarified/fixed soon.
W.
--
Talker
Hello,
I'm a Java programmer and new to the world of Python and Django.
Because of this, I could be missing something obvious trying to access
the request object from file urls.py in my project. Is it possible?
Where does the request object defined in the views as a parameter come
from?
Thank y
Hi all,
I put some packages for django onto sf.net
http://svn.sourceforge.net/viewvc/django-userlibs/trunk/
It contains some media packaged ajax toolkits mochikit, prototype, dojo and the
wysiwyg-editors tinymce and fckeditor.
If anybody has an idea for other libs to be created, please call.
On 8/23/06, victor <[EMAIL PROTECTED]> wrote:
> Where does the request object defined in the views as a parameter come
> from?
The request object is instantiated very early on in Django's
processing, but it's never passed as any sort of argument that
something in the URLs file can work with; Djan
Hello James,
Thank you for the quick and complete response.
I'll check both Django's middleware documentation and your description
of Django's request lifecycle.
Regards,
Victor
--~--~-~--~~~---~--~~
You received this message because you are subscr
On 8/23/06, Michael <[EMAIL PROTECTED]> wrote:
> I've hit the same problem :(
> after searching on this group and net I found that
> curently django dosen't work well with sqlite.
I'm not sure if that's the case here; it seems that it worked fine
under the built-in server, and worked fine under F
Maybe I missed this in the docs but... Is there any way to specify a
model that uses choices so that the user can select multiple items?
For example:
BEDROOMS = (
('1', '1'),
('2', '2'),
('3', '3'),
('4', '4'),
('5', '5'),
('6', '6'),
)
class ApartmentBuilding(models.Mode
Hi I'm trying to add free comments to my Django App and having problems
The following Error shows up.
'free_comment_form' tag has invalid content-type
c:\python24\lib\site-packages\Django-0.95-py2.4.egg\django\contrib\comments\templatetags\comments.py
in __call__, line 160
line 158 seems to be
On Aug 23, 2006, at 5:12 PM, [EMAIL PROTECTED] wrote:
> Maybe I missed this in the docs but... Is there any way to specify a
> model that uses choices so that the user can select multiple items?
Hey Jay --
No, there's no way to do this with ``choices``. I'd suggest just
using a ``ManyToManyFi
James Bennett napisa³(a):
> My initial guess is that the problem has to do with permissions on the
> filesystem; the built-in server and FastCGI both typically run as your
> user on the system, which means they have permission to access
> anything your user account can access.
>
> Apache, however
On Aug 23, 2006, at 11:16 AM, Rob Hudson wrote:
> Are these two scenarios possible in Django?
Of course :)
Remember -- settings files are just Python code. This means you can
include any type of logic in them that you like. I often write
settings files that work a bit differently on differ
On 8/23/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I put some packages for django onto sf.net
> http://svn.sourceforge.net/viewvc/django-userlibs/trunk/
>
> It contains some media packaged ajax toolkits mochikit, prototype, dojo and
> the wysiwyg-editors tinymce and fckedito
On Aug 23, 2006, at 5:26 AM, toth anna wrote:
> I need to provide webdav access (upload) to my customer.
> Problem is, uploaded files should hold not in filesystem,
> but in database (which other "end" is in django).
> Our diversified solutions are converges to python, so i'm
> searching for pytho
On Aug 23, 2006, at 8:27 AM, Enrico wrote:
> I realized that using the IN field lookup with an empty list, it
> generates a SQL error (at least on MySQL).
> [snip]
> Any thoughts?
I *thought* this was fixed in trunk; what version of Django are you
running?
If you are on trunk, posting the code
On Aug 23, 2006, at 8:13 AM, zenx wrote:
> I was reading some django performance tips:
> http://www.jacobian.org/writing/2005/dec/12/django-performance-tips/
> One of them is: "Use a separate media server"
> But how could I upload files with Django FileField or ImageField to
> another webserver th
On Aug 23, 2006, at 5:32 PM, Reinhard Knobelspies wrote:
Thanks for all your help so far everyone. So I'm still in search of
answers to these questions:
(2) The 24 hour clock widget doesn't work for me. This is a nightclub
so shows are almost always listed as 7:00pm or 12:30am etc. (am/pm).
Is
I've been refactoring some stuff to use slugs, and it looks like
FreeComment needs an object.id
Is this correct or have I missed something?
Derek
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" grou
It looks good, and it's BSD licensed as well..
I'm just wondering why you need to include the source of dojo in it?
wouldn't it be easier to just link to them and maintain them separately?
On 24/08/2006, at 6:43 AM, [EMAIL PROTECTED] wrote:
>
> Hi all,
>
> I put some packages for django onto sf.
Ok forget this I've found the soultion..
I had a model blog.Post
But the {% free_comment_form for blog.post object.id %} should be in
lower case.
Any reason why this is so.
Cheers
Garth
--~--~-~--~~~---~--~~
You received this message because you are subscri
On 24/08/2006, at 8:31 AM, Jacob Kaplan-Moss wrote:
>
> This is probably not what you want to hear, but I'd *strongly*
> recommend that you not store files in the database. Filesystems are
> made for, well, storing files, and it's almost always bad design when
> you stuff them into a relational
Great, that looks simple.
What about the case for passing in a GET variable being passed in to
switch between media coming from localhost vs. the default MEDIA_URL,
as in case #2?
Most likely I'd grab the GET variable and store it in the session. Can
the settings reference session data, or woul
http://code.google.com/p/zmaj/
is an application for Linux system administration. It's intended to be
replacement for Webmin (Yes, a big bite, I know... But I concluded
that it's easyer to write the whole application from scratch then to
learn Perl and write modules for Webmin ;)
Currently 4 mod
On 8/23/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> ... I should be able to
> capture and modify the post data, then urlencode the post values using
> urllib, but I cannot figure out how to post the form data AND redirect
> the page to the paypal URL in one shot.
I'm just about to do the
On 8/23/06, Ivan Sagalaev <[EMAIL PROTECTED]> wrote:
James Mulholland wrote:> temp.set_teams(data['teams'])> temp.save()This looks like 0.91 syntax that was changed in 'magic-removal' process.Now it should look like this: temp = Message(...)
temp.save() for id in data['teams']:
[EMAIL PROTECTED] wrote:
> I've been refactoring some stuff to use slugs, and it looks like
> FreeComment needs an object.id
>
> Is this correct or have I missed something?
>
> Derek
The FreeComment model assumes the primary key of the object it refers
to is an integer, so you can't make the pri
I hit an interesting gotcha when passing a QuerySet in a template
context: if the template tries to access a nonexistant context
variable, the QuerySet gets evaluated. More than that, it gets repr()
called on it, which can be quite expensive for a large QuerySet. (In
fact it brings my poor machi
So I've got this insane requirement that says I need to isolate all my django apps under a prefix ... as suchhttp://www.sitename.com/prefix/I'm not really the kind guy to hardcode the prefix into all my templates and so on. So I came up with a solution that makes my stomach turn. That is:
In settt
On 8/24/06, Vance Dubberly <[EMAIL PROTECTED]
> wrote:
So I've got this insane requirement that says I need to isolate all my django apps under a prefix ... as such...Somebody please tell me I've been hitting the crack pipe a bit to hard and that there is a more elegant solution to this silliness,
On Aug 24, 2006, at 8:24 AM, Viktor Kerkez wrote:
>
> http://code.google.com/p/zmaj/
>
> is an application for Linux system administration. It's intended to be
> replacement for Webmin (Yes, a big bite, I know... But I concluded
> that it's easyer to write the whole application from scratch then
Jacob Kaplan-Moss <[EMAIL PROTECTED]> írta:
> This is probably not what you want to hear, but I'd
*strongly*
> recommend that you not store files in the database.
Filesystems are
> made for, well, storing files, and it's almost always bad
design when
> you stuff them into a relational datab
It seems like I'm constantly using custom SQL statements, because the
ORM won't offer what's necessary to achieve the desired data
query/manipulation.
Right now I need to wrap up the following in a transaction that will be
called a few hundred times in a for loop.
delete from table ...
create te
Ian Holsman <[EMAIL PROTECTED]> írta:
>
http://www.atmarkit.co.jp/flinux/special/webdav03/webdav01a.html
> describes something similar to what you want by the looks
of the
> pictures (but in japanese)
:)
I hope my doctor does not have to learn surgery from
japanese boo
Vance Dubberly wrote:
> I'm not really the kind guy to hardcode the prefix into all my
> templates and so on.
There is not yet officially introduced and documented but working
feature (The Right Feature!) for making URLs in your templates to
automatically point to your views by their current
Russell Keith-Magee wrote:
> temp = Message(...)
> temp.save()
> temp.teams = Team.objects.filter(id__in=data['teams'])
>
> i.e., there is no need to iterate through the data (which isn't really
> efficient, since every add is a separate db operation). Instead, you can
> assign an iterable to a
72 matches
Mail list logo