On Fri, 2008-12-12 at 10:51 -0800, ben852 wrote:
> C:\Users\Benjamin\Desktop\mysite\sqlite3
> SQLite3 version 3.6.6.2
> Enter".help" for instructions...
This suggests that the sqlite3 program is not on your normal system
paths. So Django won't be able to execute it. Al
ThX to Malcolm
I can launch sqlite3 by cmd.
Later.let me try it without "manage.py dbshell".
--~--~-~--~~~---~--~~
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@go
Perfect !
Then i just do a {% ifequal request.GET.extra_context "foo" %} and it
works.
Thanks
On Jan 16, 3:10 am, Malcolm Tredinnick
wrote:
> On Thu, 2009-01-15 at 04:13 -0800, coulix wrote:
> > Hi,
>
> > I use a formWizard for a signup process:
>
> > url(r'^signup/student/$', SignupStudentW
Am building a Q&A page, sort of stackoverflow.com kinda page! Am
having a bit of a problem trying to render the form. Am pasing 3
objects to the template that renders the page i.e. Question object,
Answers related to the question and Answer form object.
In the first part of the page i want to dis
On Fri, 2009-01-16 at 01:10 -0800, Gath wrote:
> Am building a Q&A page, sort of stackoverflow.com kinda page! Am
> having a bit of a problem trying to render the form. Am pasing 3
> objects to the template that renders the page i.e. Question object,
> Answers related to the question and Answer fo
On Jan 16, 2009, at 5:10 PM, Gath wrote:
>
> Am building a Q&A page, sort of stackoverflow.com kinda page! Am
> having a bit of a problem trying to render the form. Am pasing 3
> objects to the template that renders the page i.e. Question object,
> Answers related to the question and Answer form
On Jan 16, 5:16 am, Malcolm Tredinnick
wrote:
> > How can I add m2m to both models without using third model with
> > foreign keys (or with it, but without extra ID field)? If to be
> > sincere it doesn't make much sense, but everything in Django should be
> > perfect :)
>
> You only specify th
Following the general rule that no good deed goes unpunished, I have a
question about complex aggregation / annotation or annotation across
foreign keys.
I have the following simplified model:
class Unit(models.Model):
unit = models.TextField()
class Process(models.Model):
process = mod
Yep!
I've done what Malcolm has suggested, removed everything and added one
section at a time, and i guess its behaving. The problem seems to lie
with a "extends" tag and a css am using.
Thanks guys.
On Jan 16, 12:10 pm, Gath wrote:
> Am building a Q&A page, sort of stackoverflow.com kinda pag
On Fri, 2009-01-16 at 01:33 -0800, Evgeniy Ivanov (powerfox) wrote:
>
>
> On Jan 16, 5:16 am, Malcolm Tredinnick
> wrote:
[...]
> > You need to go back and look at your original problem. You wanted forms
> > with multiselect fields for both forms. So the real question is "how do
> > you do tha
Try this:
Process.objects.filter(exchange__input__unit__unit="kilogram")\
.annotate(sum_amount=Sum("exchange__amount"))\
.filter(sum_amount__gt=1)
On Fri, Jan 16, 2009 at 12:38 PM, Christopher Mutel
wrote:
>
> Following the general rule that no
I'm using memcached, the latest version from Ubuntu 8.10.
The cache is initially empty for that key (I was changing the key when
testing to force this) and the contents of cached were originally
coming from a call to Bank.objects.all().
Thanks for the explanation about what the iso-8859-1 is doi
Hi,
I think it is bad that request.session.save() is called, if
the DEBUG-View gets returned on an uncaught exception.
I looked at the django source, but could not find a good patch for django
or my code.
What is bad about this: The debug view is not returned, since a second
happens
on request.
On Fri, 2009-01-16 at 11:19 +0100, Thomas Guettler wrote:
> Hi,
>
> I think it is bad that request.session.save() is called, if
> the DEBUG-View gets returned on an uncaught exception.
>
> I looked at the django source, but could not find a good patch for django
> or my code.
>
> What is bad ab
Thank You! That was the correct syntax :)
For anyone else with the same problem, you can also utilise
"related_name" to provide syntactically pleasing access to your
objects, such as:
lightbox.photographs.all() - to retrieve Photograph objects
lightbox.items.all() - to retrieve Item objects
phot
Thank You! That was the correct syntax :)
For anyone else with the same problem, you can also utilise
"related_name" to provide syntactically pleasing access to your
objects (have changed class name LightboxPhotograph to Item), such as:
lightbox.photographs.all() - to retrieve Photograph objects
On 15 jan, 22:57, Greg wrote:
> > Or just read the code - that's what I did FWIW !-)
>
> Tried that. In fact I'd actually tried the get_nodes_by_type method
> and in hindsight I realise it failed for the reason below, but I
> didn't realise that at the time.
>
> > > One other slightly tricky th
Guys
Am getting the following error message when try to save on my form:
Cannot assign "U'1'": "Answer.Questionid" must be "Question" instance
On my Answer Model questionid is Foreign field to the Question model
defined as follows,
Class Answer(models.Model):
answer=models.ForeignKey(Questi
On Fri, 2009-01-16 at 03:19 -0800, Gath wrote:
> Guys
> Am getting the following error message when try to save on my form:
>
> Cannot assign "U'1'": "Answer.Questionid" must be "Question" instance
The error message is telling you exactly what the problem is. You should
believe the error message
Great Malcolm, it was supposed to be questionid_id! solved. But i
wonder why for userid am not doing userid_id???, userid works well !!!
hmm
Paul
On Jan 16, 2:19 pm, Gath wrote:
> Guys
> Am getting the following error message when try to save on my form:
>
> Cannot assign "U'1'": "Answer.Qu
On Fri, 2009-01-16 at 03:59 -0800, Gath wrote:
> Great Malcolm, it was supposed to be questionid_id! solved. But i
> wonder why for userid am not doing userid_id???, userid works well !!!
Because request.user is an instance of the User model. Once again,
reading and understanding the error messag
I have these three models:
class Address(models.Model):
name = models.CharField(max_length=100)
## many other fields ##
class Meta:
ordering = ('name',)
def __unicode__(self):
return self.name
class Organization(models.Model):
name = models.CharField(max_le
Hi All.
Some of you have checked out django-batchimport to either bulk import
or bulk update your database. Some of you have provided some great
feedback. Thank you! Seems like it's working fairly well for
straightforward XLS files. But I'd like to offer better support for
CSV files and more diff
Guys,
I might be lazy or am blind! but the following code is returning ZERO!
items, while very well i know there is some items in the list,
View:
def post_answer(request, quest_id=None):
answer_list = Answer.objects.filter
(questionis__pk=quest_id).select_related()
...
# if a put a p
hi , i'm now reading a Django tutorail naming:
"Writing your first Django app, part 1"
In the "Activating models" part , it asks me to:
1. add 'mysite.polls' into INSTALLED_APPS,
2.then type "python manage.py sql polls".
I tried , but coundn't get the thing works.
with a second try ,
Do you have the `__init__.py` file in mysite directory?
On Fri, Jan 16, 2009 at 2:21 PM, syo wrote:
>
> hi , i'm now reading a Django tutorail naming:
> "Writing your first Django app, part 1"
>
> In the "Activating models" part , it asks me to:
> 1. add 'mysite.polls' into INSTALLED_APPS
iam installing django and activepython on my vista machine but its not
working. can anyone help me with the installation please. I am bit
confused how to create the environment variable. nothing is working
for me...
--~--~-~--~~~---~--~~
You received this message b
On Friday 16 Jan 2009 4:51:22 pm syo wrote:
> here , my question is : need realIy add "mysite" before the "polls"?
if 'mysite' is in your path then obviously you just need to add 'polls'
--
regards
KG
http://lawgon.livejournal.com
--~--~-~--~~~---~--~~
You rec
Settings.py wants a sqlite3.db. When I loaded python 2.5 I got a
sqlite3.dll and sqlite3.pyd sqlite3.lib, but no sqlite3.db. I used
sqlite3.pyd and got:
File "C:\Python25\Lib\site-packages\django\db\__init__.py", line 16,
in
backend = __import__('%s%s.base' % (_import_path,
settings.DATABAS
Wiadomość napisana w dniu 2009-01-16, o godz. 14:39, przez bconnors:
> Settings.py wants a sqlite3.db. When I loaded python 2.5 I got a
> sqlite3.dll and sqlite3.pyd sqlite3.lib, but no sqlite3.db. I used
> sqlite3.pyd and got:
> File "C:\Python25\Lib\site-packages\django\db\__init__.py", line 1
On Jan 16, 12:45 pm, Gath wrote:
> Guys,
>
> I might be lazy or am blind! but the following code is returning ZERO!
> items, while very well i know there is some items in the list,
>
> View:
> def post_answer(request, quest_id=None):
> answer_list = Answer.objects.filter
> (questionis__pk=que
yes it does:
Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit
(Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
Traceback (most recent call last):
File "", line 1, in
ImportError: DLL load failed with error code 193
joshuajonah wrote:
> I'm starting a major project as we speak. It's a site where I can
> create sub-sites for my clients in subdomains (e.g:
> clientsite.mainproject.com). Just like basecamp/tons of other sites.
>
> Many of these sites will have domains pointed at the subdomains on my
> main site
Wiadomość napisana w dniu 2009-01-16, o godz. 15:38, przez bconnors:
> yes it does:
>
> Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit
> (Intel)] on
> win32
> Type "help", "copyright", "credits" or "license" for more information.
import sqlite3
> Traceback (most recent c
On Jan 16, 12:47 pm, Malcolm Tredinnick
wrote:
> On Fri, 2009-01-16 at 01:33 -0800, Evgeniy Ivanov (powerfox) wrote:
>
> > On Jan 16, 5:16 am, Malcolm Tredinnick
> > wrote:
>
> [...]
>
> > > You need to go back and look at your original problem. You wanted forms
> > > with multiselect fields f
Roseman,
Even after removing the attribute object_list, the answerobj still
does not return any length.
Am still very stuck!
Paul
On Jan 16, 5:35 pm, Daniel Roseman
wrote:
> On Jan 16, 12:45 pm, Gath wrote:
>
>
>
> > Guys,
>
> > I might be lazy or am blind! but the following code is returnin
I have a UserProfile admin form inline with the admin form for Users,
and I was wondering if there is a simple way to enforce a requirement
to have a UserProfile.
It looks like I need to create a custom form to use in a custom
UserAdmin (ModelAdmin) class for User, so I can add the appropriate
v
i can send emails easily using django.
I want to set up an email address, where users can send email to the
app (designated email address) and my django application receives it,
parses it and stores it in database.
What would be the easiest way to do it. ie " To receive email from
users in Djan
You mean you want uses to send an email like i...@yourapp.com, and these
mails need to be stored in the database.
What I would do, though may not be the most efficient way is to use a python
program, to access the email box, parse the mails and store it into simple
table. Python has excellent emai
On Jan 16, 6:13 am, jazz wrote:
> iam installing django and activepython on my vista machine but its not
> working. can anyone help me with the installation please. I am bit
> confused how to create the environment variable. nothing is working
> for me...
Sorry jazz I don't have much advice fo
http://docs.djangoproject.com/en/dev/topics/install/#installing-the-development-version
I'm currently on a Windows system and stuck on step #3. I have no idea
how to continue because I don't know what an "environment variable"
actually is and what they do.
I've looked into how to create "environ
Very strange,
this object list seems to be depended to the Paginator module, i have
this line on my imports
from django.core.paginator import Paginator, InvalidPage, EmptyPage
then added this code on my view
paginator = Paginator(answer_list,5)
try:
page = int(reque
I was able to get Django 1.0.2 running on Python Twisted WSGI web
server (8.2)
I can get a simple application (todo list) to to work (I am using
postgresql database).
However there are some problems
1) when I click localhost:8000/admin
I am presented with login screen (but without any backgroun
On Fri, Jan 16, 2009 at 7:14 AM, Marco Minutoli wrote:
>
> I have these three models:
>
> class Address(models.Model):
>name = models.CharField(max_length=100)
>## many other fields ##
>
>class Meta:
>ordering = ('name',)
>
>def __unicode__(self):
>return self.name
On Fri, Jan 16, 2009 at 4:47 PM, Ty wrote:
>
> http://docs.djangoproject.com/en/dev/topics/install/#installing-the-development-version
>
> I'm currently on a Windows system and stuck on step #3. I have no idea
> how to continue because I don't know what an "environment variable"
> actually is and
I figured it out, and feel dumb for asking a silly question.
The environment variable "PYTHONPATH" value has to be set to where the
trunk is located on your local system. In my case it had to be set to
here:
"C:\Server\django-trunk"
And yes, it does replace the setup.py method.
Follow-up quest
It seams we have posted at almost the same time. Thanks for the reply.
On Jan 16, 1:59 pm, Ramiro Morales wrote:
> On Fri, Jan 16, 2009 at 4:47 PM, Ty wrote:
>
> >http://docs.djangoproject.com/en/dev/topics/install/#installing-the-d...
>
> > I'm currently on a Windows system and stuck on step #
On Jan 16, 7:03 pm, Ty wrote:
> Follow-up question:
> I have a project that was created using the 1.0.2 version. Is it a
> good idea to basically recreate the project and apps using the newest
> version of the django-admin.py file, and then migrate the code over?
> I'm assuming so.
No, there is
Thanks for the clarification.
On Jan 16, 2:18 pm, Daniel Roseman
wrote:
> On Jan 16, 7:03 pm, Ty wrote:
>
> > Follow-up question:
> > I have a project that was created using the 1.0.2 version. Is it a
> > good idea to basically recreate the project and apps using the newest
> > version of the d
I'm using diamanda, and altering a few things in an attempt to get the
above mentioned outcome.
First question however... importing groups... explicitly, how?
would:
from django.contrib.auth.models import User, Groups
suffice?
next, the code.
in my models for the Forum class:
private = models
zweb wrote:
> i can send emails easily using django.
>
> I want to set up an email address, where users can send email to the
> app (designated email address) and my django application receives it,
> parses it and stores it in database.
>
> What would be the easiest way to do it. ie " To receive em
Hi,
I'm quite new with django, and i still don't know if it's the right
framework for my project.
I'm trying to have in my web site a lot (like hundreds) of table with
different fields(depends of the table), that could be created
dynamically.
I don't want to create a model for each table, but a
What contexts are made available to the email templates (.txt files)?
When I receive emails from the form provided by the default setup, I'm
being given the following for both the subject, and the message of the
email.
>
Thank you in advance
Ryan
--~--~-~--~~~---~--~
Well,
I've implementend this 'kind of model' using 3 Models:
http://www.djangosnippets.org/snippets/1286/
Take a look, and with some modification you should have your working model.
Wai Yi Leung
e-Sensei Technical Programmer
2009/1/16 Julien
>
> Hi,
>
> I'm quite new with django, and i still
Thats fine but how to setup the environment path.
On Sat, Jan 17, 2009 at 7:18 AM, Milan Andric wrote:
>
>
>
> On Jan 16, 6:13 am, jazz wrote:
>> iam installing django and activepython on my vista machine but its not
>> working. can anyone help me with the installation please. I am bit
>> confu
This problem has been racking my brain for days now, I suppose it's
time to ask for help. I should point out that I'm really new to both
python and django.
I have the following model...
from django.db import models
class RSSFeed(models.Model):
name = models.CharField(max_length=255)
url
Hey django-users,
I've got a form in my django app that contains a select box that is
dynamically generated from a db object. In this case, it's a list of
clients.
When a user adds to the client list (via another django app), the
'client' select box isn't updated with the new value(s) the next
Hello Ryan,
Admittedly the docs at
http://django-contact-form.googlecode.com/svn/trunk/docs/overview.txt
just say you need to create the template files "contact_form/
contact_form_subject.txt" and "contact_form/contact_form.txt" and not
much else, but in "contact_form_subject.txt" you need to pu
I'd like to forward incoming emails to a distribution list defined by
querying the User table.
It seems to me like the easiest thing would be to take the incoming
email message and send it back out verbatim to the generated recipients.
However, I don't see a way to construct an EmailMessage that
Hi
when i try to import django formsets i get error. I am very new to
django so was not able to fix this.
In [19]: from django.shortcuts import render_to_response
In [20]: from django.forms.formsets import formset_factory
-
On Jan 16, 5:47 pm, Atishay wrote:
> Hi
>
> when i try to import django formsets i get error. I am very new to
> django so was not able to fix this.
>
> In [19]: from django.shortcuts import render_to_response
>
> In [20]: from django.forms.formsets import formset_factory
>
On Fri, 2009-01-16 at 13:21 -0800, cptnwinky wrote:
[...]
> I'm trying to perform a icontains search on the name field of the
> Torrent class. I need it to also return, with each result, it's
> corresponding trackers, seeds, leeches and downloads. Here is the
> relevant line in my view...
>
> res
On Fri, 2009-01-16 at 16:26 -0800, raji wrote:
> Hey django-users,
>
> I've got a form in my django app that contains a select box that is
> dynamically generated from a db object. In this case, it's a list of
> clients.
>
> When a user adds to the client list (via another django app), the
> 'c
Brian Victor wrote:
> I'd like to forward incoming emails to a distribution list defined by
> querying the User table.
In our hosting operation, we store virtual domain, virtual user, and
forwarder data for Postfix in PostgreSQL. The following should give you
some ideas.
Using the psql shell:
vm
Thanks for replying.
I don't mean to sound crass but I did mention what the problem was.
Quote:
I've even tried specifying in select_related which exact tables and
fields I want returned however, only the results from Torrent table is
returned.
The problem is it only returns results from the To
On Fri, Jan 16, 2009 at 11:26 PM, cptnwinky wrote:
>
> Thanks for replying.
>
> I don't mean to sound crass but I did mention what the problem was.
>
> Quote:
> I've even tried specifying in select_related which exact tables and
> fields I want returned however, only the results from Torrent tabl
On Fri, 2009-01-16 at 20:26 -0800, cptnwinky wrote:
> Thanks for replying.
>
> I don't mean to sound crass but I did mention what the problem was.
>
> Quote:
> I've even tried specifying in select_related which exact tables and
> fields I want returned however, only the results from Torrent tabl
I'm using django-thumbs (http://code.google.com/p/django-thumbs/) to
create some thumbnails for my site:
class Image(models.Model):
title = models.CharField(max_length=50, blank=True, null=True)
caption = models.CharField(max_length=100, blank=True, null=True)
photo = ImageWithThumbsF
Once again, thanks all for the help, I really do appreciate it.
Karen, I've read that page at least 10 times in the past 24 hours.
Perhaps I just don't understand it though. The problem is that using
"filter" returns a queryset which does not contain the *_set function
that using "get" supplies.
On Sat, Jan 17, 2009 at 12:12 AM, cptnwinky wrote:
>
> Once again, thanks all for the help, I really do appreciate it.
>
> Karen, I've read that page at least 10 times in the past 24 hours.
> Perhaps I just don't understand it though. The problem is that using
> "filter" returns a queryset which
Hi all,
I'm newbie in Django so probably this is just a stupid error. After
read a lot of doc can't figure out how access a specific permission to
check it.
I wrote some model with a custom permission:
# In test_app/models.py
def SomeModel(models.Model):
...
class Meta:
Permissions(
On Fri, 2009-01-16 at 21:14 -0800, frankabel wrote:
> Hi all,
>
> I'm newbie in Django so probably this is just a stupid error. After
> read a lot of doc can't figure out how access a specific permission to
> check it.
Custom permission stuff is fairly poorly documented at the moment. The
inform
Ok, I got it working, I changed:
> photo = ImageWithThumbsField(
> upload_to="site_images",
> sizes=((270,150),))
to:
photo = ImageWithThumbsField(
upload_to="static/site_images",
sizes=((270,150),))
and
> MEDIA_URL = 'static/'
to:
On Fri, 2009-01-16 at 21:06 -0800, DragonSlayre wrote:
> I'm using django-thumbs (http://code.google.com/p/django-thumbs/) to
> create some thumbnails for my site:
>
> class Image(models.Model):
> title = models.CharField(max_length=50, blank=True, null=True)
> caption = models.CharField(
Yeah, that makes good sense - I tried finding out info on
djangoproject but didn't quite understand what they were for.
Thanks
On Jan 17, 7:04 pm, Malcolm Tredinnick
wrote:
> On Fri, 2009-01-16 at 21:06 -0800, DragonSlayre wrote:
> > I'm using django-thumbs (http://code.google.com/p/django-thum
Yes , i have the file you mentioned ,
following is entire files for this test project:
mysite/
-- __init__.py
-- settings.py
-- manage.py
-- urls.py
-- polls/
-- __init__.py
-- models.py
thanks for replay , then is it safe to say there is something wrong in
this tutorial?
On Jan 16, 10:37 pm, Kenneth Gonsalves wrote:
> On Friday 16 Jan 2009 4:51:22 pm syo wrote:
>
> > here , my question is : need realIy add "mysite" before the "polls"?
>
> if 'mysite' is in your path then obvi
> Firstly, that's not how you specify custom permissions. In fact, I'm
> surprised that doesn't raise some kind of error in Python. Have a look
> athttp://docs.djangoproject.com/en/dev/ref/models/options/#permissions
>
I was trying right, just make the mistake when type the post (now
realize tha
78 matches
Mail list logo