On Thu, 06 Sep 2007 22:55:38 -0700 AniNair wrote:
>I am using django 0.97 pre with python 2.5.1. I have been trying to
> learn this but i am having trouble with forms. What I want is to
> submit data in one page and do calculations with it and return the
> result in other page. I managed to d
On Thu, 2007-09-06 at 23:32 -0700, Julian wrote:
> Hi there,
>
> I opened a ticket yesterday, now I'm wondering about being alone with
> that bug.
>
> Please look here:
>
> http://code.djangoproject.com/ticket/5347
That ticket seems to be predicated on the assumption that the
documentation is
Hi there,
I opened a ticket yesterday, now I'm wondering about being alone with
that bug.
Please look here:
http://code.djangoproject.com/ticket/5347
Thanks
Julian
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Hi..
I am using django 0.97 pre with python 2.5.1. I have been trying to
learn this but i am having trouble with forms. What I want is to
submit data in one page and do calculations with it and return the
result in other page. I managed to do it using cgi, but can anyone
tell me how to get data
I've made a standalone program that uses Django modules.
At settings.py:
import os
PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))
At standalone script:
import sys, os
try:
import settings # this file was in the same directory of
settings.py
sys.path.append(os.path.join(setting
you code is good.
i find another one but not work for me(forget author name, sorry):
"""
Template tags for working with lists.
You'll use these in templates thusly::
{% load listutil %}
{% for sublist in mylist|parition:"3" %}
{% for item in mylist %}
do something w
This works like a charm. Thank you very much.
Thanks,
Charles
On Sep 6, 2:58 pm, RajeshD <[EMAIL PROTECTED]> wrote:
> > I think this would work with Python code. However, can I do the
> > translation in Django's Template language? If so, how?
>
> See
> blocktrans:http://www.djangoproject.com/d
On 9/7/07, Oleg Korsak <[EMAIL PROTECTED]> wrote:
> I just want to create form_for_model and/or form_for_instance and then
> delete one field (user). Is it possible or do I need to manually create my
> own form?
Sure - use the 'fields' option to specify the subset of model fields
you want to us
Hello. I have such model class:
from django.db import models
from django.utils.translation import gettext_lazy as _
from django.contrib.auth.models import User
class Profile(models.Model):
regnum = models.CharField(_('registration number'), maxlength=32)
pvnnum = models.CharField(_(
oh sorry. I've fixed that. That is because of form_for_model. Now I'm using
form_for_instance and all is working well ;) thanks
2007/9/6, RajeshD <[EMAIL PROTECTED]>:
>
>
> > --
> > so.. the problem is:
> >
> > Request Method: GET
> > Request URL
On 9/7/07, Nathaniel Whiteinge <[EMAIL PROTECTED]> wrote:
>
> Can fixtures have auto-incrementing primary keys or must you have
> specific PKs in the the serialized json/xml/etc files? If not, is
> there a reason for this?
This idea has occurred to me before, and I can see how it could be
useful,
Hi all,
This is my model:
class Person(models.Model):
GENDER_CHOICES = (
( 'm', 'Male' ),
( 'f', 'Female' ),
)
gender = models.CharField( blank=False, "gender", maxlength=1,
choices=GENDER_CHOICES, default='m' )
Using form_for_model() on the above model results in
On Sep 6, 1:48 pm, RajeshD <[EMAIL PROTECTED]> wrote:
> > It seems like the Choice table is easier on the user. You tell them
> > to go to the Choices table to enter all the look-up data, as opposed
> > to giving them X tables to wade through.
>
> As you said, it is probably a DB design question
On Sep 6, 10:55 pm, Nathaniel Whiteinge <[EMAIL PROTECTED]> wrote:
> Can fixtures have auto-incrementing primary keys or must you have
> specific PKs in the the serialized json/xml/etc files? If not, is
> there a reason for this?
>
> I'm programmatically generating fixtures from Freebase.org queri
On 9/6/07, Adam Jenkins <[EMAIL PROTECTED]> wrote:
> This actually brings up an issue. I've heard that many Django developers
> don't
> use projects at all, that they just use apps. Is this correct? Should I
> default to one
> project and break it up into smaller ones if the need arises?
First of
On 7 ago, 16:11, Mario Gonzalez <[EMAIL PROTECTED]> wrote:
> Hello, I'm doing some tests in a module I found: libpam-pgsql,
> basically with that library you're able to authenticate accounts in a
> postgres table. All my web systems are powered byDjangoandDjango
> uses SHA1 as the main encryption
Possibly. I have never heard of this and I do not do it. If I were
just making random applications for distribution to others I might
consider it, but most of the time I am making an application for a
specific purpose or organization/company. In that case, I create a
project for the org/company
Can fixtures have auto-incrementing primary keys or must you have
specific PKs in the the serialized json/xml/etc files? If not, is
there a reason for this?
I'm programmatically generating fixtures from Freebase.org queries for
a project. Although it's not a much extra work to add a pk counter, i
On 9/6/07, Brian Morton <[EMAIL PROTECTED]> wrote:
>
>
> Well, by its nature, each Django project has its own DB. Multi-db
> support is coming soon, but not in trunk yet.
>
> If these are all applications that belong to the same project, Django
> is not designed to handle them on a per-DB basis.
>
> It seems like the Choice table is easier on the user. You tell them
> to go to the Choices table to enter all the look-up data, as opposed
> to giving them X tables to wade through.
As you said, it is probably a DB design question -- even within a
single project, you might need to use both a
Well, by its nature, each Django project has its own DB. Multi-db
support is coming soon, but not in trunk yet.
If these are all applications that belong to the same project, Django
is not designed to handle them on a per-DB basis. The convention
Django uses is a DB for the project and _ for th
I'm moving old php apps to Django. All the old php apps each have their own
DB. So I'm deciding now if I should just put everything inside a big DB. I
think when I'm all done, I could easily push 200 tables. Almost all of these
are intranet apps, so the load is pretty small. Is one large DB an issu
> I have a requirement to use querysets as choices in various elements
> of a form, and as the data grows this is clearly going to have a big
> hit on the database every time this form is loaded. Can anyone think
> of a way around this? Is there a way to cache the query set and only
> up
On Sep 6, 9:18 pm, RajeshD <[EMAIL PROTECTED]> wrote:
> On Sep 5, 12:03 pm, MichaelMartinides <[EMAIL PROTECTED]>
> wrote:
>
> > Hi,
>
> > Just to be sure.
>
> > If I have custom template tags within a TextAreafield of a model. I
> > would do something like to following:
>
> > def view(request, pa
On Sep 4, 9:28 am, parabol <[EMAIL PROTECTED]> wrote:
> When I mark a field as unique_true is works as case-sensitive and does
> not catch something like "problem" and "Problem". What is the correct
> way of making it case-insensitive? Thus it will catch even "problem"
> and "ProBLem".
>
> I tr
On Sep 4, 7:18 am, canburak <[EMAIL PROTECTED]> wrote:
> I have a problem on overriding the save() method.
> my new save is:
> class ClassName:
> def save(self):
> self.title = self.title.title()
> super(ClassName, self).save()
>
> when admin site uses this save(), I get the non-unique
Hi!
I've tried to use never_cache from django.views.decorators.cache,
however my page was still getting cached by my ISP's transparent proxy
and/or my browser. I've checked that the headers that this decorator
adds were e.g.:
Expires: Thu, 06 Sep 2007 19:08:26 GMT
Last-Modified: Thu, 06 Sep 2007
On Sep 5, 12:03 pm, MichaelMartinides <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> Just to be sure.
>
> If I have custom template tags within a TextAreafield of a model. I
> would do something like to following:
>
> def view(request, page):
> p = Page.objects.get(name=page)
> t = Template( p.content
> I think this would work with Python code. However, can I do the
> translation in Django's Template language? If so, how?
See blocktrans:
http://www.djangoproject.com/documentation/i18n/#in-template-code
In short, you would use:
{% blocktrans %}login.before.you.proceed {{ login_url }}{%
endbl
> --
> so.. the problem is:
>
> Request Method: GET
> Request URL:http://127.0.0.1:8000/profile/
> Exception Type: AttributeError
> Exception Value:'Profile' object has no attribute 'get'
>
> what's wrong? :(
>
What line of c
I am currently building an app in windows machine which was already
built in unix machine. While running 'syncdb' command, I am getting
error 'unsupported locale setting'.
>>> import locale
>>> locale.setlocale(locale.LC_ALL, '')
>> 'English_United States.1252'
When I run this it returns error.
Also, do you have django.core.context_processors.request in your
context_processors? It looks like you're trying to overwrite a dict
element that already exists.
On Sep 6, 12:14 pm, Bram - Smartelectronix <[EMAIL PROTECTED]>
wrote:
> Hello Everyone,
>
> I have a request context which sets {'requ
Can we see your context processor code?
On Sep 6, 12:14 pm, Bram - Smartelectronix <[EMAIL PROTECTED]>
wrote:
> Hello Everyone,
>
> I have a request context which sets {'request':request}...
>
> On windows (dev-server) everything is fine and dandy, but on our live
> site (splicemusic.com, Apache2
On Thu, 06 Sep 2007 11:59:35 -0500, "Tim Chase"
<[EMAIL PROTECTED]> said:
> It would help if you made a note of what "that doesn't work
> either" means. Perhaps the actual error message or perhaps the
> "wrong" resulting output along with the expected output.
Well, it turned out the lack of resu
> SELECT t
> FROM (
> SELECT thing.thing_id AS t, COUNT
> (thing.thing_id) AS c
> FROM (
> SELECT thing_id
> FROM myapp_thing_sources
> WHERE sour
On Thu, Sep 06, Nis Jørgensen wrote:
>
> Michael Radziej skrev:
> > On Thu, Sep 06, Russell Keith-Magee wrote:
> >
> >
> >> On 9/6/07, Michael Radziej <[EMAIL PROTECTED]> wrote:
> >>
> >>> I'd *love* to have a sneak preview of your changes, any way? ;-)
> >>>
> >> Hey! Get to the
Hello Everyone,
I have a request context which sets {'request':request}...
On windows (dev-server) everything is fine and dandy, but on our live
site (splicemusic.com, Apache2 + mod_python) I see *sporadic*
appearances of:
"VariableDoesNotExist: Failed lookup for key [request] in [{}]"
Doe
James Tauber skrev:
> As before, I have a Thing model with a many-to-many relationship to
> Source.
>
> For a given Source, I want to find those Things that come only from
> that Source.
>
> This SQL works fine in dbshell (on sqlite):
>
> SELECT t
> FROM (
>
On 9/6/07, mamcxyz <[EMAIL PROTECTED]> wrote:
> Yeah, and maybe in mod_python I see the purpose... however why not
> doing that to a single import anyway? And for fastcgi and the dev web
> server that could by that simply... not?
"A single import" from where, exactly? Either you set
DJANGO_SETTIN
As before, I have a Thing model with a many-to-many relationship to
Source.
For a given Source, I want to find those Things that come only from
that Source.
This SQL works fine in dbshell (on sqlite):
SELECT t
FROM (
SELECT thing.thing
Michael Radziej skrev:
> On Thu, Sep 06, Russell Keith-Magee wrote:
>
>
>> On 9/6/07, Michael Radziej <[EMAIL PROTECTED]> wrote:
>>
>>> I'd *love* to have a sneak preview of your changes, any way? ;-)
>>>
>> Hey! Get to the back of the line! No queue-jumping! I was here first! :-)
>
At 4:22 PM + 9/5/07, Steve Potter wrote:
> >
>> Try coding each module as a Django template tag.
>> Then, create a template that returns an html fragment rather than a
>> full html page.
>> Associate each rendered template with a specific URL.
>> Perhaps something like:
>>mysite
Kelsey Ruger skrev:
> I am looking for a python based utility that will allow a user to sign
> their name with a mouse and save the resulting image for inclusion in
> a PDF. Has anyone heard of something like this?
>
A word of warning: Users may not be able to prodcue anythin that looks
like th
On Thu, Sep 06, Russell Keith-Magee wrote:
>
> On 9/6/07, Michael Radziej <[EMAIL PROTECTED]> wrote:
> >
> > I'd *love* to have a sneak preview of your changes, any way? ;-)
>
> Hey! Get to the back of the line! No queue-jumping! I was here first! :-)
... checking Malcolm's Amazone wishlist ..
I wrote this tag a couple months ago that should be of some help.
http://www.djangosnippets.org/snippets/296/
You can at least use it as a starting point for your own tag.
On Sep 6, 8:23 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> need your help, thx
>
> On 9月6日, 下午3时21分, "[EMAIL PROTECT
On 9/6/07, Michael Radziej <[EMAIL PROTECTED]> wrote:
>
> I'd *love* to have a sneak preview of your changes, any way? ;-)
Hey! Get to the back of the line! No queue-jumping! I was here first! :-)
Yours
Russ Magee %-)
--~--~-~--~~~---~--~~
You received this messa
Hi Malcolm,
On Fri, Sep 07, Malcolm Tredinnick wrote:
> My bad; you're right. Only m2m does outer joins on trunk at the
> moment.:(
>
> I've been looking at the new stuff too much lately. This problem is
> fixed there, so if people can wait until that lands very shortly it will
> go away.
this
Nice to make your acquaintance, Nis!
Yeah, I would really like to have some sort of meetup sometime. The
14th is out of the question though, I have work at my old job (night
shift at that). This is the last month I work there, so I'll spend the
night blocking Visa cards per the requests of drunke
[EMAIL PROTECTED] skrev:
> I'm having trouble piecing together a query for this model:
>
> class Ticket(models.Model):
> ...
> assigned_user = models.ForeignKey(User)
> name = models.CharField(maxlength=255)
> private = models.BooleanField(default=False)
>
> I'm trying to get all t
Michael Radziej skrev:
> On Thu, Sep 06, [EMAIL PROTECTED] wrote:
>
>
>> I thought I was close with this, but it only returned tickets assigned
>> to me. (The parenthesis around the 2nd and 3rd Q's obviously didn't
>> help)
>>
>> Ticket.objects.filter(Q(private__exact=False) |
>> (Q(private__ex
Nader skrev:
> I have used 'inspectdb' to produce the model, because I had a dump
> mysql file. In Meta section of model I have defined the table name:
>
> class Meta:
> db_table = 'Dataset'
>
> Besides If I check the application model with "python manage.py sqlall
> dataset" I see the sam
On Thu, 2007-09-06 at 21:25 +0800, Russell Keith-Magee wrote:
> On 9/6/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> >
> > > When you run Question.objects.filter(answer__isnull=True), this gets
> > > turned into an SQL query something like:
> > >
> > > SELECT Question.* from Question INNER J
Nis Jørgensen skrev:
> Emil Björklund skrev:
>
>> Hi folks,
>>
>> Two part post:
>>
>> 1. Just wanted to introduce myself: Emil, web designer/developer from
>> Malmö in southern Sweden, studying Information Architecture at Malmö
>> University where I also work as a tutor.
>> Come mostly from a
When I checked the queries generated, it appears that the isnull
lookups result in INNER JOINs for my case.
On 6 Eylül, 16:38, omat <[EMAIL PROTECTED]> wrote:
> Malcolm, these are the models:
>
> class Question(models.Model):
> question = models.CharField(max_length=150)
> slug = models
Malcolm, these are the models:
class Question(models.Model):
question = models.CharField(max_length=150)
slug = models.SlugField(max_length=150,
editable=False)
verb = models.ForeignKey(Verb)
added = models.DateTimeField(editable=False)
user = model
Thanks for clarifying this with such a detailed explanation.
I took the first way you have suggested and get things working with
the following manager:
class QuestionManager(models.Manager):
def get_not_answered(self):
cursor = connection.cursor()
cursor.execute("""SELECT que
Yeah, and maybe in mod_python I see the purpose... however why not
doing that to a single import anyway? And for fastcgi and the dev web
server that could by that simply... not?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Goog
On 9/6/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
>
> > When you run Question.objects.filter(answer__isnull=True), this gets
> > turned into an SQL query something like:
> >
> > SELECT Question.* from Question INNER JOIN Answer WHERE Question.id =
> > Answer.question_id WHERE Answer.id IS N
On Thu, 2007-09-06 at 20:59 +0800, Russell Keith-Magee wrote:
> On 9/6/07, omat <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > For Question & Answer models:
> >
> > Question.objects.filter(answer__isnull=False)
> >
> > returns the set of questions that has at least one answer, but:
> >
> > Questio
hi,
after upgrading to the unicode (latest svn head) nesh thumbnails dont
work saying: TypeError, Make_thumbnail() keywords must be strings.
Any clues?
--
regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/
--~--~-~--~~~---~--~~
You re
On Thu, Sep 06, Kenneth Gonsalves wrote:
>
>
> On 06-Sep-07, at 4:27 PM, Chris Hoeppner wrote:
>
> > Make sure you're serving the content with the right content type in
> > HTML, and that Django is working with the right content type, and that
> > the files have a coding declared.
>
> all thi
On 9/6/07, omat <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> For Question & Answer models:
>
> Question.objects.filter(answer__isnull=False)
>
> returns the set of questions that has at least one answer, but:
>
> Question.objects.filter(answer__isnull=True)
>
> does not return the questions that has no
it´s not so much about "adventurous", but about getting the deadline.
guess I´ll stick with manually doing it.
thanks,
patrick
On 6 Sep., 13:34, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:
> On 9/6/07, patrickk <[EMAIL PROTECTED]> wrote:
>
>
>
> > I´m having 2 models, where one is edited in
I have used 'inspectdb' to produce the model, because I had a dump
mysql file. In Meta section of model I have defined the table name:
class Meta:
db_table = 'Dataset'
Besides If I check the application model with "python manage.py sqlall
dataset" I see the same name which has been defi
need your help, thx
On 9月6日, 下午3时21分, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> sorry, i am a newbie to python.
> i have a queryset with 6 record, i want to show in 3 col and 2 row,
> how to do this, thx!!!
--~--~-~--~~~---~--~~
You received this message b
http://code.djangoproject.com/wiki/SchemaEvolution
On 6 сент, 14:51, ksuess <[EMAIL PROTECTED]> wrote:
> hi. I had to add a field to an existing model. how do i update the db?
> (of course there is content.)
--~--~-~--~~~---~--~~
You received this message because
Hi,
For Question & Answer models:
Question.objects.filter(answer__isnull=False)
returns the set of questions that has at least one answer, but:
Question.objects.filter(answer__isnull=True)
does not return the questions that has no answer.
Am I missing something?
Thanks,
oMat
--~--~--
On 9/6/07, Nader <[EMAIL PROTECTED]> wrote:
>
> I can directly get information from mysql session :
>
> mysql> select datasetname from dataset;
...
> But if I want to get information of the same dataset I got the empty
> list:
>
> >>> from ipdc.dataset.models import Dataset
> >>> Dataset.objects
On 9/6/07, patrickk <[EMAIL PROTECTED]> wrote:
>
> I´m having 2 models, where one is edited inline.
> Now, I have to make some customization to the admins add- and change-
> form (view and template).
>
> Question is: Should I go for formsets.py in the newadmin-branch or is
> there another (maybe e
alter table your_table add column blablalbla
ksuess пишет:
> hi. I had to add a field to an existing model. how do i update the db?
> (of course there is content.)
>
--
Artiom Diomin, Development Dep, "Comunicatii Libere" S.R.L.
http://www.asterisksupport.ru
http://www.asterisk-support.com
On 06-Sep-07, at 4:27 PM, Chris Hoeppner wrote:
> Make sure you're serving the content with the right content type in
> HTML, and that Django is working with the right content type, and that
> the files have a coding declared.
all this is correctly done - it was working before I upgraded to svn
s> I just wanna know how to do the trasnsaction with postgresql. If
s> anyone has any clue / document, or has some working code on this
s> issue, just send me the related excerpts.
Quick google search on "django transaction" reveals
http://www.djangoproject.com/documentation/transactions/
Make sure you're serving the content with the right content type in
HTML, and that Django is working with the right content type, and that
the files have a coding declared.
El jue, 06-09-2007 a las 16:24 +0530, Kenneth Gonsalves escribió:
> hi,
> I have a site in finnish. It was rendering fine un
On 9/5/07, AniNair <[EMAIL PROTECTED]> wrote:
>
> Hi... I am using python 2.5.1 with django .97 pre. I am trying to have
> a page from the url config
> (r'^users/', include('dbp.users.views.show')),
The include() around 'dbp.users.views.show' is telling Django to load
another urlconf module name
Manually alter the table. Or use some GUI like phpMyAdmin or PgAdmin.
It's the *safe* way of doing things.
Another *not so safe* way is, dump your data, make sure the new field
has a default value or accepts null as it's value, reset the table, and
insert the dump. The manually or programaticall
hi,
I have a site in finnish. It was rendering fine until I upgraded to
the latest svn head. Now the character A with marks on top of it
refuses to render. The other finnish characters are rendering. Any
clues?
--
regards
kg
http://lawgon.livejournal.com
http://nrcfosshelpline.in/web/
-
hi. I had to add a field to an existing model. how do i update the db?
(of course there is content.)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-
On 6 Sep 2007, at 11:06 am, b3n wrote:
> I wasn't sure if the syntax was different for Unix/Windows. I think it
> would be helpful if the tutorial made a statement to that effect.
Surely not saying anything implies that there are no differences
between the two?
--
David Reynolds
[EMAIL PROT
For a project the setting of database in 'settings.py' file is as :
DATABASE_ENGINE = 'mysql'
DATABASE_NAME = 'ipdc'
DATABASE_USER = ''
DATABASE_PASSWORD = ''
DATABASE_HOST = '/path/mysql-data/mysql.sock'
DATABASE_PORT = ''
I can directly get information from mysql session :
mysql> select datas
I wasn't sure if the syntax was different for Unix/Windows. I think it
would be helpful if the tutorial made a statement to that effect.
On 29 Aug, 23:39, Graham Dumpleton <[EMAIL PROTECTED]> wrote:
> On Aug 29, 11:06 pm, b3n <[EMAIL PROTECTED]> wrote:
>
> > Hey I managed to get Apache to find D
I´m having 2 models, where one is edited inline.
Now, I have to make some customization to the admins add- and change-
form (view and template).
Question is: Should I go for formsets.py in the newadmin-branch or is
there another (maybe easier) possibility?
If I should use formsets.py, does anyone
On Thu, Sep 06, [EMAIL PROTECTED] wrote:
> I thought I was close with this, but it only returned tickets assigned
> to me. (The parenthesis around the 2nd and 3rd Q's obviously didn't
> help)
>
> Ticket.objects.filter(Q(private__exact=False) |
> (Q(private__exact=True) & Q(assigned_user__usernam
Chris
Thanks for the plug!
Reading through that code makes it much clearer and gives me a great
example to follow. I've been thinking about looking at satchmo you
could just have another convert!
cheers
Mike
On Sep 5, 9:21 pm, "Chris Moffitt" <[EMAIL PROTECTED]> wrote:
> I've used satchmo bef
sorry, i am a newbie to python.
i have a queryset with 6 record, i want to show in 3 col and 2 row,
how to do this, thx!!!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group,
84 matches
Mail list logo