Thanks Stefan...problem solved.
Stefan Foulis wrote:
> I'm using Django's admin interface to view the fields of a table. One
> of these fields in a foreign key reference to another table named
> "Search". By default, Django's admin interface shows me "[Search
> Object]" in the foreign key colu
On 17 jan, 06:31, "qhfgva" <[EMAIL PROTECTED]> wrote:
Thanks for the link. Using a wrapper is one of the things I had tried.
Here is what I tried. I *think* I'm close, but I don't see the last
little bit that I'm missing:
models.py
class Foo(models.Model):
charfoo = models.CharFiel
On 1/16/07, fiedzia <[EMAIL PROTECTED]> wrote:
Looking for a way to handle nested dicts within templates I've found
following syntax to work:
% for cat in songs.items %}
{% for author in cat.1.items %}
{% for song in author.1.items %}
...
but I
Thanks for the link. Using a wrapper is one of the things I had tried.
Here is what I tried. I *think* I'm close, but I don't see the last
little bit that I'm missing:
models.py
class Foo(models.Model):
charfoo = models.CharField(maxlength=10)
class Goo(models.Model):
chargoo = mod
Honza Král wrote:
definitely, if you have more that one user, you should definetely run
a dedicated db server, preferably one that supports transactions -
MySQL with InnoDB engine or postgreSQL (my choice ;) )
You may have already known this, but SQLite does support
transactions. I'm impresse
ashwoods wrote:
using ical would probably be interesting too...
http://www.devoesquared.com/Software/iCal_Module
Some additional icalendar modules written in Python:
http://codespeak.net/icalendar/
http://vobject.skyhouseconsulting.com
--
Jeff Bauer
Rubicon, Inc.
--~--~-~--~~
Adrian Holovaty wrote:
Disclaimer: It does not yet map all database field types to the
correct form field/widget types, but it's a start.
FWIW: I've been putting a little helper function in my
views.py to conditionally tweak any rough edges ...
def model2form(pk):
if not pk:
Adrian -
Thanks for the advice. I was trying to do some template/view magic.
Matt
--~--~-~--~~~---~--~~
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
Hey All,
Aspen is a Python webserver:
http://www.zetadev.com/software/aspen/
Stephane is a shim for serving Django apps with Aspen. Yesterday
I released a new version of Aspen, and today I updated Stephane
to work with that version.
If you're interested in pure-HTTP Django deployment, I enc
natebeaty wrote:
I'd like to throw this in as extra_context along the lines of:
"tag_list" : Tag.objects.filter(this_is_where_my_brain_is_shorting)
This is in fact pretty standard Django ORM, nothing special to TagsField:
blog.tag_set.all()
(assuming blog is an instance of Blog). You ca
I found this:
http://python.about.com/od/advancedpython/ss/howtocal.htm
--~--~-~--~~~---~--~~
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 u
On 1/16/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
using newforms how do you initialize an _edit_ form bound to a
particular object?
Say i got a PersonForm that i want to be bound to object JonDoeObject
which has more than 30 fields, what's the shortest way to do it?
Hi Lorenzo,
Have y
What you are asking is how to use a variable as a key into a
dictionary, you cannot normally do this with Django template. You
can get around it by using a template tag or try this:
{% for date in date_list.items|dictsort:"0" %}
{{ date.1 }}
{% endfor %}
Here's an explanation of how the a
Mark Jarecki wrote:
Replaced the dictionary in the views.py with a list and all was fine.
Whoops, sorry; I saw a variable called "Date_List" and didn't notice it
wasn't a list. Glad you were able to make things work.
-Zak
--~--~-~--~~~---~--~~
You received th
Replaced the dictionary in the views.py with a list and all was fine.
Thanks
Mark
--~--~-~--~~~---~--~~
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@googlegro
Thanks Zak,
Problem is, when I try:
{% for date in Date_List %}
{{ date }}
{% endfor %}
I get the following rendered:
1
0
3
2
5
4
6
What I'm wanting to render is:
2007-01-17
2007-01-18
2007-01-19
2007-01-20
2007-01-21
2007-01-22
2007-01-23
Not sure where I'm going wrong.
On 17/01/20
Jacob and I have decided it's a good idea to get a Django meetup going
at PyCon. A few people have expressed interest in attending the
tutorials but it seems they are full already.
I've set up an initial agenda, which is completely open to change if
better ideas come along (so let me know if you
On 1/16/07, Isaac Alston <[EMAIL PROTECTED]> wrote:
> Hmm, that MEDIA_URL worries me. Can you try setting that to something
> more concrete?
Ok, I tried setting it to "127.0.0.1:8000" (was the only thing I could
think of) and it didn't do anything, so I decided to do a fresh
install of stockph
Mark Jarecki wrote:
I imagined replacing it with something like:
{% for date in Date_List %}
{{ Date_List.NotSureWhatToPutHere }}
{% endfor %}
Much like Python loop syntax:
{% for date in Date_List %}
{{ date }}
{% endfor %}
-Zak
--~--~-~--~~~---~--~~
Y
Hi there.
I'm trying to create a list of days of the upcoming week in my
template. I have the following, but would like to have the template
instead utilise a for loop instead of hard coding the days.
At present i have the following - which works:
#views.py
def detail(request):
date_l
Done:
http://code.djangoproject.com/attachment/wiki/ProfilingDjango/runserver-profiler.diff
For the queries:
from django.db import connection
connection.queries
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Djang
Disregard, I decided to go back to the drawing board and try installing
apache2 with mod_python. After several hours exerimenting with
different version combinations I managed to get everything up and
running.
tm
--~--~-~--~~~---~--~~
You received this message b
On 1/17/07, Honza Kr l <[EMAIL PROTECTED]> wrote:
On 1/16/07, Guillaume Valadon <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> What is the status of mod_python and sqlite ?
> Do you think that I should switch to another database instead ?
definitely, if you have more that one user, you should definetely
On 1/16/07, Guillaume Valadon <[EMAIL PROTECTED]> wrote:
Hi,
What is the status of mod_python and sqlite ?
Do you think that I should switch to another database instead ?
definitely, if you have more that one user, you should definetely run
a dedicated db server, preferably one that supports
James Bennett wrote:
On 1/16/07, Patrick J. Anderson <[EMAIL PROTECTED]> wrote:
I'd appreciate some help with figuring out how to go about adding that
locale to my site in simplest and sensible way.
The simplest way is to produce a translation for the 'pt' locale ;)
See this for information
It would be really nice to have validation that occurs on the client
during input. Not to reduce the load on the server, but to make the
feedback to the user much more immediate.
I know this can be done with any of the many JavaScript libraries, and
I'm using MochiKit to do this now, but it'd be
On 1/16/07, johnny <[EMAIL PROTECTED]> wrote:
I would like to push it on client, to keep my server
load light.
Are you really doing heavy processing to validate and/or handling so
many requests that this is an issue? Don't borrow trouble. :)
--~--~-~--~~~---~--
On 1/16/07, johnny <[EMAIL PROTECTED]> wrote:
Django support only server side validation. Dose it support validation
on Client Side? I would like to push it on client, to keep my server
load light.
You could use any of the many freely-available quality JavaScript
toolkits to do this.
However
Hmm, that MEDIA_URL worries me. Can you try setting that to something
more concrete?
Ok, I tried setting it to "127.0.0.1:8000" (was the only thing I could
think of) and it didn't do anything, so I decided to do a fresh
install of stockphoto. Upon doing this, I now receive a new error:
"threec
Django support only server side validation. Dose it support
validation on Client Side? I would like to push it on client,
to keep my server load light.
Well, through JavaScript, you can do *both* server-side and
client-side validation. However, not everybody flies with JS
enabled (speaking
How to enable profiling in internal development webserver?
This http://code.djangoproject.com/wiki/ProfilingDjango doesn't help
Thanks,
Nuno Mariz
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Django
users" gro
I think that I need to just use standard python for uploading these
files to do what I need to do...but figured I'd post ...in case anyone
is doing anything similar with FileFields.
Basically, I have a table Documents with fields document_name,
document_path, document_description. The path
Hi,
I followed the instructions in the documentation for Authenticating
against Django's user database from Apache. But I cannot get it to work
correctly. This is the error message I am getting:
File "/usr/local/lib/python2.4/site-packages/mod_python/apache.py",
line 299, in HandlerDispatch
Hi all,
using newforms how do you initialize an _edit_ form bound to a
particular object?
Say i got a PersonForm that i want to be bound to object JonDoeObject
which has more than 30 fields, what's the shortest way to do it?
I tried the hackish way with no success:
p
inspect.getmembers(p)
Looking for a way to handle nested dicts within templates I've found
following syntax to work:
% for cat in songs.items %}
{% for author in cat.1.items %}
{% for song in author.1.items %}
...
but I can't find any documentation for that, so the questi
All of the examples in the Django documentation seem to deal only with
hardcoded forms, in other words the programmer/designer knows how many
field the form will/should have. I am creating a survey system. A
survey will have X number of questions, so my template is generic
enough to handle X numb
On 1/16/07, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
I'd suggest exposing the long/lat fields in the admin and putting a
"Geocode this address" shortcut that, when clicked, would do the
geocoding server-side and populate the long/lat fields with the
result. You can do this by hooking into the
On 1/16/07, johnny <[EMAIL PROTECTED]> wrote:
Django support only server side validation. Dose it support validation
on Client Side? I would like to push it on client, to keep my server
load light.
Any client side processing would be done with javascript. However, you
must always remember th
I'm assuming this is simple... hoping so at least! Spent the last few
hours googling w/ no luck.
I'm using the TagsField from: http://softwaremaniacs.org/soft/tags/en/
and I have many classes using this m2m TagsField. What I'm stumped on
is how to pull a list of all the tags that are used by one
Hi,
What is the status of mod_python and sqlite ?
Do you think that I should switch to another database instead ?
Thanks,
Guillaume
ps: note that after hours of fights, it is working on my gentoo with
the following packages. But runserver is now broken.
net-www/apache-2.0.58-r2
dev-python/mod_
On 1/16/07 4:05 AM, Russell Keith-Magee wrote:
Given the current push towards 1.0, it seems likely that this
particular merge will not get the attention of the core developers in
the immediate future (at least until 1.0 is out the door). However, if
you want to volunteer, and you don't feel you
On 1/16/07, Patrick J. Anderson <[EMAIL PROTECTED]> wrote:
I'd appreciate some help with figuring out how to go about adding that
locale to my site in simplest and sensible way.
The simplest way is to produce a translation for the 'pt' locale ;)
See this for information:
http://www.djangopro
On 1/16/07, mojo <[EMAIL PROTECTED]> wrote:
when i use CheckboxSelectMultiple in my form, all checkboxes for the
field are rendered with same ids.
is this mine or django's problem?
That's a bug -- thanks for reporting it! I've filed it as ticket 3312, here:
http://code.djangoproject.com/ti
Hi all,
I need to check if a certain field in my model has changed before
saving:
--
model MyModel(models.Model):
mypic = models.ImageField()
def save(self):
if self.mypic.tainted:
# do some work because the image has changed
super(MyModel, self).save()
--
So I o
On 1/15/07, Matt <[EMAIL PROTECTED]> wrote:
I am using [1]geopy to geocode an address, city, state, and zip from my
Events model and save the latitude and longitude to the database during
pre_save. My problem is sometimes Google's geocoder returns the wrong
lat/lng or a list of possibilities. In
Hello,
my models.py:
from django.db import models
from django.db.models import Q
import datetime
class Order(models.Model):
when = models.DateTimeField(blank=False)
def __str__(self):
return str(s
How do I enable the profiling for internal development webserver?
This http://code.djangoproject.com/wiki/ProfilingDjango doesn't help.
Thanks,
Nuno Mariz
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Django
us
Django support only server side validation. Dose it support validation
on Client Side? I would like to push it on client, to keep my server
load light.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Django
users
Never mind, the $ after admin should not have been there. Solved
--~--~-~--~~~---~--~~
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
I figured it out...
I missed putting {{ photo.id }} in the template. The "new_data" values
helped out.
I am speculating that Django didn't know the id of the existing object
so it created a new one in the database even though one already
existed.
Sorry to bother everyone.
--~--~-~--~-
oldforms since the newforms are still very much in development.
--~--~-~--~~~---~--~~
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 unsubscrib
Hi.
I was able to build survey kinda project using dynamic forms.
Are you interested in oldforms or newforms?
-Original Message-
From: django-users@googlegroups.com [mailto:[EMAIL PROTECTED]
On Behalf Of [EMAIL PROTECTED]
Sent: Tuesday, January 16, 2007 5:45 PM
To: Django users
Subject:
I'm using Django version 0.96-pre I checked out from SVN on the 12th.
I have two models: Photo and SsiStatus (see code below)
A SsiStatus object can have many photos.
I have written a view to handle updating the SsiStatus and every time I
click to save the update the caption of any existing pho
Hello all,
I am a new at Django ... I saw there were some questions about SOAP and
I am having some doubs too.
The code below is about that matter. My questions:
How can I put SimpleSOAPView under 'contrib.soap' ??
I am getting this error ... :
" cannot import name SimpleSOAPView "
Thanks in adv
I have a customer manipulator and I am trying to figure out during the
save function how to
get a foreign key pointer updated with a new value.
Here is my save function:
def save(self, new_data):
print 'new_data is ', new_data
new_status = new_data['status']
newstatusid =
Hi, everybody!
I wanted to post about a little problem I have while developing
multilingual site I'm working on.
I plan to include content in various languages, focusing on 3 at the
moment: English, Spanish and Portuguese.
I have followed the docs on i18n and this are working great, except
On 1/16/07, Isaac Alston <[EMAIL PROTECTED]> wrote:
> Your paste bin links don't seem to be working for me, but I'm going to
> guess that your STOCKPHOTO_BASE and STOCKPHOTO_URL aren't right. The
> link to the .jpg itself shouldn't have 'admin' in it anywhere, unless
> you have your media setup
David Abrahams wrote:
...One problem is that the name of the Django
project folder (and thus root module) always seems to creep into the
code in the app-specific directories.
IANADE (django-expert), but from what I've gleaned you can put the path
of each individual application into the python
On Jan 16, 2007, at 17:52, David Abrahams wrote:
For me, Django doesn't seem to be delivering on its promise to allow
me to build a collection of apps and organize them in different
combinations into multiple Django projects, and the documentation I
can find doesn't really give any clues abou
Hello all,
I've run into a problem when trying to add some simple search
functionality to my app. I've got a model with several M2Ms and I'm
trying to construct some OR queries using Q().
Here's a simplified example:
Model:
class Article(models.Model):
authors = models.ManyToManyField(User
For me, Django doesn't seem to be delivering on its promise to allow
me to build a collection of apps and organize them in different
combinations into multiple Django projects, and the documentation I
can find doesn't really give any clues about best practices for
project organization. One prob
akhen wrote:
Hi there
I'm trying to use FileInput widget in a Form:
image = forms.Field(widget=forms.FileInput)
But after a post, I just can get the filename not the data.
form.clean_data['image']
Any ideas ?
Thanks.
I think the best thing is to wait until newforms is more developed an
I'm using Django's admin interface to view the fields of a table. One
of these fields in a foreign key reference to another table named
"Search". By default, Django's admin interface shows me "[Search
Object]" in the foreign key column. I'd prefer to see some identifying
information about the Se
在 2007-1-13,上午7:35,Noah 写道:
have you found svnx to be unstable?
Not at all in my usage case, it has been very stable. Don't remember
it ever crash on me. :-)
BTW: I am using 0.9.9.
-Cheng Zhang
Gentoo/PostgreSQL/Lighttpd/Python/Django/jQuery Powered
(Web) http://www.aragonconsultinggro
I've just installed 0.95 with deps and then removed django folders from
site-packages and symlinked SVN version from my home folder :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post t
Hi,
I am trying to implement "Authenticating against Django's user database
from Apache" from
http://www.djangoproject.com/documentation/apache_auth/ . The problem I
am running into is that the username attribute in the request is set to
None. This causes the authentication to fail because when
Your paste bin links don't seem to be working for me, but I'm going to
guess that your STOCKPHOTO_BASE and STOCKPHOTO_URL aren't right. The
link to the .jpg itself shouldn't have 'admin' in it anywhere, unless
you have your media setup in a very odd way.
This is strange, I'll paste them somewhe
All of the examples in the Django documentation seem to deal only with
hardcoded forms, in other words the programmer/designer knows how many
field the form will/should have. I am creating a survey system. A
survey will have X number of questions, so my template is generic
enough to handle X numb
telenieko skrev:
As you see I use psycopg2 and it works like a charm, my only issue is to
create pythonu prodecures but it's a postgresql issue (something to do with
security) but as you see, that works.
I am using psycopg, not psycopg2. Could that be the difference? I
wouldn't have thought
On 1/16/07, Jeffrey Zelt <[EMAIL PROTECTED]> wrote:
...
Does anyone know how to package such PostgreSQL trigger/function
definitions in the initialization files mentioned above, so that Django
will automatically create them for you (i.e., during "syncdb")?
See telenieko's response, but in gen
Hello,
Maybe there is someone having an idea about this:
There seems to be a couple of unsolved ? problems in combination with
'User tampered with session cookie'
I have already used successfully the save/restore-session possibilty,
with no problem. I do things like req.session['uid'] = uid,
Thanks mate, I'll try it out !
--~--~-~--~~~---~--~~
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
Hi Jeffrey,
I use the /sql/.sql approach to create stored procedures
and views without any problem:
i.e, on sql/MyModel.postgresql_psycopg2.sql
CREATE OR REPLACE FUNCTION
myschema.my_function (
input_cuenta integer,
input_fecha date,
OUT id integer,
OUT texto text,
Hello,
I'm having a really hard time setting this up...
I have nginx up and running happily on http://media.domain.com:.
Now, I want that to be accessed with the same URI, but without the
port number -- and I just can't do it. Main site loads correctly. And
subdomain without the port number eith
On 1/16/07, Isaac Alston <[EMAIL PROTECTED]> wrote:
> You do have to add to urls.py. I'm using stockphoto on one of my
> sites, you can see my site's code here:
> http://svn.jayparlar.com/website/trunk/awwca/
Thanks for this. What I meant was the urls.py in the stockphoto
directory (sorry I di
Hi there,
I've customized a voting application interface to show voting results
on a custom view in admin.
However, the problem is that the frontpage and especially the logout
link are broken. Logout directs to admin/voting/result/logout, which
results in 404. Frontpage-link (in the breadcrumbs
Hi,
Is anyone here using the django development version on Gentoo ?
I'd like to upgrade to it .. I try to avoid installing packages in any
way other than through portage... so I'm looking for some sort of
gentoo ebuild that will install Django from a .tar.gz file (as I will
have to download the
"A.Ali" <[EMAIL PROTECTED]> writes:
Hi,
Is anyone here using the django development version on Gentoo ?
I'd like to upgrade to it .. I try to avoid installing packages in any
way other than through portage... so I'm looking for some sort of
gentoo ebuild that will install Django from a .tar.g
Hello,
I've found that each application should be specific in its
functionality. How you organize it really depends on the type of
project. A simple blog might only be one application. Our intranet
site has 7, including a settings.py file, if necessary.
I think how coupled or decoupled y
hi,
when i use CheckboxSelectMultiple in my form, all checkboxes for the
field are rendered with same ids.
is this mine or django's problem?
thanks.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Django
users"
How to enable profiling in internal development webserver?
This http://code.djangoproject.com/wiki/ProfilingDjango doesn't help.
Thanks,
Nuno Mariz
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Django
users" g
On Dec 15 2006, 1:55 am, limodou <[EMAIL PROTECTED]> wrote:
You can run your code outside of the block tag, so the block tag will
not push your context into the stack.
I changed the entire thing... looked at it from another angle, which
allowed me to do what I want to do.
--~--~-~--~
I am starting to look at the built-in Django testing framework. This
has forced me to take a new look at how I should handle SQL triggers and
stored functions. I am using *PostgreSQL* for the DB.
Django supports the automatic execution of SQL found in any files named:
/sql/.sql
or
I'm using Django's admin interface to view the fields of a table. One
of these fields in a foreign key reference to another table named
"Search". By default, Django's admin interface shows me "[Search
Object]" in the foreign key column. I'd prefer to see some identifying
information about the Sea
On 1/16/07, Aidas Bendoraitis <[EMAIL PROTECTED]> wrote:
What should be the proper output of the testing results if there are
no errors found?
I've never tried this branch, so I have no idea what constitues
correct output for these tests.
We already use the per-object-permission branch for
I was going to suggest looking at a Java-based system called Jasper
reports, which we got into because we found ourselves spending too much
time writing ReportLab scripts to generate PDFs (Jasper has a wysiwyg
interface and connects to databases directly).
However, seeing Chris' email reminded m
Hi community,
Been playing with Django for a while now, but I am still confused about the
separation of applications within a project. So far, I end up either
implementing all my features within one Django app, or having too many direct
connections between my apps, making each of them unexportab
I would try just to extend the custom manipulator as you would do with
custom manager:
class CustomAddManipulator(models.manipulators.AutomaticAddManipulator):
# ... override the manipulator ...
class CustomChangeManipulator(models.manipulators.AutomaticChangeManipulator):
# ... override
You do have to add to urls.py. I'm using stockphoto on one of my
sites, you can see my site's code here:
http://svn.jayparlar.com/website/trunk/awwca/
Thanks for this. What I meant was the urls.py in the stockphoto
directory (sorry I didn't make it clear). I notice that you've not
changed this
What should be the proper output of the testing results if there are
no errors found? We already use the per-object-permission branch for
development of different django projects for a few months and there is
no error found related to the branch. Should somebody create test
cases or something lik
For one of my models I need to do some extra validation.
Because of what I want it isn't possible to just rely on a validator, I
need a manipulator to get a request object.
The manipulator only has to add an extra validator to one field. This
validator validates using the database. No custom for
91 matches
Mail list logo