Are you using 0.96 (you're using __str__ so I'd guess you are)?
Django's ugettext was introduced in the unicode merge that occured
after 0.96's release.
On Mar 10, 12:18 am, Tim Adler <[EMAIL PROTECTED]> wrote:
> Hey everybody,
>
> I'm trying to added mptt to my django project for managing a
Hi Jaime,
There's not a special Django only way to do this. I like the jQuery
tabs myself and I just override the admin templates within my own
project to get the effect in the admin. If you're not trying to extend
the admin, jQuery tabs are pretty easy to work with.
I tried to add a method to the Category class like this:
def get_feed_items(self):
"""
Returns the feed items for feeds in a category.
"""
return FeedItems.objects.filter(feed__category=self)
But I get a Name Error because
Hi,
Thanks for your replies - very helpful. I didn't realise that Django
appended underscores - I think that's the easiest solution for me to
use for the time being, at least until I get more comfortable with
using Django. My "organisational reasons" weren't particularly
important other than
I'm putting together a basic feed aggregator with the following
classes in my app's model: category, feed and feeditem. Each feed is
tied to a category (ForeignKey), and each feeditem is tied to a Feed
(ForeignKey).
Here is my model:
from django.db import models
class
Ok, I tested your tips and always came to the same point. I do not
have a .bash_profile file ! Is there any way to do it without ? I
think the shell on the profusehost.net servers look all the same. Any
way without the path initialization ? I really want to try django !
Regrades Snoop1990
Hi Malcolm, thanks for replying.
> Firstly, verify that your database table(s) are expecting data encoded
> in something that can handle Unicode data. Basically, this means, ensure
> they are not set up to store things with a latin1 encoding. In the my
> original reply in this thread, I pointed
I have an Alert model that has an AlertState field, and an
AlertStateChange model that has fields for Alert, AlertState and a
timestamp. I'd like to know the best way to create a report that has
the average time between two given states. Currently, I have a custom
save method in alert that create
On 10 мар, 11:28, Julian <[EMAIL PROTECTED]> wrote:
> hi,
>
> I've been writing a django-application and now I need the
> RequestContext for some new features. I don't want to add
> context_instance=RequestContext(request) to each render_to_response
> call manually in my views.py.
>
> How can I
On Mar 10, 3:28 am, Julian <[EMAIL PROTECTED]> wrote:
> def render_to_response(*args, **kwargs):
> kwargs['context_instance'] = RequestContext(request)
> return _render_to_response(*args, **kwargs)
That's exactly how Snippet #3 [1] does it. I personally prefer using
the built-in
On 7 мар, 17:07, Brian Rosner <[EMAIL PROTECTED]> wrote:
> > "Hold down "Control", or "Command" on a Mac, to select more than one."
>
> > and NO select boxes, search input etc!
>
> What revision of newforms-admin are you using? Also, what browser is
> this behavior is displayed in?
>
> --
> Brian
On Sun, Mar 9, 2008 at 5:51 PM, Nick Day <[EMAIL PROTECTED]> wrote:
> I have a model with several fields, some of which are ImageFields. To
> help prevent files overwriting others (if they are uploaded with the
> same name), and for organisational reasons, I would like to upload the
> images
Nick Day schrieb:
> Hi,
>
> I'm quite new to Django so apologies if this is a really easy
> question!
>
> I have a model with several fields, some of which are ImageFields. To
> help prevent files overwriting others (if they are uploaded with the
> same name), and for organisational reasons, I
Currently, Django won't overwrite uploaded files, it'll append a "_"
to the filename until it's unique. Django does let you organise files
by strftime formatting -
http://www.djangoproject.com/documentation/model-api/#filefield
- it might be worth checking djangosnippets.org or searching in the
On Mar 10, 2:10 pm, Michael Newman <[EMAIL PROTECTED]> wrote:
> Passing your error along would be helpful because it will help us
> pinpoint exactly what part of your code is having issues. Python
> traceback is amazing helpful in that if you follow its path, even
> though it might not look like
Hey All;
I am getting really excited about PyCon this week and especially the
Django talks and tutorial. It should be a real learning experience for
me.
That being said my company is looking for someone who will take up the
programming side of Django as we expand our online presence, start
On Mon, Mar 10, 2008 at 6:09 AM, Paolo Ferretti
<[EMAIL PROTECTED]> wrote:
> I've got a problem with file upload in django. I found some generic
> documentation like this:
>
> http://www.djangoproject.com/documentation/model-api/#filefield
>
On Mar 10, 9:44 am, David Reynolds <[EMAIL PROTECTED]>
wrote:
> On 9 Mar 2008, at 11:23 pm, Brandon Taylor wrote:
>
> > I'm in my 2nd day of using Django, and there are a couple of things
> > I'd like to do, in regards to adding functionality to the outstanding
> > admin interface. These are
Depends on the error...
Not to be flippant but there are a lot of exceptions that have to do
with the database, in genernal though I trust django enough not to
really worry about catching exceptions in my database models because
it already takes care of it for you.
If you are getting a specific
Passing your error along would be helpful because it will help us
pinpoint exactly what part of your code is having issues. Python
traceback is amazing helpful in that if you follow its path, even
though it might not look like anything initially, it will lead you to
what the problem is. This is
Everything looks right in your code, on a brief glance. In your
template, do you have your form prepared for multipart data; Does your
form tag look like ?
Might be something else, but that is the first thing that jumps out to
me.
Michael
On Mar 10, 6:09 am, Paolo Ferretti <[EMAIL PROTECTED]>
Hi,
I've read the tutorial, and bits of docs here and there. I would like
to thank the great Django community for making this a splendid
learning experience!
So, I felt confident enough to start writing a simple image gallery
app.
Here's the code for the main app's models.py.
It's worth reading the notes on the database backends, which go into
detail about how to setup your database for Django / Django for your
database - http://www.djangoproject.com/documentation/databases/
On Mar 10, 5:51 am, "M.Ganesh" <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I am using MySQL. How
Hi!
What type of exception do you usually check when developing with
Django? When you deleting, adding or updating database?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this
you need to put :
# -*- coding: utf-8 -*-
at the first line of files where you use non ascii caracters...
On 10 mar, 02:51, Jean-Pascal Houde <[EMAIL PROTECTED]> wrote:
> Excuse me for the delay... I finally had some time to debug this
> issue.
> First, about the problems I was having :
> I
I've got a problem with file upload in django. I found some generic
documentation like this:
http://www.djangoproject.com/documentation/model-api/#filefield
http://www.djangoproject.com/documentation/faq/#how-do-i-use-image-an...
Reading that pages, I suppose that the file uploading copy into
On 9 Mar 2008, at 11:23 pm, Brandon Taylor wrote:
>
> Hello,
>
> I'm in my 2nd day of using Django, and there are a couple of things
> I'd like to do, in regards to adding functionality to the outstanding
> admin interface. These are age-old topics I'm sure, so I thought I'd
> consult the
On 9 Mar 2008, at 1:06 pm, Daniel de la Cuesta wrote:
> Is there any way to add som html tags in the "TextField?
If you want a rich text editor to insert the html for you, you could
try TinyMCE
http://code.djangoproject.com/wiki/AddWYSIWYGEditor
--
David Reynolds
[EMAIL PROTECTED]
hi,
I've been writing a django-application and now I need the
RequestContext for some new features. I don't want to add
context_instance=RequestContext(request) to each render_to_response
call manually in my views.py.
How can I can I solve my problem?
I could do this with retrieving the
29 matches
Mail list logo