TypeError Traceback (most recent call
last)
/Users/orestis/Developer/skai/skai/
/opt/local/lib/python2.4/site-packages/django/db/models/fields/
related.py in __get__(self, instance, instance_type)
246 clear.alters_data = True
247
--> 248
OK, I got it. I was defining my own managers on Episode, and there was
no default manager. Adding an objects=models.Manager() solved it.
Maybe this should be added to the documentation? Should I create a
ticket?
On Jan 28, 1:56 am, orestis <[EMAIL PROTECTED]> wrote:
> This is VERY WEIR
I have defined a dictionary of lookup arguments in my manages so I can
reuse them everywhere I want the same behavior...
On Jun 10, 3:12 am, Jonathan Stockdill
<[EMAIL PROTECTED]> wrote:
> I found myself in a similar position and used the following:
> def get_next_pub(self):
>return
There's no limitation - one could always create a contrib app that
uses your framework behind the scenes...
On Jun 8, 3:53 am, "Marinho Brandao" <[EMAIL PROTECTED]> wrote:
> > Sounds great Marinho, thanks for contributing this! *bookmarked*
>
> thanks for the considerations :)
>
> next days I wil
You can always put a urlconf that will match "robots.txt" and return a
simple http response...
On Jun 5, 6:24 pm, "Deryck Hodge" <[EMAIL PROTECTED]> wrote:
> On 6/5/07, Rob Hudson <[EMAIL PROTECTED]> wrote:
>
> >
> > SetHandler None
> >
>
> > Can you do the same for single files?
>
> Yo
Hello,
I have recently published my humble blog on http://orestis.gr
I get a stream of weird 404 errors in my email inbox, but for the life
of me I can't figure out what's wrong.
Here are some examples:
>Referrer: http://orestis.gr/en/blog/2007/05/06/international-part1/
>Requested URL: /blog/
OK never mind about this. It was my error, I was creating some URLs
like this:
/{{var}}/path1/path2/
and sometimes var wasn't set so the url becomes:
//path1/path2/
which replaces everything in the browser...
--~--~-~--~~~---~--~~
You received this message bec
I have a problem with flatpages.
When putting links in my templates, I use absolute URLs without
prepending http://hostname.com/
For example, Home gets interpreted by the browser as a
link to http://hostname.com/, and all is correct.
However, when a flatpage is being served, those links get int
I've done something similar to this, putting the site language in the
url.
Basically you create a middleware process_request, that will take
request.path and set it to something else.
For example you might do:
request.path = "/app/theme/view/"
parts = request.path.split("/")
request.path = "/
Hello,
I think this will be easy to do, but I just want to check:
Is it possible to have different Django versions on the same host, and
point my sites to different versions ?
I'd like to use bleeding edge for personal stuff (yay for
experimentation) but for any work-related material, I want st
asily...
So if this could be changed it'd be nice! Any ideas ?
Thanks
Malcolm Tredinnick wrote:
> On Mon, 2007-05-14 at 00:52 +, orestis wrote:
> > Hello,
> >
> > I'm having a weird python error, and I can't seem to find out what's
> > wrong.
> &g
uff...
On May 14, 3:52 am, orestis <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm having a weird python error, and I can't seem to find out what's
> wrong.
>
> I wanted to extend the site framework, so I can use it for
> multilingual content. The way to
Hello,
I'm having a weird python error, and I can't seem to find out what's
wrong.
I wanted to extend the site framework, so I can use it for
multilingual content. The way to do this is to override the SITE_ID
with a function:
import threadlocals
def SITE_ID():
lang = threadlocals.get_current
I've sent this to Jacob to be included in the blog roll, but since he
hasn't responded still, maybe the email somehow went missing.
So, drop by my blog:
http://orestis.gr/
and leave a comment. I plan to have a lot of write-ups about the
making of it, and as I discover more features of Django I'
You ca use:
Entry.objects.all().dates('pub_date','month','DESC')
lookup the dates function of the QuerySet.
On May 12, 7:18 pm, Peter Sanchez <[EMAIL PROTECTED]> wrote:
> I am working on my first "real" django project which includes a weblog.
>
> I would like to create an Archives page that lis
I've created my own edit_inline class so I can override the template.
This was easy. However, due to lack of documentation, I'm busting my
head trying to figure out how to do this:
I have an Article that is connected to a Photos model using the
ArticleImage model like this:
class ArticleImages(m
OK I'm stupid :)
It seems that raw_id_admin actually does this already. I didn't notice
that before...
So never mind :)
On May 11, 4:45 am, orestis <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I've searched and I didn't find any good answers on this:
>
> Wh
Put in a simple, hard coded python list and use random on this ?
You can put callables in the list that return the right info, so you
can automate the stuff...
On May 11, 10:44 pm, Mordy Ovits <[EMAIL PROTECTED]> wrote:
> I have a sidebar in my page design. I have 7 or so features that can
> go
Hello,
I've searched and I didn't find any good answers on this:
When you use the admin interface to specify a foreign key on a model,
you get a nice little drop-down with a cool plus button to add more.
This is manageable for about 10-20 entries. For more, there are
issues:
a) Usability goes d
I'll give you a short description here:
The date filter doesn't have any internationalization or localization
knowledge built-in. This plays havoc with languages that have genders,
cases etc (Greek, German, French and many more) and use them in
displaying dates.
There is a discussion at
http://
Here it is:
http://code.djangoproject.com/ticket/3672
On Mar 7, 12:42 pm, "Frankie Robertson"
<[EMAIL PROTECTED]> wrote:
> On 07/03/07, orestis <[EMAIL PROTECTED]> wrote:
>
>
>
> > As it stands, the when using a newforms.DateField with specified input
Duh! I didn't know there was a __dict__ available on a model :) Maybe
this code can be made simpler.
On Mar 7, 10:32 am, "orestis" <[EMAIL PROTECTED]> wrote:
> What I have done is this:
>
> @classmethod
> def load_from_model(clazz, model):
>
As it stands, the when using a newforms.DateField with specified input
formats, it gets parsed alright, but when rendering the form there is
no way to specify the output format, it gets printed as -MM-DD.
This not only is a bad localization practice, it makes _using_ the
input formats impossi
What I have done is this:
@classmethod
def load_from_model(clazz, model):
data = {}
fields = clazz.base_fields
for field in fields.keys():
try:
data[field]=getattr(model,field)
except AttributeError:
print fie
Since form_for_model isn't nearly finished yet (regarding with
FileFields and customization - or I just can't find how it works), I
have decided to just repeat myself and create my own forms.
I thought that it'd be very intuitive if a form instance gets bound to
the data from a model instance, bu
I think (I'm not sure that it does nothing, and you have to manually
use request.FILES to get the file you want, and manually upload it to
wherever you want. Please someone correct me if I'm wrong.
It's a kludge for now, but I think (hope) Adrian is working on it...
If it worked automatically (th
Can you discuss this on the relevant ticket:
http://code.djangoproject.com/ticket/2282
Thanks,
Orestis
Aidas Bendoraitis wrote:
> Similarly Lithuanian would be:
> ą = a
> č = c
> ę = e
> ė = e
> į = i
> š = s
> ų = u
> ū = u
> ž = z
>
> I am just thin
Well if you want to target every second, tenth etc. element you can use
the cycle tag.
If you want to highlight the tenth entry because it is special, you
should define it as special in your view code.
If you want to highlight arbitrary entries, well, then... I don't know.
Why would you do that
Well, the thing missing right now is generating a form given a model.
Once this is finished in newforms, it will be piece of cake creating
admin-like interfaces.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Dj
Hey, can you give some more info on the stack of this application ?
Is it client-server, standalone ? What advantages does it have over the
normal HTML approach ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"D
Just do
{% if forloop.first %}
...
{% else %}
...
{% endif %}
--~--~-~--~~~---~--~~
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 unsubscrib
Thanks!
I am trying to make lighttpd spawn the fcgi django processes using
bin-path but there seems to be a problem. Here is my setup:
fastcgi.server = (
"/myproject.fcgi" => (
"main" => (
# Use host / port instead of socket for TCP fastcgi
"host" => "127.0.0
If there is an option of signing up, why don't we close the
non-logged-in user ticket submission ?
Anyway, Akismet still leaves a lot of spam in.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" grou
I'm using CentOS, it's like RedHat AFAIK...
--~--~-~--~~~---~--~~
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 group, s
And for anyone searching this:
http://www.djangoproject.com/documentation/django_admin/#sqlsequencereset-appname-appname
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group,
HURRAY I fixed it.
For the record, this was my problem - no bug in Django.
I have imported semi-automatically some values from a previous version
of my app. I had to use the same Primary keys in order to keep all the
relations. However, I didn't adjusted the postgres sequences, so they
tried
I get this back:
[{'sql': 'SELECT
"django_session"."session_key","django_session"."session_data","django_session"."expire_date"
FROM "django_session" WHERE ("django_session"."session_key" =
d3b9c68e8d397b3fc0809ce5102e0299 AND "django_session"."expire_date" >
2006-11-05 13:39:36.338000)', 'time':
I got this ticket rejected from Akismet:
This is not related to #852, as the errors are thrown when running the
application normally, not the shell.
The errors I get are:
{{{
File "/usr/lib/python2.4/site-packages/django/db/models/base.py",
line 166, in save
cursor = connection.cursor()
Make sure that the page is actually encoded in UTF-8.
Open it in notepad, then save it again chooding UTF-8 in the encoding
drop down.
Then open it again and see if it is displayed correctly:
a) In notepad
b) In a browser (statically served)
I had zero problems with django and encodings, I had
Hello,
I'm new to linux administration, but I try to learn :)
I have managed to make lighttpd and postgresql start automatically upon
reboot, now I need a way to make manage.py runfcgi to start
automatically.
I tried to put this in my lighttpd.conf:
fastcgi.server = (
"/django.fcgi" => (
I think that a context processor is better suited for 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-users@googlegroups.com
To unsubscribe fr
> > (1) to use the dev server
> > (2) no changes when moving to production
> > (3) to have core and non-core content served out of the
> > ADMIN_MEDIA_PREFIX prefix.
>
> 1 and 2 is true (especially 2).
> 3 not ... I don´t care serving admin_media with a different prefix.
>
Why don't you follow my
Here is a proposal: Why don't these SQL files generated by default by
the django-admin.py startproject utility ? They would start empty, with
just a comment:
--place initial data commands here, alter tables, whatever
Also, since django uses utf-8 from top to bottom, it makes sense to
make utf-8
Interesting. How much memory does each apache process consume ? Have
you tested this under load ? Can you post the ps aux results ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to th
line to the main urls.py
urlpatterns += patterns('',
(r'^static/(?P.*)$', 'django.views.static.serve',
{'document_root': 'D:/orestis/django/static/'}),
)
Where 'D:/orestis/django/static/' is the directory which holds the
media.
Sqlite ? In a production site ? Does anyone use this ? I sincerely
never heard of it.
--~--~-~--~~~---~--~~
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@googlegro
Thanks all for the recommendations!
--~--~-~--~~~---~--~~
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 group, send email
I think you have confused some concepts. /django/contrib/admin/media/
hosts the admin media files.
You mention content uploaded by users... In what directory is this put
under ?
Static files are documented here:
http://www.djangoproject.com/documentation/static_files/
--~--~-~--~~-
You mention dev-server, yet you talk about apache and lighttpd.
If running the dev-server, you shouldn't do anything, since it figures
out itself how to serve files.
If you're running apache, either with mod_python or with mod_fcgi, you
should just create a link to the /foo/bar/admin/media direc
http://code.djangoproject.com/wiki/DjangoFriendlyWebHosts
--~--~-~--~~~---~--~~
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
Hello,
I got a trial server at budgetdedicated.com, seems very nice. The price
is comparable to shared hosting, everything seems fine.
Anyway, I'm interested in minimizing memory usage. What kind of
configuration is preferred for that ? lighttpd or apache2 ? mysql or
postgres ?
I'll have to fig
Sorry to cause misunderstanding.
Anyway, thanks to the great #django channel, I figured this out:
def hack_user(sender, args , kwargs):
sender._meta.admin.list_display=('username', 'email', 'first_name',
'last_name', 'is_staff', 'date_joined')
pass
from django.db.models import signals
f
try this:
def _get_full_name(self):
"Returns the person's full name."
return '%s %s' % (self.first_name, self.last_name)
full_name = property(_get_full_name)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
AFAIK, to create instance variables, you have to define them in the
__init__(self) function of your class. Defining them in other methods
will not do.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" g
Thanks, but that will not do. I want the fields to show up in the admin
list display. I don't want to add any new fields. I just want to view
more fields in the list, and be allowed to sort on them (eg. to sort by
date of creation etc)
--~--~-~--~~~---~--~~
You re
Hello,
I would like to save some arbitrary data that there's no point in
keeping in a database.
It's just a float number really, that some of my models will use, and
it will be updated using a cron job. It will not presented in a
template, just within some methods of a model.
What the heck, her
Anyone ?
--~--~-~--~~~---~--~~
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 group, send email to [EMAIL PROTECTED]
For m
Well, my experience is:
You should totally make sure that there are no errors in your
application. Even small ones that normally wouldn't cause django to
hiccup may cause strange things with FastCGI.
Also you should add the needed 404 and 500 pages needed for FastCGI.
Check about 404 errors from
ed chan wrote:
> Thanks Don, I looked at urlresolvers.py and it is exactly the type of thing
> i'm looking for. This thread was posted, as you said, several months ago.
> Are there any plans to standardize this feature / implementation?
>
> Ed.
>
It is already in trunk
http://code.djangoproject
Very nice indeed! Maybe you can make a write up describing some
design/implementation issues? I'm particularly interested in the Jabber
integration and the cool DHTML in the web client...
--~--~-~--~~~---~--~~
You received this message because you are subscribed t
I have created a middleware for dealing with inactivity in sessions.
See the related documentation page.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to dja
Ah, I tried to call the session middleware directly, but now I see that
the render_to_response actually calls the tag processing code. So here
is what I did:
def save_session(request):
session_key = request.session.session_key or
Session.objects.get_new_session_key()
Session.objects.save(
I'm not sure about that, but I remember reading that to display
checkboxes in the admin interface lists you have to do some hacking,
this is not provided out of the box.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Group
OK, I'm having a silly problem:
In one view I set a property in the user's session.
Then, in the template returned by the same view, a custom template tag
queries the database Session objects and displays a message depending
on the property set before.
However, this doesn't work the first time.
Hello,
I have a simple need: I'd like to view/sort in the admin the signup
date of my users. How can I add a field in the User Admin list_display ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" gro
Nope, unfortunately this doesn't help with fastcgi internal errors.
Even if debug = True or debug = False, if there is an internal fastcgi
error, you won't get either the django error page, or the flup error
page. Instead you get a standard 500 server error (in Firefox at least)
which I can replac
This is driving me CRAZY!
The FastCGI logs show nothing (the stupid incomplete headers message).
However, I get my custom FastCGI error page. (internal_error.html).
My site is on and off every 5 minutes, I can't stand it. I've contacted
the host (dreamhost) but I've yet to get an answer.
PLEASE
OK, I did it. Unfortunately, the session table is using pickled data,
so the processing has to be done in django. Here it goes:
In views that you would like to refresh the active state of a user,
add:
request.session['last_seen']= datetime.datetime.now()
Then, in a util.py :
from django.contri
Why do you sleep(10) ? I can't think of any possible reason...
--~--~-~--~~~---~--~~
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
Here is the responsible handler in Rails:
http://dev.rubyonrails.org/browser/trunk/railties/lib/fcgi_handler.rb
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send emai
I've been browsing the rails mailing lists for a while, they seem to
have a fastcgi.crash.log that gets all the fastcgi problems, instead of
passing them to the apache error.log
Is there any way to do this with flup ?
--~--~-~--~~~---~--~~
You received this messa
Hello, I was having periodical troubles with the FastCGI approach on
DreamHost. I was following the documentation regarding FastCGI on a
shared host. I contacted support and they replied with this:
Oct 11 16:49:01 smithers Procwatch: killed naughty pid 10811 - orestis
with /usr/bin/python2.4
Thanks! I'll try that!
--~--~-~--~~~---~--~~
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 group, send email to [EMAIL PR
Thanks! I'll try that and get back here...
--~--~-~--~~~---~--~~
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 group, sen
Hello, I have a model of EnglishWords and GreekWords. EnglishWords are
referenced as a ForeignKey in GreekWords, ie one EnglishWord may have
more than one GreekWords referencing it.
I would like when going in admin to edit an EnglishWord to see what
Greek words are referencing it, and be able to
Following this thread:
http://groups.google.com/group/django-users/browse_frm/thread/f11c67142c7dd71a/2bdeb945f7bf2232?lnk=gst&q=visitors&rnum=2#2bdeb945f7bf2232
It is mentioned that to display a list of visitors (anonymous and
logged in) I have to use the session framework.
However, in the doc
usually encode('utf-8') is needed only when printing the strings. You
can pass them aroung without problem.
BTW, unicode chars should appear like '\u0345' ... I'm not so sure
about that though.
--~--~-~--~~~---~--~~
You received this message because you are subsc
Sorry for the double post, this message didn't show up for 12 hours or
so. Please continue here:
http://groups.google.com/group/django-users/browse_frm/thread/ca36e7f1ce71c577/93ec9ceebf4bbd5e#93ec9ceebf4bbd5e
--~--~-~--~~~---~--~~
You received this message becaus
The docs aren't quite clear on this.
I follow the last section in the documentation
http://www.djangoproject.com/documentation/fastcgi/
But when accessing the url, I get the following in the error log:
[Sun Oct 1 18:07:38 2006] [error] [client xx.xx.xx.xx] File does not
exist: /home/[username]
Hello, I need some help on deploying django on a cpanel shared server.
I follow the last section in the documentation on using fastcgi, but I
get the following error when hitting the URL:
[Sun Oct 1 18:19:00 2006] [error] [client xx.xx.xx.xx] FastCGI:
incomplete headers (0 bytes) received from se
80 matches
Mail list logo