djan wrote:
> Hello,
>
> I'm following along with djangobook.com, and I have a problem in
> chapter 5 that I cannot resolve. I am using OpenSuSE-11.0, Python
> 2.5.2, sqlite3-3.5.7-17.1 (and incidentally, this same error occurs
> with MySQL).
>
>
> File "$HOME/djcode/mysite/books/models.py",
I see, so I cannot use {% url %} in this case. Thanks!
On Dec 1, 3:53 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sun, 2008-11-30 at 23:42 -0800, Roy wrote:
> > Hi,
>
> > I have the following in one of my templates:
> > Flag
>
> > But I'm getting a TemplateSyntaxError:
>
> > Caught a
I used DEBUG_PROPAGATE_EXCEPTIONS variable and thanks to this found a bug
in my application.
On Sunday 30 of November 2008 12:22:25 Grzegorz Szymański wrote:
> Thank you for the tip. It works well.
>
> I have problem with processing flat pages.
> When debug is switched to True the error appear in
Chris wrote:
> I have been looking into using OpenId and I discovered that there are
> to 2 django libraries that handle this: django_openId and
> django_authopenid. Any opinions on the two? Not sure which one I
> should go with.
>
I depends on what you want to do, be a relying party, i.e. the
Thanks , David Zhou , I will find some information for decorator
And also , I will surf for middleware .
Thank you very much , Malcolm.
On Dec 1, 3:55 pm, "David Zhou" <[EMAIL PROTECTED]> wrote:
> On Mon, Dec 1, 2008 at 2:23 AM, David Shieh <[EMAIL PROTECTED]> wrote:
> > I dont' know whether thi
write max_length instead of maxlength
On Dec 1, 1:01 pm, Roland van Laar <[EMAIL PROTECTED]> wrote:
> djan wrote:
> > Hello,
>
> > I'm following along with djangobook.com, and I have a problem in
> > chapter 5 that I cannot resolve. I am using OpenSuSE-11.0, Python
> > 2.5.2, sqlite3-3.5.7-17.1 (
Hi All,
I need to pass the "totalItems" value as argument to Paginator(disp,
totalItems) function
if It is POST.
But it throws the error
"coercing to Unicode: need string or buffer, int found"
How do I rectify it.
Thanks
def detail(request, gallery_slug, page=0):
if request.m
As you know time data type in mysql allow to be used more than 24
hours, but when there is a more than 24 hours record in the table
such as 72:00:00, and then query the table with Django ORM, it will
report 'ValueError hour must be in 0..23'.
I'm porting a old program that record rum times of th
We have multiple django sites using the same database, and have different
admins for each of the django sites who's access we would like to limit on a
per site basis.
I was wondering if anyone had an experience or advice about how to do this.
I think it would be possible to accomplish by creating
Hi All,
I've recently just updated my eclipse to Ganymede and Pydev to 1.3.24.
And ever since then, I've been unable to debug any of my Django
Projects.
I've gone through the process of setting up a debug launch
configuration with the "runserver --noreload" argument and yet, after
adding breakpo
hi
i am new to django and evaluating if i could use it for one new
application.
I did some mal app with django last days and i am impressed :) however
i need some infomation from expirienced developers.
1) Is it possible to connect to more than one database, and beeing
able to use the model-fun
Hi
I'm new here - in Django and python, more of a Php and wordpress
myself.
anyway - here is my question, hope someone knows the answer.
I have 2 classes - components and customers. every component has a
field that says whos the related customer. like this:
class Component(models.Model):
#
Can we use XML files as templates instead of HTML?
--~--~-~--~~~---~--~~
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 grou
On Dec 1, 2008, at 7:51 PM, Vicky wrote:
>
> Can we use XML files as templates instead of HTML?
Anything that comes as a plain text file can be produced by a
template: HTML, XML, plain text, email, iCAL, source code...
Yours,
Eric
>
> >
--~--~-~--~~~---~--~---
The Agregator wrote:
[...]
> CustomerID = models.ForeignKey(Customer)
> The problem is that I want it to say something else, like "Customer
> Name"
Try with
CustomerID = models.ForeignKey(Customer, verbose_name="Customer Name")
HTH,
--
Fabio Natali
--~--~-~--~~-
Worked like a charm
Thanks
On Mon, Dec 1, 2008 at 1:50 PM, Fabio Natali <[EMAIL PROTECTED]>wrote:
>
> The Agregator wrote:
> [...]
> > CustomerID = models.ForeignKey(Customer)
>
> > The problem is that I want it to say something else, like "Customer
> > Name"
>
> Try with
>
> Customer
Okay, perhaps someone could suggest possible techniques for debugging
file uploads?
On Nov 29, 4:10 pm, Adda Badda <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I'm having difficulties getting image uploads to work on my
> mediatemple gs hosting as part of an admin system. Occasionally one
> file will
I have a class called customers which generates in the admin some kind of a
"phone book".
I want to allow the user to print all the records using a print button.
I guess I can do it with a custom CSS file but I hope there is a simple way.
Is there?
--
Nitzan Brumer
Http://n2b.org
--~--~---
David,
+1 for decorator.
That let you use it or not in each view.
On Dec 1, 9:30 am, David Shieh <[EMAIL PROTECTED]> wrote:
> Thanks , David Zhou , I will find some information for decorator
> And also , I will surf for middleware .
>
> Thank you very much , Malcolm.
>
> On Dec 1, 3:55 pm, "Dav
hi all,
I'm new to django and python. I have a small question about
urlpatterns and it may sound silly to some so please bear with me.
I noticed a bit of difference between a urlpatterns callback function
of an admin site from that of an app. The callback function for an app
requires single quot
Hello,
I have this in my models.py :
class Device(models.Model):
name = models.CharField(max_length=30)
class DeviceProperty(models.Model):
key = models.CharField(max_length=30)
value = models.CharField(max_length=80)
device = models.ForeignKey(Device)
In my vie
On Dec 1, 12:15 pm, Marco <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have this in my models.py :
>
> class Device(models.Model):
> name = models.CharField(max_length=30)
>
> class DeviceProperty(models.Model):
> key = models.CharField(max_length=30)
> value = models.CharFiel
On Mon, Dec 1, 2008 at 4:08 AM, please smile <[EMAIL PROTECTED]>wrote:
> Hi All,
>
> I need to pass the "totalItems" value as argument to Paginator(disp,
> totalItems) function
>
> if It is POST.
>
> But it throws the error
>
> "coercing to Unicode: need string or buffer, int found"
>
>
> How do
On Mon, Dec 1, 2008 at 7:42 AM, Earl Lapus <[EMAIL PROTECTED]> wrote:
>
> hi all,
>
> I'm new to django and python. I have a small question about
> urlpatterns and it may sound silly to some so please bear with me.
>
> I noticed a bit of difference between a urlpatterns callback function
> of an a
We're looking for a great Django/Python developer to join our small
team at ajc.com.
Check out the job posting at Django Gigs [0] or at Craigslist[1].
Here are some of the benefits to working on our team:
* We're a small team -- but full of great people like Maura [2] and
Zellyn [3]
* Our pro
Hi everybody!
I'm having difficulties while trying to insert a zip-code field in one
of my models. I'd like to rely upon some italian local flavor stuff,
so to get some validation for free.
Here comes my models.py:
from django.contrib.localflavor.it import forms
class DittaDipendenti(models.Mo
Hello,
I have written some doctests for my custom template tags, but
`manage.py test my_app' doesn't seem to notice it. There is an
__init__.py file in the templatetags directory, but apparently that is
not sufficient.
Thanks in advance,
-- Richard
--~--~-~--~~~-
Another +1 for decorators. In fact, the example David S uses
authentication and logins as an example of what he wants to do and its
already handled as a decorator thus giving him a decent pattern to
follow. David S, I'd suggest you look up the @login_required
decorator and even look through the
> Thanks Justin, I was using MySQL and it looks like I do need Postgres to get
> the best gis support.
> Do people normally switch their DB backend entirely or do they start a new
> project for geo stuff and connect the main site to this as a separate
> backend? I can see the pros and cons of each
bit worrying that you consider the traceback to be 'gumph' but since
the error says specifically that the 'created' column cannot be null,
it sounds like your DB and model are out of sync.
as for the actual problem, you'll have to appreciate that creating a
'User' also creates a 'Person', who's a
On 1 déc, 14:20, Daniel Roseman <[EMAIL PROTECTED]> wrote:
> On Dec 1, 12:15 pm, Marco <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello,
>
> > I have this in my models.py :
>
> > class Device(models.Model):
> > name = models.CharField(max_length=30)
>
> > class DeviceProperty(models.Model):
> >
On Dec 1, 3:48 pm, ttw <[EMAIL PROTECTED]> wrote:
> bit worrying that you consider the traceback to be 'gumph' ...
Gumph in the sense that it didn't seem awfully relevant in this case,
as the exception was reasonably self-explanatory. I'm very grateful
for Python's stack trace in other circumstan
Thank you all! This did the trick, and I'm sure it will help be avoid
future problems.
On Dec 1, 9:57 am, Praveen <[EMAIL PROTECTED]> wrote:
> write max_length instead of maxlength
>
> On Dec 1, 1:01 pm, Roland van Laar <[EMAIL PROTECTED]> wrote:
>
> > djan wrote:
> > > Hello,
>
> > > I'm followi
Hi,
I am trying to integrate a Django app with an in-house developed
webapp. The biggest hurdle is to consolidate the two sets of users
data and session mechanism. I was wondering if it is easy in Django to
customize the authentication logic and session logic? If so, how would
I go about it?
I d
Have you read this -
http://docs.djangoproject.com/en/dev/topics/auth/#other-authentication-sources?
On Mon, Dec 1, 2008 at 19:02, Devye <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I am trying to integrate a Django app with an in-house developed
> webapp. The biggest hurdle is to consolidate the two
On 01.12-07:59, Fergus wrote:
[ ... ]
> > bit worrying that you consider the traceback to be 'gumph' ...
>
> Gumph in the sense that it didn't seem awfully relevant in this case,
> as the exception was reasonably self-explanatory. I'm very grateful
> for Python's stack trace in other circumstance
Daniel Roseman suggests a very simple and easy to implement solution.
Malcolm Tredinnick explained the usage of request.POST and
request.raw_post_data. I think I would like to keep it pure and go
towards implementing django views that will access and process
request.raw_post_data. The AIR app will
On Mon, Dec 1, 2008 at 7:33 AM, Nitzan Brumer <[EMAIL PROTECTED]> wrote:
> I have a class called customers which generates in the admin some kind of a
> "phone book".
> I want to allow the user to print all the records using a print button.
>
> I guess I can do it with a custom CSS file but I hope
In the inline model option I have overriden the inline form with a
custom form where I only added a choices widget, now the validation
has a wrong behaviour...more precisely if I have set extra property to
2 in inline model options, when I click "Save" django try to validate
even the two empty ex
> I think you really need to explain what the real problem is that you're
> trying to solve, because you're asking a question that is too specific.
Fair enough. It's been several days, so I had to dredge a bit to
remember :-)
I think the basic issue is that there are some fields in the object
t
I have just start to read the on-line Django book.I don't know whether
this is the best place to report typos, or whether typos are expected
to be reported at all. But here is one, at
http://www.djangobook.com/en/1.0/chapter03/
in the small selection of the regular expression table, the followi
Is there a way to tell django to use a specific function when
selecting data from a model?
The sql is relatively simple, but I don't know how to convert that to
model syntax.
Here's the issue: a table I'm working with stores ip addresses as a
10 digit integer. To get the ip address out of that
Hello,
I'm new to Django and have some problems on how to create the models.
What I want to do is something similar to a spreadsheet, but with more
than one data field per intersection.
Basically like this: (http://dpaste.com/hold/95128/)
Items/Members: Person_A | Person_B | Person_C
Item_1: x
Hi,
The following code fails on windows, and works just fine on my unix
box. To fix the problem in windows, I must replace('%', '%%') so its
internal string formatting doesn't fail on me. Should I file this bug
for psycopg2?
from django.db import connection
cursor=connection.cursor()
cursor.exec
On Dec 1, 11:03 am, "K*K" <[EMAIL PROTECTED]> wrote:
> As you know time data type in mysql allow to be used more than 24
> hours, but when there is a more than 24 hours record in the table
> such as 72:00:00, and then query the table with Django ORM, it will
> report 'ValueError hour must be in 0
On Dec 1, 6:48 pm, sned <[EMAIL PROTECTED]> wrote:
> Is there a way to tell django to use a specific function when
> selecting data from a model?
>
> The sql is relatively simple, but I don't know how to convert that to
> model syntax.
>
> Here's the issue: a table I'm working with stores ip addr
On Dec 1, 12:48 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sun, 2008-11-30 at 01:15 -0800, Daniel Roseman wrote:
>
> [...]
>
> > No doubt someone will correct me if I'm wrong, but I don't think there
> > *is* any other way of receiving a file via POST except via a form.
>
> You gave an
Another one: in the file
http://new-media.djangobook.com/content/en/1.0/chapter03/404.png
there listed ^/now$, but the book used ^/time$ instead.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
On Mon, Dec 1, 2008 at 3:05 PM, coldlight <[EMAIL PROTECTED]> wrote:
> Another one: in the file
Please don't do this; this is not the errata mailing list for "The
Definitive Guide to Django", it is the mailing list for discussion of
and by users of Django, and every time you post a message here y
> I think the basic issue is that there are some fields in the object
> that I'd like to display but not have editable, and it's not at all
> clear to me how to make that happen in the form processor. The values
> are dynamic, so they can't be in the template.
I often have this need so I created
In the future, if you click "Switch to copy-and-paste-view" and then just
copy and paste the contents of the traceback window, that is generally
easier to deal with. The traceback in your screenshot (which shows your
photosapp/views.py on line 104 calling paginator.page) doesn't match up with
the
I have an admin interface managing a few thousand records. Finding a
record requires heavy use of multiple list_filter selections. However,
once a user edits a record, the admin interface redirects to the root
admin URL and loses the filter state.
Is there an easy way to have the admin editor ret
i usually use svn:externals to add django, extensions, evolution and
other stuff to my projects but when i use makemessages in this
situation it generates locale for everything in current folder.
i've added some code to makemessages to enable excluding folders by
pattern to resolve my current situ
Thank you , guys ~
Your help are really good for me ~
On Dec 1, 11:23 pm, Jon Loyens <[EMAIL PROTECTED]> wrote:
> Another +1 for decorators. In fact, the example David S uses
> authentication and logins as an example of what he wants to do and its
> already handled as a decorator thus giving him
On Mon, 2008-12-01 at 07:14 -0800, Richard Szopa wrote:
> Hello,
>
> I have written some doctests for my custom template tags, but
> `manage.py test my_app' doesn't seem to notice it. There is an
> __init__.py file in the templatetags directory, but apparently that is
> not sufficient.
Are you
On Mon, Dec 1, 2008 at 10:06 PM, Karen Tracey <[EMAIL PROTECTED]> wrote:
>>
>> So, what is the difference between a callback function that is
>> enclosed on single quotes from that which is not?
>
> Nothing really:
>
> http://docs.djangoproject.com/en/dev/topics/http/urls/#passing-callable-objects
On Mon, 2008-12-01 at 14:54 -0800, cyberjack wrote:
> I have an admin interface managing a few thousand records. Finding a
> record requires heavy use of multiple list_filter selections. However,
> once a user edits a record, the admin interface redirects to the root
> admin URL and loses the fil
> I often have this need so I created a custom widget where I just set
> the readonly attribute on a TextInput widget:
>
> class LabelWidget(forms.TextInput):
Thanks but ... it seems that form.as_p doesn't understand how to
display this!
--~--~-~--~~~---~--~~
You
On Mon, 2008-12-01 at 16:00 -0800, Aljosa Mohorovic wrote:
> i usually use svn:externals to add django, extensions, evolution and
> other stuff to my projects but when i use makemessages in this
> situation it generates locale for everything in current folder.
> i've added some code to makemessag
On Dec 1, 5:44 pm, ChrisK <[EMAIL PROTECTED]> wrote:
> > I often have this need so I created a custom widget where I just set
> > the readonly attribute on a TextInput widget:
>
> > class LabelWidget(forms.TextInput):
>
> Thanks but ... it seems that form.as_p doesn't understand how to
> display
On Tue, 2008-12-02 at 09:31 +0800, Earl Lapus wrote:
> On Mon, Dec 1, 2008 at 10:06 PM, Karen Tracey <[EMAIL PROTECTED]> wrote:
> >>
> >> So, what is the difference between a callback function that is
> >> enclosed on single quotes from that which is not?
> >
> > Nothing really:
> >
> > http://do
I just witnessed the same behavior but haven't found the solution.
I'm using Ubuntu 8.04, Django 1.0, and Apache 2.2 with mod_python.
Abe
On Nov 15, 10:16 pm, Chuck22 <[EMAIL PROTECTED]> wrote:
> I did not use ErrorDocument directives in my httpd.config.
>
> Here is my Apache error log:
>
> [Su
On Tue, Dec 2, 2008 at 9:50 AM, Malcolm Tredinnick
<[EMAIL PROTECTED]> wrote:
>
>
> Yes, because admin.site.root isn't a function. It's a method on a class
> (which implies a difference in the way things are called).
>
> There's a bit of history going on here: in the early days, all the view
> fun
On Tue, 2008-12-02 at 10:07 +0800, Earl Lapus wrote:
> On Tue, Dec 2, 2008 at 9:50 AM, Malcolm Tredinnick
> <[EMAIL PROTECTED]> wrote:
> >
> >
> > Yes, because admin.site.root isn't a function. It's a method on a class
> > (which implies a difference in the way things are called).
> >
> > There's
I am building a website for a client and one of the pages they need is
an "about us" page which would just require 1 row of data. What is
the best way to handle this case where a model would only need 1 data
row?
--~--~-~--~~~---~--~~
You received this message beca
Take a look at django.contrib.flatpages.
On Dec 1, 9:36 pm, JGAllen23 <[EMAIL PROTECTED]> wrote:
> I am building a website for a client and one of the pages they need is
> an "about us" page which would just require 1 row of data. What is
> the best way to handle this case where a model would on
JGAllen23 wrote:
> I am building a website for a client and one of the pages they need is
> an "about us" page which would just require 1 row of data. What is
> the best way to handle this case where a model would only need 1 data
> row?
Override the save() method for that model. E.g.
class Feat
Hello.
I'm following along with djangobook.com and trying to make necessary
changes to port django to version 1.0. In Django's Site
Administration, chapter 6, I run into the error:
Exception Type: AlreadyRegistered
Exception Value:The model Book is already registered
Exception L
I don't understand what you are trying to do. Would you mind describing the
real life problem under it rather than how you try to solve it? It would
help understand what you need.
On Mon, Dec 1, 2008 at 2:10 PM, Stefan <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I'm new to Django and have some prob
Hi everyone.
When I get the data from a form, I'm processing it using request.POST
object, like this:
def process(request):
..var = request.POST['some_field_id']
I want to know if it's possible to get these values using a Form object,
like this:
def process(request):
..form = MyFormClass(reques
On Tue, 2008-12-02 at 02:30 -0200, Felipe Sodré Silva wrote:
> Hi everyone.
>
> When I get the data from a form, I'm processing it using request.POST
> object, like this:
>
> def process(request):
> ..var = request.POST['some_field_id']
>
> I want to know if it's possible to get these values u
ok day 7 and no luck. I really need help. I need to calculate the
difference between two dates, one pulled from the database, and one as
the NOW time. I'm hoping someone out there can help me and explain
the code to me. Yes I've read the docs but they don't make sense to
me thus the reason i'm
Thanks a lot Malcolm!
On Tue, Dec 2, 2008 at 2:46 AM, Malcolm Tredinnick <[EMAIL PROTECTED]
> wrote:
>
>
> On Tue, 2008-12-02 at 02:30 -0200, Felipe Sodré Silva wrote:
> > Hi everyone.
> >
> > When I get the data from a form, I'm processing it using request.POST
> > object, like this:
> >
> > def
On Tuesday 02 Dec 2008 10:22:21 am Bobby Roberts wrote:
> Can anyone tell me how to do this in python. I'm coming from an asp
> background where there is a built in function to determine this.
http://www.python.org/doc/2.5.2/lib/datetime-timedelta.html
--
regards
KG
http://lawgon.livejournal.c
> http://www.python.org/doc/2.5.2/lib/datetime-timedelta.html
yeah i said I don't understand this.
--~--~-~--~~~---~--~~
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 Mon, 2008-12-01 at 21:01 -0800, Bobby Roberts wrote:
> > http://www.python.org/doc/2.5.2/lib/datetime-timedelta.html
>
> yeah i said I don't understand this.
Well, you said you didn't understand "the docs", but you didn't mention
which documentation you had found. So Kenneth's answer isn
On Mon, 2008-12-01 at 20:52 -0800, Bobby Roberts wrote:
> ok day 7 and no luck. I really need help. I need to calculate the
> difference between two dates, one pulled from the database, and one as
> the NOW time. I'm hoping someone out there can help me and explain
> the code to me. Yes I've
On Tuesday 02 Dec 2008 10:31:11 am Bobby Roberts wrote:
> > http://www.python.org/doc/2.5.2/lib/datetime-timedelta.html
>
> yeah i said I don't understand this.
>>> x =datetime(2008,12,10,20)
>>> y=datetime(2008,12,10,23)
>>> z = y-x
>>> z
datetime.timedelta(0, 10800)
>>> print z
3:00:00
--
Hi
Just thought i would help out anyway even though this is solved.
d = datetime.datetime.now() - datetime.datetime.strptime
(dbValueHere,"%Y-%m-%d") # Does a date diff between today and the date
from the DB, change "%Y-%m-%d" to suit the format of you string.Also
make sure you set the dbValueHe
Thanks Karen Tracey,I typecast the posted value as integer. now Its works
fine.
On Tue, Dec 2, 2008 at 3:28 AM, Karen Tracey <[EMAIL PROTECTED]> wrote:
> In the future, if you click "Switch to copy-and-paste-view" and then just
> copy and paste the contents of the traceback window, that is gene
I tried the code below:
from django.template import loader, Context
def NewspaperSelect(request,u_id):
t=loader.get_template(r'C:\django\noddler\news\template.vxml')
c=Context({ 'topic':'news', 'content':pn })
return HttpResponse(t.render(c), mimetype='application/xml')
I
On Mon, 2008-12-01 at 22:20 -0800, Vicky wrote:
> I tried the code below:
>
> from django.template import loader, Context
>
> def NewspaperSelect(request,u_id):
> t=loader.get_template(r'C:\django\noddler\news\template.vxml')
> c=Context({ 'topic':'news', 'content':pn })
>
djan wrote:
> Hello.
>
> I'm following along with djangobook.com and trying to make necessary
> changes to port django to version 1.0. In Django's Site
> Administration, chapter 6, I run into the error:
>
>
> Exception Type: AlreadyRegistered
> Exception Value: The model Book is already
FWIW --
I got this working in CentOS5.2 by removing the default (yum installed)
version of apache, and compiling the latest version, 2.2.10.
While I was at it, I compiled the latest version of mod_python.
That was all it took, and now, no more segmentation violations.
Thanks,
Liam
Justin Bronn
Hi!
I'm new at Django, but I've been having relatively good luck. I've
recently hit a big of a wall using FileField. I have set up the paths
correctly enough that I can upload files to /my_site/uploads/photos,
but when I view the model containing the FileField in the admin
interface, it shows
85 matches
Mail list logo