Re: Introducing myself and first question

2008-09-16 Thread Mirto Silvio Busico
Well, this solution doesn't work for me. Setting urls to: from django.conf.urls.defaults import * from django.contrib.auth.views import login, logout from django.contrib import admin admin.autodiscover()

Re: Import error: Model based on another model

2008-09-16 Thread Daniel Roseman
On Sep 16, 10:08 pm, Gerard Petersen <[EMAIL PROTECTED]> wrote: > Daniel, > > Great one! Your suggested setup works, in the front-end that is. I have quite > some classes subclassed from ModelAdmin (including ProductAdmin), however the > "form = ProductForm" line breaks my app. I've tried severa

Re: Odd error when executing "runserver"

2008-09-16 Thread Graham Dumpleton
On Sep 17, 3:02 pm, "Whyneedsgoogle2know?" <[EMAIL PROTECTED]> wrote: > Graham Dumpleton wrote: > > On Aug 29, 6:43 am, Huuuze <[EMAIL PROTECTED]> wrote: > > > > Is this an issue with Django, psycopg, or both? > > > The error 'Image not found' on MacOS X normally means that the .so > > doesn't c

Re: Odd error when executing "runserver"

2008-09-16 Thread Graham Dumpleton
On Sep 17, 3:02 pm, "Whyneedsgoogle2know?" <[EMAIL PROTECTED]> wrote: > Graham Dumpleton wrote: > > On Aug 29, 6:43 am, Huuuze <[EMAIL PROTECTED]> wrote: > > > > Is this an issue with Django, psycopg, or both? > > > The error 'Image not found' on MacOS X normally means that the .so > > doesn't c

Re: Odd error when executing "runserver"

2008-09-16 Thread Whyneedsgoogle2know?
Graham Dumpleton wrote: > On Aug 29, 6:43 am, Huuuze <[EMAIL PROTECTED]> wrote: > > > > Is this an issue with Django, psycopg, or both? > > The error 'Image not found' on MacOS X normally means that the .so > doesn't contain the object code for the architecture that the process > it is being loa

Re: Can anyone tell me how the hell to get url tags to work?

2008-09-16 Thread brian mckinney
This is the code I am using. Sorry for not accompanying my discussion with code examples. I'm not trying to piss anyone off here, just need a bit of help to get this moving. Sorry if I've pushed a bit much on this issue, I just can't seem to find a resolution. URLS # from django.conf.u

Re: how to use COMMENT_APPS?

2008-09-16 Thread mo ther
I applied this patch: http://code.djangoproject.com/attachment/ticket/8630/8630_r8782_admin.diffto the contributed comments. Then dded the Classes I used (basically copied and edited CommentForm) to my app's models, and then put the get_model, get_form, and get_form_target in the COMMENTS_APP's __i

FileInput question

2008-09-16 Thread saeb
Hi, I am trying to send a file as an attachment in an email. It works fine when I attachment file is hardcoded. But when I try to use FileInput widget, I just get the filename in request.FILES dictionary. Is it possible to get full path of the file? Am I using wrong widget for this purpose?

Re: Can anyone tell me how the hell to get url tags to work?

2008-09-16 Thread Malcolm Tredinnick
On Tue, 2008-09-16 at 21:34 -0700, brian mckinney wrote: > Thanks for your reply Malcolm. I really appreciate all of your help. > > Based on your advice, I did some testing and added some views that are > under my myapps directory and they immediately worked. Changing to a > view name in any oth

Re: Can anyone tell me how the hell to get url tags to work?

2008-09-16 Thread brian mckinney
Thanks for your reply Malcolm. I really appreciate all of your help. Based on your advice, I did some testing and added some views that are under my myapps directory and they immediately worked. Changing to a view name in any other directory besides where my main app lives seems to fail. This is

Re: Admin interface troubles

2008-09-16 Thread Ray Smith
Hi, There are backwards incompatible changes between 0.96 and 1.0 for admin. A good source (plus screencast) is available at: http://oebfare.com/blog/2008/jul/20/newforms-admin-migration-and-screencast/ It also has links back to the main doco. Ray Smith http://RaymondSmith.com [EMAIL PROTEC

Re: Inconsistent urlresolver errors

2008-09-16 Thread Chris Bergstresser
On Tue, Sep 16, 2008 at 7:38 AM, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > No, it's not an entirely different issue. It's just a case of one error > inadvertently hiding another one. Your URLConf *must* be completely > valid for reversing to work, since all of the patterns are processed > be

500 error - can't tie down the exception

2008-09-16 Thread Flo
Hi, Hi, I have the following code fragment that I call via an Ajax call (from prototype), it throws an exception that I can't tie down - i don't get any console output and the code runs fine when i simulate it in the shell - so I assume it's related to the incoming POST parameter. The result of t

Admin interface troubles

2008-09-16 Thread [EMAIL PROTECTED]
Hello all I just upgraded from .96 to 1.0 and I finally got the base admin to work but when i try to setup the admin for my models that previously worked in .96 i get the following error. ImportError at /admin/ cannot import name Biz Request Method: GET Request URL:http://localhost:

Re: Can anyone tell me how the hell to get url tags to work?

2008-09-16 Thread Malcolm Tredinnick
On Tue, 2008-09-16 at 20:06 -0700, brian mckinney wrote: > One more question. > > How does reverse decide which directories to look in for the named url > match? > > I've got my main app (myapp) in one location and basic apps like a > blog installed on elsewhere on my python path. It appears th

Re: User subclass vs. User-Profile

2008-09-16 Thread Rodney Topor
But if you use the user-profile approach, how do you create a single form for entering user data and profile data, and how do you process this form data in a view, including user creation, without handling each field separately, which is not in the Django (DRY) spirit? Rodney On Sep 16, 4:03 am,

Re: Model weirdness (from confused newbie)

2008-09-16 Thread Steven
Thank you for the responses this makes sense. My app is still barely past the Polls stage.. so I've just changed the name of my model and it works great. Now that its been explained the error message makes a lot of sense. Hmm... I'm wondering if there is a more friendly error message that could

Re: Can anyone tell me how the hell to get url tags to work?

2008-09-16 Thread brian mckinney
One more question. How does reverse decide which directories to look in for the named url match? I've got my main app (myapp) in one location and basic apps like a blog installed on elsewhere on my python path. It appears the reverse function keeps trying to look at myapp.blog_index instead of b

Re: how to use COMMENT_APPS?

2008-09-16 Thread mo ther
On Tue, Sep 16, 2008 at 8:41 PM, Thejaswi Puthraya < [EMAIL PROTECTED]> wrote: > > Hi, > On Sep 17, 3:35 am, Mother <[EMAIL PROTECTED]> wrote: > > So as per the comments init: > > > > # Attributes required in the top-level app for COMMENTS_APP > > REQUIRED_COMMENTS_APP_ATTRIBUTES = ["get_model", "

Re: how to use COMMENT_APPS?

2008-09-16 Thread Thejaswi Puthraya
Hi, On Sep 17, 3:35 am, Mother <[EMAIL PROTECTED]> wrote: > So as per the comments init: > > # Attributes required in the top-level app for COMMENTS_APP > REQUIRED_COMMENTS_APP_ATTRIBUTES = ["get_model", "get_form", > "get_form_target"] > > I have this in my model. > > def get_model(): >     from

Re: Can anyone tell me how the hell to get url tags to work?

2008-09-16 Thread brian mckinney
Thanks for checking the code Malcolm, you were right on, I was overlooking a line of code in my templates. Thanks again. On Sep 16, 7:27 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Tue, 2008-09-16 at 14:33 -0700, brian mckinney wrote: > > I'm having a very similar problem. This code wo

Re: DjangoCon keynote transcript/summary

2008-09-16 Thread Malcolm Tredinnick
The original summary wasn't a bad summary and Gerard's reactions were also tongue-in-cheek. But it's important to realise that Cal's presentation was at the end of a very long day of talks and he was largely focused on being entertaining. Hopefully people won't take it as unquestioned gospel. I h

Re: How to syncdb programatically (django standalone script) ?

2008-09-16 Thread Mathieu Leplatre
Should I post a new thread ? I cannot find anything about this way of using Django... On Sep 16, 9:12 am, Mathieu Leplatre <[EMAIL PROTECTED]> wrote: > Thanks for the tip. > > Indeed it loooks to be the way, however I am having app_label > errors... > It complains > Error: No module named p > (fo

Re: dynamic upcast

2008-09-16 Thread dadapapa
Hi Malcolm, Malcolm Tredinnick wrote: > > class BaseClass(models.Model) : > > final_type = models.ForeignKey(ContentType) > > > > def save(self,*args) : > > For absolute robustness, you should also accept **kwargs here. There are > a couple of places in Django's code that will

Re: Problem with url tag (Caught an exception while rendering: Reverse ...)

2008-09-16 Thread Malcolm Tredinnick
On Mon, 2008-09-15 at 20:44 -0700, Ross wrote: > Check out the description of the {% url %} tag in the Django > documentation: > > http://docs.djangoproject.com/en/dev/ref/templates/builtins/#url > > It does not expect the project name to be in the URL. Try dropping > "gpp" and just use "weblin

Re: Can anyone tell me how the hell to get url tags to work?

2008-09-16 Thread Malcolm Tredinnick
On Tue, 2008-09-16 at 14:33 -0700, brian mckinney wrote: > I'm having a very similar problem. This code worked fine pre-Django > 1.0, now I am really struggling to find the problem. > > url.py : > > url(r'^(?P\d{4})/$', blog_views.post_archive_year, name = > "blog_archive_year"), > > views.py

Re: unique_together and models using inheritance

2008-09-16 Thread Malcolm Tredinnick
On Tue, 2008-09-16 at 08:57 -0700, meppum wrote: > Thanks Malcolm. The only way I can think to get around this is to > create a unique constraint between those two columns during syncdb. Is > there a less disjointed way of accomplishing the same thing? You're really wanting to introduce some ex

Re: DjangoCon keynote transcript/summary

2008-09-16 Thread Gerard Petersen
Sorry, couldn't help myself ... My 2 cents ... > - Python sucks, especially significant whitespace (I agree heartily. > Only Django keeps me using Python.) Disagree! > - Django could be a lot smarter about scaling the DB (sharding, > denormalization, etc) Questionable > - Inefficient session hand

Re: Paginator loads entire table?

2008-09-16 Thread Evan
I dug into this a bit more and found the underlying issue, (which basicaly stems from this app using an outdated version of django, we're upgrading it now) the old Paginator class didnt call the .count() method correctly on the queryset, rather it was setting its internal count variable to len(se

how to use COMMENT_APPS?

2008-09-16 Thread Mother
So as per the comments init: # Attributes required in the top-level app for COMMENTS_APP REQUIRED_COMMENTS_APP_ATTRIBUTES = ["get_model", "get_form", "get_form_target"] I have this in my model. def get_model(): from django.contrib.comments.models import Comment return Comment def get_f

Re: Problem with url tag (Caught an exception while rendering: Reverse ...)

2008-09-16 Thread Brian Neal
On Sep 16, 4:09 pm, Steve Holden <[EMAIL PROTECTED]> wrote: > Brian Neal wrote: > > I might have found my answer. I was looking at the list of > > incompatible changes and found this: > > >http://code.djangoproject.com/changeset/8760 > > > Which led me to this: > > >http://docs.djangoproject.com

Re: Paginator loads entire table?

2008-09-16 Thread Tim Chase
Evan wrote: > Hey Guys I noticed one of my pages taking over 50seconds to load, and > found the problem out the problem was the paginator loading a lot more > rows than needed. I was wondering if this is how the paginator is > supposed to work or if I'm doing something incorrect. > > Here's the

Re: overwrite get_absolute_url /contrib/auth/User

2008-09-16 Thread Sven Richter
On Tue, 2008-09-16 at 15:11 -0300, Eduardo O. Padoan wrote: > On Tue, Sep 16, 2008 at 2:59 PM, Sven Richter <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > i am wondering if the "users" path in get_absolute_url > > from the User class is hardcoded? > > I mean this line: > > return "/users/%s/" % ur

Re: Can anyone tell me how the hell to get url tags to work?

2008-09-16 Thread brian mckinney
I'm having a very similar problem. This code worked fine pre-Django 1.0, now I am really struggling to find the problem. url.py : url(r'^(?P\d{4})/$', blog_views.post_archive_year, name = "blog_archive_year"), views.py def post_archive_year(request, year): return date_based.archive_year(

Paginator loads entire table?

2008-09-16 Thread Evan
Hey Guys I noticed one of my pages taking over 50seconds to load, and found the problem out the problem was the paginator loading a lot more rows than needed. I was wondering if this is how the paginator is supposed to work or if I'm doing something incorrect. Here's the view i'm using def brows

Determining the rank of an object with django-voting

2008-09-16 Thread M Godshall
I'm using a modified version of the django-voting app to handle the rating of objects on a site I'm working on. I'd like to figure out a way to display the rank of an object in relation to all other objects in the same model. It would seem that I would have to calculate the average rating of all

Re: Problem with url tag (Caught an exception while rendering: Reverse ...)

2008-09-16 Thread Steve Holden
Brian Neal wrote: > I might have found my answer. I was looking at the list of > incompatible changes and found this: > > http://code.djangoproject.com/changeset/8760 > > Which led me to this: > > http://docs.djangoproject.com/en/dev/topics/http/urls/#reverse > > I quote from the docs: > > "The re

Re: Import error: Model based on another model

2008-09-16 Thread Gerard Petersen
Daniel, Great one! Your suggested setup works, in the front-end that is. I have quite some classes subclassed from ModelAdmin (including ProductAdmin), however the "form = ProductForm" line breaks my app. I've tried several import statements to get the droplist to work in the admin part. This

Custom middleware: using process_view to modify the view_func

2008-09-16 Thread intrepidweb
Hi there, I'm working on a custom middleware class for the first time. My goal is to write a process_view function that modifies the view_func and/or view_args that were passed in. The documentation states that process_view can either return None or an HttpResponse. But is there a way to modify

Re: Absolute URL vs Relative URL, or ~ ?

2008-09-16 Thread Kip Parker
On Sep 16, 5:42 pm, Dana <[EMAIL PROTECTED]> wrote: > Kip, don't you mean {{ model.get_image_url }}? > get_FOO_url() has gone in Django 1.0. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To po

Re: mod_python errors in production deployment. apache vs django

2008-09-16 Thread R. Gorman
What is in your urls.py file? That's where your urlpatterns should be stored. R. --~--~-~--~~~---~--~~ 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.c

Announcing django-todo

2008-09-16 Thread shacker
I'd like to announce my first Django app, a pluggable multi-user / multi-group task manager : http://code.google.com/p/django-todo/ It actually went up over the weekend, but I've just updated it with a bunch of bug fixes and a move of templates into the app dir. Code review and comments welcome

Re: mod_python errors in production deployment. apache vs django

2008-09-16 Thread NoviceSortOf
Thanks Karen Now having fixed the curly quotes and loaded psycopg2, I'm on to another set of problems. ** Mod_python error: "PythonHandler django.core.handlers.modpython" Traceback (most recent call

Re: Best distribution practices for pluggable apps?

2008-09-16 Thread shacker
On Sep 15, 9:48 pm, Erik Allik <[EMAIL PROTECTED]> wrote: > There's a topic in this group about general guidelines to packaging > and distribution of pluggable apps. Thanks Erik. Here is the wiki page with guidelines in formation: http://code.djangoproject.com/wiki/DosAndDontsForApplicationWrite

date time input in a modelform

2008-09-16 Thread David Durham, Jr.
Hi all, I'm working through a simple wizard using the formtools wizard stuff. My issue is that my forms don't display with niceties such as date time popup and foreign key 'add' options. Is there something extra that has to be done for these features? Just as a simple test, I reduced things to

Re: Login a User instance

2008-09-16 Thread Berco Beute
Thanks Rajesh, I got a similar tip from someone else. I now specify the backend in settings.py: AUTH_BACKENDS = ('django.contrib.auth.backends.ModelBackend', ) where 'django.contrib.auth.backends.ModelBackend' is the default backend. In my view I can then set the backend on the User instanc

Re: FileField FilePathField hybrid...?

2008-09-16 Thread Markus
Ok - thanks for clarifying this. Markus --~--~-~--~~~---~--~~ 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 em

Re: Introducing myself and first question

2008-09-16 Thread R. Gorman
Ah, I see. I didn't see that on the first read through - I think I need a nap. Your URLs are lacking the /djmsb/ because that's how you currently have your url.py patterns setup. You just need to add 'djmsb/' to the front of your urls: from django.conf.urls.defaults import * from django.contri

Re: DjangoCon keynote transcript/summary

2008-09-16 Thread Delta20
True, it is a little much to transcribe, so I'll briefly summarize his main points for everyone else: - Python sucks, especially significant whitespace (I agree heartily. Only Django keeps me using Python.) - Django could be a lot smarter about scaling the DB (sharding, denormalization, etc) - In

Re: overwrite get_absolute_url /contrib/auth/User

2008-09-16 Thread Eduardo O. Padoan
On Tue, Sep 16, 2008 at 2:59 PM, Sven Richter <[EMAIL PROTECTED]> wrote: > > Hi, > > i am wondering if the "users" path in get_absolute_url > from the User class is hardcoded? > I mean this line: > return "/users/%s/" % urllib.quote(smart_str(self.username)) > > I have the problem that all my prof

overwrite get_absolute_url /contrib/auth/User

2008-09-16 Thread Sven Richter
Hi, i am wondering if the "users" path in get_absolute_url from the User class is hardcoded? I mean this line: return "/users/%s/" % urllib.quote(smart_str(self.username)) I have the problem that all my profiles want to reside under /profile/username and not /users/username. Can i subclass this

Re: Getting specific data from a many to many field.

2008-09-16 Thread Daniel Roseman
On Sep 16, 4:16 pm, "Lance F. Squire" <[EMAIL PROTECTED]> wrote: > On Sep 16, 2:30 am, Daniel Roseman <[EMAIL PROTECTED]> > wrote: > > try: > >     return > > self.system_pictures.filter(image_category__name='Header_Pic')[0] > > except IndexError: > >     pass > > > which will always get the first

Re: Model weirdness (from confused newbie)

2008-09-16 Thread Karen Tracey
On Tue, Sep 16, 2008 at 12:49 PM, Steven <[EMAIL PROTECTED]> wrote: > > I just got started with Django (I'm using v1.0).. and have been trying > (unsuccessfully) to add this line to my first model "author = > models.ForeignKey(User)"... (see my models.py below). Everytime I do > so and sync I get

Re: Model weirdness (from confused newbie)

2008-09-16 Thread Daniel Roseman
On Sep 16, 5:49 pm, Steven <[EMAIL PROTECTED]> wrote: > I just got started with Django (I'm using v1.0).. and have been trying > (unsuccessfully) to add this line to my first model "author = > models.ForeignKey(User)"... (see my models.py below).  Everytime I do > so and sync I get the following m

getting formset Delete? label to show?

2008-09-16 Thread Jim
Hello. I'm using a formset and I enable the delete option. When I just write {{ form }} in the appropriate spot on the template, I get a label Delete? along with the box. But my other fields are not labelled awkwardly, using their name (i.e., the field author_name is labelled Author name). I w

Re: Django new comments framework error

2008-09-16 Thread Mark
Hi, Finally - I got comments to work - but not correctly :-( Django version - svn:9003 Urls conf .. (r'^comments/', include('django.contrib.comments.urls')), I tried everything: - Deleted django/contrib/comments*.pyc files (a number of times) - updated to svn latest (a number of times :)

Re: mod_python errors in production deployment. apache vs django

2008-09-16 Thread Karen Tracey
On Tue, Sep 16, 2008 at 1:09 PM, NoviceSortOf <[EMAIL PROTECTED]> wrote: > > [snip] > File "/var/www/bookstor/settings.py", line 80 >'django.contrib.admin', >^ > SyntaxError: invalid syntax > > You've got curly quotes in your settings.py file. You need to use typewriter quotes. Karen -

mod_python errors in production deployment. apache vs django

2008-09-16 Thread NoviceSortOf
apache conf file is configured as * SetHandler python-program PythonPath "['/var/www'] + sys.path" PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE bookstor.settings PythonOp

Re: Django Admin site not working after migrating to Apache

2008-09-16 Thread Karlo Lozovina
On Sep 15, 2:13 pm, Karlo Lozovina <[EMAIL PROTECTED]> wrote: > I've just migrated my project from Djangos' builtin development web > server to Apache. Everything works the same as with the development > server, except in Admin site I don't see any of my objects, instead > only "Users" and "Group

Re: Problem with url tag (Caught an exception while rendering: Reverse ...)

2008-09-16 Thread Brian Neal
I might have found my answer. I was looking at the list of incompatible changes and found this: http://code.djangoproject.com/changeset/8760 Which led me to this: http://docs.djangoproject.com/en/dev/topics/http/urls/#reverse I quote from the docs: "The reverse() function can reverse a large

Re: Introducing myself and first question

2008-09-16 Thread Mirto Silvio Busico
R. Gorman ha scritto: > On Sep 16, 11:32 am, Mirto Silvio Busico <[EMAIL PROTECTED]> wrote: > > >> DJMSB.VIEWS-- >> >> from django.shortcuts import render_to_response >> from django.contrib.auth.decorators import lo

Model weirdness (from confused newbie)

2008-09-16 Thread Steven
I just got started with Django (I'm using v1.0).. and have been trying (unsuccessfully) to add this line to my first model "author = models.ForeignKey(User)"... (see my models.py below). Everytime I do so and sync I get the following message: ^[[31;1mError: One or more models did not validate: ^

Re: Problem with url tag (Caught an exception while rendering: Reverse ...)

2008-09-16 Thread akonsu
hello, you could try named url patterns. > I am also seeing strange things if I change the order of the URLs in > my URL patterns list. please define "strange things" :) in general, the order of urls matters because django starts rverse lookup from the top of the list and stops at the first mat

Re: Getting specific data from a many to many field.

2008-09-16 Thread R. Gorman
> > > try: > >     return > > self.system_pictures.filter(image_category__name='Header_Pic')[0] > > except IndexError: > >     pass > Make sure you have the indentation set correctly. The second and third line of the posted code should actually be one line. I think the formatting was changed w

Re: Absolute URL vs Relative URL, or ~ ?

2008-09-16 Thread Dana
Kip, don't you mean {{ model.get_image_url }}? Using {% url %}, get_absolute_url, MEDIA_ROOT, sites framework and url.py should be able to accomplish what you are looking to do and more. Also look into the permalink decorator while you're at it. Good luck! On Sep 16, 8:27 am, Kip Parker <[EMAIL

Re: Getting specific data from a many to many field.

2008-09-16 Thread R. Gorman
> > try: > >     return > > self.system_pictures.filter(image_category__name='Header_Pic')[0] > > except IndexError: > >     pass > > > which will always get the first related image in that category, and > > silently swallows the error that's thrown if there's no such picture. > > Can't seem to ge

Re: Introducing myself and first question

2008-09-16 Thread R. Gorman
On Sep 16, 11:32 am, Mirto Silvio Busico <[EMAIL PROTECTED]> wrote: > > DJMSB.VIEWS-- > > from django.shortcuts import render_to_response > from django.contrib.auth.decorators import login_required > from django.contr

change data of combo in admin (django 1.0)

2008-09-16 Thread Bruno Gomes
I have the following question: I'm using the "def queryset(self,request):" to change the list of results that the admin offers me from the object listenig. I would like to know if I can change the list of results that is generated for a combo list, in the time of reg editioning... but I do not wa

Re: Problem with url tag (Caught an exception while rendering: Reverse ...)

2008-09-16 Thread Brian Neal
On Sep 15, 10:44 pm, Ross <[EMAIL PROTECTED]> wrote: > Check out the description of the {% url %} tag in the Django > documentation: > > http://docs.djangoproject.com/en/dev/ref/templates/builtins/#url > > It does not expect the project name to be in the URL. Try dropping > "gpp" and just use "web

Re: Login a User instance

2008-09-16 Thread Rajesh Dhawan
On Sep 16, 7:43 am, Berco Beute <[EMAIL PROTECTED]> wrote: > I have a User instance that I want to login. Normally in a view I > could just invoke authenticate() followed by login(), where the former > takes the username and password from the incoming request. In my case > I retrieve the User obj

Re: DjangoCon keynote transcript/summary

2008-09-16 Thread Masklinn
On 16 Sep 2008, at 17:28 , Delta20 wrote: > > Does anyone know where I can find a transcript, write-up or similar of > Cal Henderson's keynote presentation at DjangoCon? Sounds like it was > interesting stuff. > > There is a youtube video here, but it's pretty long: > > http://uk.youtube.com/wat

Re: Django 1.0 lighttpd FastCGI redirect issue

2008-09-16 Thread Anders Bergh
On Tue, Sep 16, 2008 at 10:25 AM, Wim Feijen <[EMAIL PROTECTED]> wrote: > > Hi Anders, > > For me, removing the slash in the FORCE_SCRIPT_NAME seemed to work. I > am not using the admin interface, so I can't check on that. > > So I added to settings.py: > > FORCE_SCRIPT_NAME="" > > I totally agree

Introducing myself and first question

2008-09-16 Thread Mirto Silvio Busico
Hi all, I'm starting to use django and to understand if I can do what i need. My experience is mainly with Plone and I use a Debian/Lenny box. I digged into the documentation and, after experimenting the 0.96 version that comes with Lenny, I switched to the 1.0 version from Sid I need a "priva

DjangoCon keynote transcript/summary

2008-09-16 Thread Delta20
Does anyone know where I can find a transcript, write-up or similar of Cal Henderson's keynote presentation at DjangoCon? Sounds like it was interesting stuff. There is a youtube video here, but it's pretty long: http://uk.youtube.com/watch?v=i6Fr65PFqfk --~--~-~--~~~

Re: Absolute URL vs Relative URL, or ~ ?

2008-09-16 Thread Kip Parker
No, nothing to do with HTTP_HOST, that comes from the server. The point of the sites framework is to differentiate between different sites, so a * site would be pointless. If I were you I'd sort out my templates so that instead of /some/media/location/css/styles.css you have {{MEDIA_URL}}/css/st

Re: Getting specific data from a many to many field.

2008-09-16 Thread Lance F. Squire
On Sep 16, 2:30 am, Daniel Roseman <[EMAIL PROTECTED]> wrote: > > Sorry, my mistake. filter() always gives you a queryset - because > there might be more than one instance of the related model that fits > the criteria - so you can't jut reference the location/width directly. > The best way is to

Re: Unique fields in model

2008-09-16 Thread Daniel Roseman
On Sep 16, 11:34 am, TKa <[EMAIL PROTECTED]> wrote: > Hello there, > > This might be a trivial question but I'm a rather new Django user and > I couldn't find an answer in the documentation. > > Setting unique restriction to one field of the model was an easy task, > but how can I give a model a r

Unique fields in model

2008-09-16 Thread TKa
Hello there, This might be a trivial question but I'm a rather new Django user and I couldn't find an answer in the documentation. Setting unique restriction to one field of the model was an easy task, but how can I give a model a restriction that a combination of two or more fields should be un

Re: Absolute URL vs Relative URL, or ~ ?

2008-09-16 Thread est
Thank you Kip. Call me stupid but does site framework have something to do with HTTP HOST header? But in my case the site is for ANYSITE, no matter you visit the site by IP, domain, or even customized CNAME you cann visit the site with out any problem (Why there isn't a wildcard * in site framew

Re: Abstract Superclass and Foreign Keys

2008-09-16 Thread Peter Bailey
Thanks for the responses. There are a number of subclasses and I won't know the specifics initially. I'll check out the GenericForeighnKey. Sounds like it is what I want. Thanks again, Peter On Sep 16, 8:34 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2008-09-15 at 18:10 -0700,

Re: Django 1.0 lighttpd FastCGI redirect issue

2008-09-16 Thread Grigory Fateyev
Hello Wim Feijen! On Tue, 16 Sep 2008 01:25:58 -0700 (PDT) you wrote: > > Hi Anders, > > For me, removing the slash in the FORCE_SCRIPT_NAME seemed to work. I > am not using the admin interface, so I can't check on that. > > So I added to settings.py: > > FORCE_SCRIPT_NAME="" > > I totally a

Re: Inconsistent urlresolver errors

2008-09-16 Thread Malcolm Tredinnick
On Mon, 2008-09-15 at 21:43 -0700, catsclaw wrote: > On Sep 15, 11:05 pm, Ross <[EMAIL PROTECTED]> wrote: > > Can you paste the urls.py from your project as well as the one from > > the app you are having problems with? > >I removed all the includes in case that was causing the error; all >

Re: Abstract Superclass and Foreign Keys

2008-09-16 Thread Malcolm Tredinnick
On Mon, 2008-09-15 at 18:10 -0700, Peter Bailey wrote: > Hi all. I have a set of classes (web page items like radios, > checkboxes, etc.) They are built on a superclass - Item. I need a > join table to link them to specific pages in which I also store a > position (PageItem) . Here is a snippet:

Re: restart apache every time I make a modification?

2008-09-16 Thread akonsu
the dev server is not robust. it cannot be used in a production environment (to serve your site that is) but it can be used for development. after you finish your development, you deploy your application to be served by apache or some other real server. but there is no need to torture your self re

Re: unique_together and models using inheritance

2008-09-16 Thread Malcolm Tredinnick
On Mon, 2008-09-15 at 20:06 -0700, meppum wrote: > I remember reading somewhere in the documentation that a only fields > defined on a particular model could be used in the unique_together > meta option, but I can't seem to find it anymore. Is this still true > in v1.0 or trunk? It's still true.

Re: dynamic upcast

2008-09-16 Thread Malcolm Tredinnick
On Fri, 2008-09-12 at 11:57 -0700, dadapapa wrote: > > It does not work at all. For some reason, final_type also gets > > upcasted to MediaObject?! > > I found the solution, now. The problem was that the __init__ method of > a Model is also called when objects are restored from the database. So

Re: restart apache every time I make a modification?

2008-09-16 Thread Cequiel
Hi akonsu. I wasn't sure about the django dev server. I thought that the django dev server was created only to follow the tutorials and for making your first silly applications. But is the django dev server a complete and a robust web server? In this case I'll use this server instead. Thanks. O

Re: Ongoing UnicodeDecodeError's with web crawlers and file caching

2008-09-16 Thread Malcolm Tredinnick
On Fri, 2008-09-12 at 04:44 -0700, Julien Phalip wrote: > Hi, > > I'm running a fairly large website (10,000 news items). Initially it > was made in ASP with MSSQL, then I took the project over and ported it > to PHP and MYSQL. Finally, 6 months ago I ported it to Django and > MySQL. > > Now, e

Re: How to syncdb programatically (django standalone script) ?

2008-09-16 Thread Mathieu Leplatre
Thanks for the tip. Indeed it loooks to be the way, however I am having app_label errors... It complains Error: No module named p (for polls) If I put my script in a module or remove Meta : File "[...]/django/db/models/base.py", line 51, in __new__ kwargs = {"app_label": model_module.__name

Re: restart apache every time I make a modification?

2008-09-16 Thread Cequiel
Thanks, Ross. I saw that threat and it should be a good solution. On 16 sep, 05:47, Ross <[EMAIL PROTECTED]> wrote: > There was a thread on this a couple days ago that I starred. Here ya > go: > > http://groups.google.com/group/django-users/browse_thread/thread/f44e... > > On Sep 15, 10:27 pm, Ce

Re: Absolute URL vs Relative URL, or ~ ?

2008-09-16 Thread Kip Parker
> no, it's not THAT simple. It really is that simple, honest, but your brain has made it all complicated. Look at http://docs.djangoproject.com/en/dev/ref/contrib/sites/ (sites framework), TEMPLATE_CONTEXT_PROCESSORS setting and RequestContext and the URL dispatcher docs, the answers to your pro

Login a User instance

2008-09-16 Thread Berco Beute
I have a User instance that I want to login. Normally in a view I could just invoke authenticate() followed by login(), where the former takes the username and password from the incoming request. In my case I retrieve the User object from the db and only have the username, not the plain password a

Re: Absolute URL vs Relative URL, or ~ ?

2008-09-16 Thread ekellner
On Tue, Sep 16, 2008 at 10:02 AM, est <[EMAIL PROTECTED]> wrote: > > Today, my boss came to me and asked: "Please move our django site from > http://xxx.com/ to http://xxx.com/v2/"; > > It's killing me. Just image how huge mount of HTML source code to > modify. > I STRONGLY suggest django implem

Admin interface customisation

2008-09-16 Thread [EMAIL PROTECTED]
Hi everybody, I am using Django for the first time and I have a few problems. My model is (simplified): --- class Company(models.Model): name = models.CharField(u'company name', max_length=255) address = models.CharField(u'address', max_length=255) etc. --- class Person(model

Re: Absolute URL vs Relative URL, or ~ ?

2008-09-16 Thread David Reynolds
On 16 Sep 2008, at 9:53 am, Donn wrote: > How about > 1. making a link under /var/www/assets to /whatever/v2/assets > 2. move your assets directory into /whatever/v2/ > 3. setup your webserver to go look at /var/www/assets when media is > served. > > You should be able to arrange something lik

Re: Absolute URL vs Relative URL, or ~ ?

2008-09-16 Thread Donn
On Tuesday, 16 September 2008 10:32:54 est wrote: > http://xxx.com/assets/main.css > Now the problem is, how can I massively move all template under a new > sub-directory URL like http://xxx.com/v2/ ? How about 1. making a link under /var/www/assets to /whatever/v2/assets 2. move your assets dire

Re: Absolute URL vs Relative URL, or ~ ?

2008-09-16 Thread est
First thanks all of you for the quick reply! On Sep 16, 4:10 pm, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > Wiadomość napisana w dniu 2008-09-16, o godz. 10:02, przez est: > > > > > > > > > Today, my boss came to me and asked: "Please move our django site from > >http://xxx.com/tohttp://xxx.com/v2/

Re: Creating users?

2008-09-16 Thread Daniel Roseman
On Sep 16, 7:37 am, Rodney Topor <[EMAIL PROTECTED]> wrote: > The User Authentication docs say "The most basic way to create users > is to use the create_user() helper function...".  But I can't see in > the docs a description of a less basic / more sophisticated way to > create users.  For exampl

Gis Admin > Template not found

2008-09-16 Thread martyn
Hi, I'm trying to get a correct admin interface with the default openlayers. Here are my models/admin : #models.py from django.contrib.gis.db import models from django.contrib.auth.models import User class Competitor(models.Model): # User pour auth + Utilities user = models.Forei

Re: Django 1.0 lighttpd FastCGI redirect issue

2008-09-16 Thread Wim Feijen
Hi Anders, For me, removing the slash in the FORCE_SCRIPT_NAME seemed to work. I am not using the admin interface, so I can't check on that. So I added to settings.py: FORCE_SCRIPT_NAME="" I totally agree that this change with great consequences for all lighttpd users is poorly documented. Be

  1   2   >