On Apr 15, 7:10 am, Adam Yee wrote:
> Can't get the forms.RadioSelect widget to render. I'm using svn
> 10559, I've looked over forms/widgets.py, but I don't know... I'm
> able to use forms.CheckboxSelect just fine.
>
> Is it Firefox giving me issues? What's going on here?
>
> #forms.py
> clas
Can't get the forms.RadioSelect widget to render. I'm using svn
10559, I've looked over forms/widgets.py, but I don't know... I'm
able to use forms.CheckboxSelect just fine.
Is it Firefox giving me issues? What's going on here?
#forms.py
class PollForm(forms.Form):
def make_fields(self, p
i think the change has not hit the database. if your database is still
empty then try doing python manage.py reset appname - that clears
whole app database though.
Alan
On Apr 15, 6:24 am, CrabbyPete wrote:
> I am just starting coding with django. So please bear with me.
>
> I made a change to
well, im also a beginner but i think this should help you :
http://docs.djangoproject.com/en/dev/ref/models/querysets/
Scroll down abit. there is example about books and authors which have
quite similar relations to your models. In any case your information
should e possible to get with one djan
Well, i'm also new :)
I've been using django for a couple of days trying to learn while developing
a Pizza Delivery Software... (yes, I got bored doing blogs) and since it is
not a traditional website where one has an admin area and a
regular-user-live-site area, I feel that almost every functiona
I am just starting coding with django. So please bear with me.
I made a change to my User model so the field email_addr is now email.
I deleted the database, made new tables with manage.py, did a resync,
and changed all the code that refered to email_addr to email.
Everything looks fine, but I st
Why don't people use komodo edit. It's free and import works(mostly).
It's got project browser, snippets, and commands, and works in mac/
linux/windows. There's even a django syntax highlighter plugin and an
sqlite db browser plugin. Oh, you can also write macros for it in
python or javascript (f
Hello world with import socket gave me the same issue. I just re-
installed Python 2.6, more specifically 2.6.2 and everything is
working fine, thanks for your help.
On Apr 14, 10:25 pm, Graham Dumpleton
wrote:
> On Apr 15, 12:07 pm, Thierry wrote:
>
>
>
> > I'm currently running Apache 2.2 on
heya,
I'm still a bit confused as to how to setup Django to work with
Netbeans.
I'm using Netbeans 6.7 M3 from here:
http://bits.netbeans.org/download/6.7/m3/
I've created a new Django project using django-admin, e.g.:
django-admin.py startproject testproject
and then I'm creating a new "Pyt
I feel like there must be something very elementary that I'm missing
here, but I've been all through the documentation and can't figure it
out.
Say an app includes three models:
- "Products"
(includes fields: Product Name, Supplier, Cost Price, Retail Price
- "Customers"
(includes fields: Cus
If you are just wanting to serve out the files on the public site then you
can just copy them over from the media/uploads folder on the intranet site,
to the media/uploads folder on the public site. You can setup an cron job or
simple post_save signal on the private side that automatically copies t
On Apr 15, 12:07 pm, Thierry wrote:
> I'm currently running Apache 2.2 on Windows and I can get the hello
> world of modwsgi to run. However, when I configure my Django project,
> Apache has the following errors from the error.log file:
>
> mod_wsgi (pid=5956): Target WSGI script 'C:/django_pr
I'm currently running Apache 2.2 on Windows and I can get the hello
world of modwsgi to run. However, when I configure my Django project,
Apache has the following errors from the error.log file:
mod_wsgi (pid=5956): Target WSGI script 'C:/django_proj/mysite/apache/
mysite.wsgi' cannot be loaded
On Apr 15, 7:49 am, Alex Loddengaard wrote:
> I've found several messages on this list discussing ways to send large files
> in a HttpResponse. One can use FileWrapper, or one can use a generator and
> yield chunks of the large file. What about the case when the large file is
> generated at H
On Tue, Apr 14, 2009 at 11:59 AM, AliasXNeo wrote:
> The problem is intriguing, and I attempted to download and install the
> official release 3 more times and then proceeded to get the latest
> develepor release from SVN only to get the same exact problem. I'm
> running the latest version of Pyt
On Tue, Apr 14, 2009 at 5:12 PM, stkpoi wrote:
> if form.is_valid():
> submission = Submission.objects.get_or_create(
> title=form['title'],
> link=form['link'],
> user=request.user.username
> )
And right there's your problem. The value to put into a ForeignKey is
the
On Apr 14, 7:26 pm, Jamie wrote:
> I am working on an app that will export a calendar event to Google
> Calendar. Google Calendar requires that event datetimes be in UTC
> format. I can make the conversion from local (America/New_York) to UTC
> using pytz, but the time is off by an hour due to da
All:
I'm adding an app (from django snippits) that is just a template tag
for a calendar application in my blog. This is the new directory
structure:
/apps/postcal
|
--> __init__.py
|
--> /templatetags
> Looking at the code for the wsgi handler, it does call start_response()
> before processing any of the response body - my understanding is that
> this should cause the headers to be sent immediately.
Humph, looks like my understanding isn't so hot - PEP 333 explicitly
forbids start_response fro
> I've found several messages on this list discussing ways to send large
> files in a HttpResponse. One can use FileWrapper, or one can use a
> generator and yield chunks of the large file. What about the case
> when the large file is generated at HTTP request time? In this case,
> it would be a
We're building an intranet and a public site that share a lot of data
but without shared views. Therefore we're building them as two
distinct Django projects connecting to a single shared database, with
shared apps. To reduce confusion, the contrib.admin is only enabled on
the intranet side, not o
I am working on an app that will export a calendar event to Google
Calendar. Google Calendar requires that event datetimes be in UTC
format. I can make the conversion from local (America/New_York) to UTC
using pytz, but the time is off by an hour due to daylight savings
time (Python thinks the off
#urls.py
urlpatterns = patterns('',
(r'^$', main_page),
# ...
(r'^submit/$', submit_page),
(r'^submit/success/$', direct_to_template,
{ 'template': 'submit/submit_success.html' }),
)
The error occurs at the "user=request.user.username" line in views.py.
--~--~-~--~--
On Apr 14, 6:11 pm, Kevin Cole wrote:
> Hi,
>
> First let me say I've looked at documentation, but feel a bit dyslexic
> when it comes to this stuff.
>
> The situation: I have three tables: a service provider table with
> city, state abbreviation and country abbreviation (among other other
> info
On Apr 14, 9:47 pm, Leon wrote:
> Hello!
>
> I'm new to django so far I like it, but I've now reached my first big
> hurdle.
>
> I'm building a page which has a cms in the root, which shows the main
> menu, and submenu of the site,
> but then I have a blog app and a gallery app which are coupled
On Tue, Apr 14, 2009 at 6:00 PM, gordyt wrote:
>
> I think I've tracked down the problem. Here is a bit of code from
> django.db.models.fields.related.py:
>
>def get_db_prep_lookup(self, lookup_type, value):
># If we are doing a lookup on a Related Field, we must be
># compar
On Apr 14, 11:12 pm, stkpoi wrote:
> I would like the url to not include the user's name. For example, it
> would be "/submit" and not "/submit/joe_user".
>
> request.user.username is not working for me.
>
> # Model
> class Submission(models.Model):
> title = models.CharField(max_length=200)
On Apr 14, 8:51 pm, grimmus wrote:
> Thanks for the reply Alex,
>
> I am not really sure how i am supposed to override the default field
> type.
>
> The link talks about MyDateFormField() but is this a method or what ?
>
> Could you provide an example of how i could put the form field on the
> fo
I would like the url to not include the user's name. For example, it
would be "/submit" and not "/submit/joe_user".
request.user.username is not working for me.
# Model
class Submission(models.Model):
title = models.CharField(max_length=200)
link = models.URLField()
user = models.Fo
Here is a dpaste link to that same bit of code that looks nicer:
http://dpaste.com/hold/33474/
--gordy
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to djang
I've found several messages on this list discussing ways to send large files
in a HttpResponse. One can use FileWrapper, or one can use a generator and
yield chunks of the large file. What about the case when the large file is
generated at HTTP request time? In this case, it would be annoying to
I think I've tracked down the problem. Here is a bit of code from
django.db.models.fields.related.py:
def get_db_prep_lookup(self, lookup_type, value):
# If we are doing a lookup on a Related Field, we must be
# comparing object instances. The value should be the PK of
value,
On Tue, Apr 14, 2009 at 2:36 PM, Lars Stavholm wrote:
>
> Hi All,
>
> I'm trying to get django-grappelli running, but after following
> the installation instructions, I end up with a 404 and the following:
>
> Using the URLconf defined in bfact.urls, Django tried these URL
> patterns, in this ord
I've done something similar using jquery and the dynatree plugin,
though the directory "structure" doesn't actually exist on the file
system of the server. I'm building my tree from relationships stored
in the db.
Works for me so far, though I've yet to test with large quantities of objects.
--
Hello!
I'm new to django so far I like it, but I've now reached my first big
hurdle.
I'm building a page which has a cms in the root, which shows the main
menu, and submenu of the site,
but then I have a blog app and a gallery app which are coupled to a
special section of the site, I still want
Thanks I'll give the suggestions a try.
On Apr 14, 9:55 am, Karen Tracey wrote:
> On Tue, Apr 14, 2009 at 12:35 PM, Alex Gaynor wrote:
> > On Tue, Apr 14, 2009 at 12:25 PM, Jesse wrote:
>
> >> The error is 'ascii' codec can't encode character u'\xb0' in position
> >> 98: ordinal not in range(1
On Tue, Apr 14, 2009 at 4:04 PM, Vincent Foley wrote:
>
> Hello,
>
> I want to be able to add files inside a model to test that model.
> However, I'm unable to find in the documentation any mention on how to
> do so. I asked on IRC and somebody suggested the following:
>
> from django.core.files
Hello,
I want to be able to add files inside a model to test that model.
However, I'm unable to find in the documentation any mention on how to
do so. I asked on IRC and somebody suggested the following:
from django.core.files import File
from myproject.myapp.models import MyModel
fd = open('/p
Thanks for the reply Alex,
I am not really sure how i am supposed to override the default field
type.
The link talks about MyDateFormField() but is this a method or what ?
Could you provide an example of how i could put the form field on the
form instead of the model ?
Thanks alot.
On Apr 6,
Ok your idea worked just fine, but i keep coming up with new
questions :)
The result of it was that when i opened poll i got poll with name
So i wrote something (i dont know how its called - model instance?
model manager?) to retrieve the actual value of translation and my
poll model looks like
And... Never mind. Not sure how I missed it before, but it appears
select_related() gets me what I want. I think...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send em
Hi All,
I'm trying to get django-grappelli running, but after following
the installation instructions, I end up with a 404 and the following:
Using the URLconf defined in bfact.urls, Django tried these URL
patterns, in this order:
1. ^admin/(.*)
2. ^grappelli/ ^bookmark/add/$
3. ^grapp
Alex Gaynor wrote:
> On Tue, Apr 14, 2009 at 1:21 PM, ab3...@gmail.com wrote:
>
>> I'm new to Django. I'm trying to figure out if there is a well
>> established design paradigm to collect statistics on hyperlink usage.
>>
>> When a visitor follows a link to an external website, I
>> would like
On Tue, Apr 14, 2009 at 1:21 PM, ab3...@gmail.com wrote:
>
> I'm new to Django. I'm trying to figure out if there is a well
> established design paradigm to collect statistics on hyperlink usage.
>
> When a visitor follows a link to an external website, I
> would like to insert the following inf
I'm new to Django. I'm trying to figure out if there is a well
established design paradigm to collect statistics on hyperlink usage.
When a visitor follows a link to an external website, I
would like to insert the following information into a mysql database
table:
- the datetime of the click
Hi,
First let me say I've looked at documentation, but feel a bit dyslexic
when it comes to this stuff.
The situation: I have three tables: a service provider table with
city, state abbreviation and country abbreviation (among other other
info), a states table with state names, abbreviations, an
On Tue, Apr 14, 2009 at 12:59 PM, AliasXNeo wrote:
>
> I recently downloaded the latest Official release of Django for
> installation on my Windows XP OS. After copying the appropriate files
> over to the site-packages folder in the python installation, I
> attempted to create a test project to i
I recently downloaded the latest Official release of Django for
installation on my Windows XP OS. After copying the appropriate files
over to the site-packages folder in the python installation, I
attempted to create a test project to insure correct installation by
invoking the command: django-adm
On Tue, Apr 14, 2009 at 12:35 PM, Alex Gaynor wrote:
> On Tue, Apr 14, 2009 at 12:25 PM, Jesse wrote:
>
>>
>> The error is 'ascii' codec can't encode character u'\xb0' in position
>> 98: ordinal not in range(128) and it occurs when a temperature degree
>> such as 35°C
>> is in the text.
>>
>> I'
On Tue, Apr 14, 2009 at 12:25 PM, Jesse wrote:
>
> The error is 'ascii' codec can't encode character u'\xb0' in position
> 98: ordinal not in range(128) and it occurs when a temperature degree
> such as 35°C
> is in the text.
>
> I'm using the following code in the view.py:
>
> response = HttpR
The error is 'ascii' codec can't encode character u'\xb0' in position
98: ordinal not in range(128) and it occurs when a temperature degree
such as 35°C
is in the text.
I'm using the following code in the view.py:
response = HttpResponse(mimetype='text/csv')
response['Content-Disposition'
On Tue, Apr 14, 2009 at 11:33 AM, Mitch Chapman wrote:
>
> Is it bad form in Django to add "transient" instance variables to
> model instances?
>
> I'm rendering a set of search results. Each result record is a User
> instance. I want to show whether or not each record is a friend of
> the user
Is it bad form in Django to add "transient" instance variables to
model instances?
I'm rendering a set of search results. Each result record is a User
instance. I want to show whether or not each record is a friend of
the user who is conducting the search.
Right now my view is annotating each
Alex,
Thanks
Ron
On Apr 14, 11:22 am, Alex Gaynor wrote:
> On Tue, Apr 14, 2009 at 11:19 AM, nixon66 wrote:
>
> > Alex,
>
> > Ok, I'm going to ram my head into a wall now. Seriously thanks.
>
> > On Apr 14, 11:03 am, Alex Gaynor wrote:
> > > On Tue, Apr 14, 2009 at 11:01 AM, nixon66 wrote:
On Tue, Apr 14, 2009 at 11:19 AM, nixon66 wrote:
>
> Alex,
>
> Ok, I'm going to ram my head into a wall now. Seriously thanks.
>
> On Apr 14, 11:03 am, Alex Gaynor wrote:
> > On Tue, Apr 14, 2009 at 11:01 AM, nixon66 wrote:
> >
> > > I have this model with an get_absolute_url method.
> >
> > >
Alex,
Ok, I'm going to ram my head into a wall now. Seriously thanks.
On Apr 14, 11:03 am, Alex Gaynor wrote:
> On Tue, Apr 14, 2009 at 11:01 AM, nixon66 wrote:
>
> > I have this model with an get_absolute_url method.
>
> > class Country(models.Model):
> > country_cd = models.CharField(max_
On Tue, Apr 14, 2009 at 11:01 AM, nixon66 wrote:
>
>
> I have this model with an get_absolute_url method.
>
>
>
> class Country(models.Model):
>country_cd = models.CharField(max_length=2, primary_key=True)
>country = models.CharField(max_length=80, blank=True)
>slug = models.CharField
I have this model with an get_absolute_url method.
class Country(models.Model):
country_cd = models.CharField(max_length=2, primary_key=True)
country = models.CharField(max_length=80, blank=True)
slug = models.CharField(max_length=80, blank=True)
class Meta:
db_table =
Thanks a lot,
This works fine and is much nicer
I have been floundering around for what seems like weeks trying to
figure out how you're supposed to this
snorkel
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Dja
On Tue, Apr 14, 2009 at 10:50 AM, veearrsix wrote:
>
> Thanks for the help so far guys, I've used that recipe suggested by
> Malcolm, where by I pass a number of querysets into the method. It
> works as expected I guess, BUT, I would like to be able to sort by the
> datetime field from each query
Thanks for the help so far guys, I've used that recipe suggested by
Malcolm, where by I pass a number of querysets into the method. It
works as expected I guess, BUT, I would like to be able to sort by the
datetime field from each queryset, however the fieldnames for each of
the date time fields f
On Tue, Apr 14, 2009 at 9:03 AM, snorkel wrote:
>
> I am new to Django and this is driving me crazy... excuse my
> inexperience
> anyway
>
> I have 3 classes
> class Job():
> . some stuff .
>
> class Sequence()
>... more stuff ...
>job=models.ForeignKey('Job')
>element_typ
I am new to Django and this is driving me crazy... excuse my
inexperience
anyway
I have 3 classes
class Job():
. some stuff .
class Sequence()
... more stuff ...
job=models.ForeignKey('Job')
element_type=models.ManyToMany('ElementType')
class ElementType()
... some c
Howdy Daniel!
> I suspect you have not set the subclass's metaclass to
> models.SubfieldBase - see
> here:http://docs.djangoproject.com/en/dev/howto/custom-model-fields/#the-s...
>
> You need to do this to get any of the overridden methods to be called.
Thanks for the update, but that isn't the
Thanks!
On Apr 14, 3:52 pm, matehat wrote:
> Hi Alan,
>
> > Is this really meant to work so that you create translations in a file
> > manually and then create objects with names/descriptions that have
> > translation in the file or is there a more automatic way to do this?
>
> currently, Django
On Apr 14, 3:45 pm, matehat wrote:
> Sorry about the last post (was a little tired from a sleepless night
> of solving problems in physics ...). I think you can solve the issue
> by putting "return unicode(self.name)" instead of "return self.name"
> in all of the __unicode__ method of your mode
Hi Alan,
> Is this really meant to work so that you create translations in a file
> manually and then create objects with names/descriptions that have
> translation in the file or is there a more automatic way to do this?
currently, Django's i18n system is made to translate static strings in
a p
Hi Alan,
> Is this really meant to work so that you create translations in a file
> manually and then create objects with names/descriptions that have
> translation in the file or is there a more automatic way to do this?
currently, Django's i18n system is made to translate static strings in
a p
Sorry about the last post (was a little tired from a sleepless night
of solving problems in physics ...). I think you can solve the issue
by putting "return unicode(self.name)" instead of "return self.name"
in all of the __unicode__ method of your models. The things is that
you must make sure to r
Hello Django-Users,
The software development team at the Campbell-Lange Workshop (CLW) has
been using Django since 0.95. From the beginning we have been very
impressed with the URL dispatcher, form validation and templating
language. We have, however, found that the Django ORM occasionally
doesn'
This has gone well so far -- I ended up pointing my new comment app
models at the old database tables using the db_table meta option, and
then manually altering the table definitions, that kept things a lot
simpler.
I'm getting an AlreadyRegistered exception for a custom CommentsAdmin
definition
Thank you Karen, that's exactly what I need "To give each Form its own
namespace".
On Apr 13, 10:57 pm, Karen Tracey wrote:
> On Mon, Apr 13, 2009 at 2:11 PM, Bastien wrote:
> > ... So my question is how could the
> > view know which POST data belongs to which form or how can I change
> > the f
Ok remain two minor issue:
1) http://code.djangoproject.com/ticket/5494
2) ugettext_lazy are not json serializable so when I use transaltion
to populate ajax widgets I have to explicitily convert to unicode, but
this is really a minor issue
any eta for 1)? will be in django 1.1, still the same i
73 matches
Mail list logo