Yes, that would be the relationship and that was actually the first
thing I tried. The template gets passed an "array" of "entry" objects.
Within the template, I loop through them printing the headline, portion
of the body, and the created date. With Author's as a foreign key, I
assumed you could
Hi Ray,
You can set null=True on your DateField to allow null values in the
database. Foe example:
thedate = models.DateField(null=True, blank=True)
Cheers,
Bryan
On 8/13/06, Rares Vernica <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have a DateField with blank=True and after I complete and sub
On 8/14/06, Rares Vernica <[EMAIL PROTECTED]> wrote:
> I have a DateField with blank=True and after I complete and submit the
> form I get a Django error saying that DateField cannot be null?
As the model documentation points out, you must also set 'null=True'
on the field to have the database ac
Hi,
I have a DateField with blank=True and after I complete and submit the
form I get a Django error saying that DateField cannot be null?
How can I set the DateField so that it can be empty, and eventually null
in the DB?
I don't like the idea of manually going and changing the DB schema.
T
On 8/13/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Currently, in the admin interface, the size of a text field is
> defaulted at 50 for char vars and 10 for integer types.
>
> I would like to change this in the model and have it propegate through
> to the admin interface. Is there a way t
Hi
Currently, in the admin interface, the size of a text field is
defaulted at 50 for char vars and 10 for integer types.
I would like to change this in the model and have it propegate through
to the admin interface. Is there a way to do this easily?
Thanks in advanced.
--~--~-~--~--
On 8/13/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
>
> On 7/31/06, Todd O'Bryan <[EMAIL PROTECTED]> wrote:
> > I would actually be okay writing the function in the view code, if we
> > had a map filter.
> >
> > {{ s.teachers|map:list_func|join:";" }}
> >
> > Then add the following to the conte
Hey all,
I am trying to create a series of radio buttons where you can select
one radio button, and next to the selection will be a Text Field, drop
box, or maybe both, for additional information related/ needed for the
current radio selection.
like so:
Radio | Label
(o) show all rows
() Limit
Ah, I get it now. You're right - context isn't available to filters.
My more simplistic suggestion of {{
s.teachers|loop:"userinfo.informal_name"|join:"; " }} should still
work however.
--~--~-~--~~~---~--~~
You received this message because you are subscribed t
On 8/13/06, Apple <[EMAIL PROTECTED]> wrote:
>
> Hi has anyone tried running Django 0.95 on Dreamhost? I only tried to
> setup a simple project following the dreamhost's wiki. I am getting a
> string index out of range exception on common.py:
I don't see anything obviously wrong, but I don't ha
On Sun, 2006-08-13 at 17:14 -0700, [EMAIL PROTECTED] wrote:
> I'm trying to get a queryset of all users in two particluar groups that
> *aren't* in a third particular group.
This same conversation is going on in another thread at the moment, so
let me explain the general case: any chained filter
On Sun, 2006-08-13 at 22:05 +, cyberco wrote:
> I may have cheered to early: what if I don't use 'import as', but
> 'site.app.models import *'? If I do 'reload(models)' the Django models
> are reloaded, and doing 'reload(site.app.models)' throws an exception
> saying 'site' does not exist...
On Sun, 2006-08-13 at 09:13 -0700, Karen Tracey wrote:
> I'm working through the tutorial, applying its lessons to my own
> database. So for example where it covers writing a detail view for the
> Poll model, I think really I'm going to want a detail view for each of
> the models in my database,
On Sun, 2006-08-13 at 17:10 +, 一首诗 wrote:
> Actually, it's not the problem of encoding, I think.
Then you need to provide a more concrete example. Show a small example
of the input string (UTF-8 encoded) and the HTTP headers and bytes you
get in the response so that we can help you diagnose i
On Sun, 2006-08-13 at 21:23 +, cyberco wrote:
> Ai, really? I'm a n00b when it comes to SQL and the SQL statement of a
> chained filter (as listed by connection.queries) is about 8 (!) lines
> of SQL abacadabra.
There's a worked example here:
http://www.pointy-stick.com/blog/2006/06/14/custom
I'm trying to get a queryset of all users in two particluar groups that
*aren't* in a third particular group.
Here's what I tried*:
User.objects.filter(groups__in=(author_group,
guide_group)).exclude(groups=staff_group)
This is the SQL produced:
SELECT * FROM auth_user
LEFT OUTER JOIN auth_user_
On 8/13/06, Bryan Chow <[EMAIL PROTECTED]> wrote:
>
> Optional parameter for JPEG quality added :)
>
> http://www.verdjn.com/wiki/PhotoField
Beautiful, now it's worth my time ;-)
Seriously, thanks a lot.
Jay P.
--~--~-~--~~~---~--~~
You received this message beca
Optional parameter for JPEG quality added :)
http://www.verdjn.com/wiki/PhotoField
On 8/12/06, Bryan Chow <[EMAIL PROTECTED]> wrote:
> Hi Jay,
>
> Here's a custom field that automatically resizes the uploaded image
> using PIL. You should be able to modify save_file() to adjust the JPEG
> compr
On Aug 13, 2006, at 6:01 PM, SmileyChris wrote:
>
>
> Adrian Holovaty wrote:
>> On 7/31/06, Todd O'Bryan <[EMAIL PROTECTED]> wrote:
>>> I would actually be okay writing the function in the view code,
>>> if we
>>> had a map filter.
>>>
>>> {{ s.teachers|map:list_func|join:";" }}
>>>
>>> Then a
I may have cheered to early: what if I don't use 'import as', but
'site.app.models import *'? If I do 'reload(models)' the Django models
are reloaded, and doing 'reload(site.app.models)' throws an exception
saying 'site' does not exist...
--~--~-~--~~~---~--~~
You
Adrian Holovaty wrote:
> On 7/31/06, Todd O'Bryan <[EMAIL PROTECTED]> wrote:
> > I would actually be okay writing the function in the view code, if we
> > had a map filter.
> >
> > {{ s.teachers|map:list_func|join:";" }}
> >
> > Then add the following to the context:
> >
> > "list_func": lambda(x
Ah! Thanks for the tip! I totally forgot about Python's reload method
because my mind was on a 'db-track' all the time.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, se
Hi has anyone tried running Django 0.95 on Dreamhost? I only tried to
setup a simple project following the dreamhost's wiki. I am getting a
string index out of range exception on common.py:
-- error messages --
Module reload works as expected
>>> import uatki.blogdata.models as m
>>> e = m.Blog.objects.get(id=1)
>>> e.test()
Traceback (most recent call last):
File "", line 1, in ?
AttributeError: 'Blog' object has no attribute 'test'
[ changed the model to have a test method ]
>>> reload(m)
>>> e =
René Pijlman wrote:
> Self-learning relevance ranking of individual posts. Bayesian, or
> otherwise. Information overload is problem #1 for weblogs/rss.
>
I agree - it would be very nice to have something like that, but I am
not sure if a was thinking about tnat kind of features :)
Anyway, if so
Ai, really? I'm a n00b when it comes to SQL and the SQL statement of a
chained filter (as listed by connection.queries) is about 8 (!) lines
of SQL abacadabra. Sure there is no other way to solve this issue? Will
the bug be fixed in the next release?
--~--~-~--~~~---~
mediumgrade ÐÉÛÅÔ:
> I have a simple blog app that I am working on. In this app, I have
> ojects for each entry as well as the author who wrote it. I wrote a
> simple view which displays a list of all entrys made, but I want that
> list to include the name of the author. Since the author's name i
Hi David,
Not sure what you mean by "parent object". If author is a ForeignKey
in your blog_entry model, and author has a field called full_name,
then you should be able to use {{ blog_entry.author.full_name }}.
Otherwise, you could just place author in the context that's passed to
your template
Howdy --
edit_inline seems to be doing something funky when I use it through
update_object generic view. I've got a model that looks something like
this:
class StationEvent(models.Model):
date = models.DateTimeField()
description = models.CharField(maxlength = 150)
class Admin:
Using the ipython started from manage.py I noticed that changes to the
db are not automatically picked up (added values for instance). I have
to restart the shell to pick them up, which also means I have to
reimport everything and I loose my shell history.
Is there a way to pick up the changes w
I have a simple blog app that I am working on. In this app, I have
ojects for each entry as well as the author who wrote it. I wrote a
simple view which displays a list of all entrys made, but I want that
list to include the name of the author. Since the author's name is not
part of the entry, ho
Hi,
has anybody seen the following traceback:
Traceback (most recent call last):
File
"/usr/local/lib/python2.4/site-packages/django/core/servers/basehttp.py", line
272, in run
self.result = application(self.environ, self.start_response)
File
"/usr/local/lib/python2.4/site-packages/
On 8/12/06, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote:
>
>
> On 12-Aug-06, at 3:45 PM, Maciej Bliziñski wrote:
>
> >> committee = models.ForeignKey( 'Committee' )
> >
> > You shouldn't use the string argument (I mean, I never do that). And
> > what if one person is in two committees?
>
> sinc
At 12:54 PM 8/13/2006, you wrote:
>You might want to look at generic views. When you write "my views.py
>is very simple", that's a cue that a generic view is a good idea.
Ah, there it is right in the next section of the tutorial -- in fact
from a quick glance they seem to use the exact same nami
On Aug 13, 2006, at 9:57 AM, Jon Atkinson wrote:
> I've noticed that my application changes case sensitivity in queries
> depending on whether it is using MySQL or sqlite as the database
> backend
>
> ...
> If there a recommended way to deal with this? I want to avoid forcing
> a certain scheme on
Actually, it's not the problem of encoding, I think.
For example, if s is a string, the render() method should treate {{ s
}} in the way print() does. But now what I see on the page is
something like you see in a interactive python console.
>>> print s
XXX #Some text
>>> s
'\x0f\xde' #thi
Hi,
I've noticed that my application changes case sensitivity in queries
depending on whether it is using MySQL or sqlite as the database
backend
The simplest test case is as follows:
My database contains a user record, in which the username is = "jon"
My urls.py is simply as follows:
(r'^/?(
On Aug 13, 2006, at 9:13 AM, Karen Tracey wrote:
>
> I'm working through the tutorial, applying its lessons to my own
> database. So for example where it covers writing a detail view for
> the
> Poll model, I think really I'm going to want a detail view for each of
> the models in my database,
I'm working through the tutorial, applying its lessons to my own
database. So for example where it covers writing a detail view for the
Poll model, I think really I'm going to want a detail view for each of
the models in my database, and they're all going to be the same except
for the name of the
For a more complete blog application I suggest checking limodou's
woodlog
http://www.djangocn.org/help/#does-woodlog-is-open-source
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to t
It's an odd error. I requested that my host install it for me, and they
did. So the error went a way, but it comes back later. Then it goes
away again. Just refresh the page to get the IndexError.
--~--~-~--~~~---~--~~
You received this message because you are sub
Say it's GPL :)
I've used "metrohacker" template which can be found on oswd.org
--~--~-~--~~~---~--~~
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.co
Thank you both for the replies.
Riklaunim: Have you chosen a license for miniblog? Is it okay for me
to make some changes and re-release it?
--Jon
> On 13/08/06, David Larlet <[EMAIL PROTECTED]> wrote:
> >
> > 2006/8/13, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> > >
> > > Hi,
> > >
> > > I've be
Op do, 10-08-2006 te 09:15 +, schreef uselpa:
> Unless you check that the IP from which the request is coming is the
> same IP from which the initial request came.
Which breaks if the user is using a pool of proxy servers...
--
Jan Claeys
--~--~-~--~~~---~--~
On Sun, 2006-08-13 at 12:31 +, cyberco wrote:
> Having:
> ___
>
> class Pizza(models.Model):
> name = models.TextField()
> toppings = models.ManyToManyField(Topping)
>
> class Topping(models.Model):
> name = models.TextField()
> ___
>
> ...and for instanc
On Sun, 2006-08-13 at 12:33 +, 一首诗 wrote:
> When use something like this in a template
>
> {{ message }} X
>
> and render it in this way:
>
> c = Context({'message':s}) # s is an string encoded in utf-8
> Response(template.render(c))
>
> What I got is:
>
> '\x??\x??..\x??\x?
On 12 Aug 2006, at 06:58, Jay Parlar wrote:
And just to note, I tried doing compression with PIL in my model's
save() method. The problem is that files aren't written to disk until
*after* the save() method is complete.
You can look at http://trac.studioquattro.biz/djangoutils/wiki/
Thumbnai
When use something like this in a template
{{ message }} X
and render it in this way:
c = Context({'message':s}) # s is an string encoded in utf-8
Response(template.render(c))
What I got is:
'\x??\x??..\x??\x??'
What's the problem??
--~--~-~--~~~-
Having:
___
class Pizza(models.Model):
name = models.TextField()
toppings = models.ManyToManyField(Topping)
class Topping(models.Model):
name = models.TextField()
___
...and for instance having toppings 'tomato' and 'cheese', how do I
select all pizza's with
2006/8/13, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
>
> Hi,
>
> I've been playing with Django for a few weeks, and I've been looking
> for some blog software which I can use for my blog and also play with
> extending to help me learn a little more about Django. I searched the
> Django wiki, and does
Wiktor Grębla napisał(a):
> I was wondering, is there any way to set a cookie valid for the
> current session only, without setting global
> SESSION_EXPIRE_AT_BROWSER_CLOSE?
I should RTFM more (BTW, thanks for the great documentation):
#v+
from django.contrib.sessions.models import Session
re
there is on the mailing list my "miniblog"
http://groups.google.com/group/django-users/browse_thread/thread/d8ae2e3dc533e214/75d2281e490f1d83?lnk=gst&q=miniblog&rnum=1#75d2281e490f1d83
It isn't feature compleate but it has news + comments ;)
--~--~-~--~~~---~--~~
2006/8/13, jws <[EMAIL PROTECTED]>:
>
[snip]
>
> Given the recent security problems with Rails, it's clear that the RoR
> community is not infallible. Why have they then received so much praise
> and admiration? It's not the technology, it's the narrative.
37signals is the best Buzz2.0 company yo
On 13/08/2006, at 7:38 PM, René Pijlman wrote:a wrote: i m developing a feedreader/web desktop using djangoi m looking for feature suggesstions Self-learning relevance ranking of individual posts. Bayesian, or otherwise. Information overload is problem #1 for weblogs/rss.i've started doing somethin
Hi,
I've been playing with Django for a few weeks, and I've been looking
for some blog software which I can use for my blog and also play with
extending to help me learn a little more about Django. I searched the
Django wiki, and does as many Google queries as I can think of, but I
can't find any
a wrote:
> i m developing a feedreader/web desktop using django
>
> i m looking for feature suggesstions
Self-learning relevance ranking of individual posts. Bayesian, or
otherwise. Information overload is problem #1 for weblogs/rss.
--
René
http://www.applinet.nl
--~--~-~--~~---
On Sun, 2006-08-13 at 05:59 +, a wrote:
> http://localhost/todo
>
> i want to rewrite this automatically as
>
> http://localhost/todo/
>
> is there a easy way to do this
See
http://www.djangoproject.com/documentation/middleware/#django-middleware-common-commonmiddleware
Regards,
Malcolm
And in a more generic sense the APPEND_SLASH setting of the
CommonMiddleware may be what you are looking for.
http://www.djangoproject.com/documentation/middleware/#django-
middleware-common-commonmiddleware
On 13/08/2006, at 5:17 PM, Ivan Sagalaev wrote:
>
> a wrote:
>> http://localhost/tod
dear django users
i m developing a feedreader/web desktop using django
i m looking for feature suggesstions
thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send
keep a list of read and unread items
hi guys
i m building an rss reader and i want you suggestions for datastructure
for keeping read and unread list for each use
i m assuming it will be very sparse
thanks
--~--~-~--~~~---~--~~
You received this message because y
First I should thank Ivan for your help. But I think Malcolm figured
out what I really want.
Maybe django should catch Exception when calling a model's save /
delete method.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Goog
a wrote:
> http://localhost/todo
>
> i want to rewrite this automatically as
>
> http://localhost/todo/
>
> is there a easy way to do this
Yep.
http://www.djangoproject.com/documentation/generic_views/#django-views-generic-simple-redirect-to
--~--~-~--~~~---~--~--
GinTon wrote:
> To convert the names to lower or UPPER case in the templates is used {{
> foo.name|lower }} and {{ foo.name|upper }}
>
> But is possible convert characters non-ASCII? Is there any of use
> foo.name.decode('utf-8').upper() in the templates?
There is a patch fixing string filters
63 matches
Mail list logo