Re: Flatpages - what am I missing to make these work (advice, please)?

2009-08-19 Thread allenh
Hi, I had the same problem with the SITE_ID mismatched. I also found you can just recognize the SITE_ID from the admin page by editing the site form and checking the URL like (http://localhost:8000/admin/sites/site/ 1/). The last number on URL is exactly the SITE_ID of your site name. Just a tip!

Dynamically add a line to an inlineformset

2009-08-19 Thread Andew Gee
Does anyone know how to add a new line to anlineformset dynamically? I have a page that contains an inlineformset and I need to be able to click a button and add a new line which will then be saved when the form is submitted, is that possible? Thanks Andrew --~--~-~--~~~--

Re: Displaying username on every page

2009-08-19 Thread John Barham
On Aug 19, 9:27 pm, Kenneth Gonsalves wrote: > > Yes, I'd read about RequestContext but from what I understand you have > > to pass it explicitly to render_to_response().  Is that the case? > > yes Thanks for the confirmation. In that case I'll have to write my own render_to_response() wrapper.

Re: Displaying username on every page

2009-08-19 Thread Kenneth Gonsalves
On Thursday 20 Aug 2009 9:52:37 am John Barham wrote: > > If you use RequestContext(), you automatically get visibility to the > > current user and their permissions > > (Sorry, I meant to say RequestContext instead of RequestInstance.) > > Yes, I'd read about RequestContext but from what I un

Re: django-tinymce not appearing in admin

2009-08-19 Thread Kenneth Gonsalves
On Thursday 20 Aug 2009 9:42:33 am zignorp wrote: > Can you post the example of Setting the Media nested class with the > TinyMCE media? > I'm in exactly the same place, class ReportAdmin(admin.ModelAdmin): list_display = ['title','approved'] class Media: js = ('/sitemedia/js

Re: Displaying username on every page

2009-08-19 Thread John Barham
On Aug 19, 5:06 pm, grahamu wrote: > If you use RequestContext(), you automatically get visibility to the > current user and their permissions (Sorry, I meant to say RequestContext instead of RequestInstance.) Yes, I'd read about RequestContext but from what I understand you have to pass i

Models.py and overriding the get_or_create class method. Help please with obj = self.model(**params)

2009-08-19 Thread rh0dium
Hi all, I have a class in which I want to override the get_or_create method. Basically if my class doesn't store the answer I want it do some process to get the answer and it's not provided. The method is really a get_or_retrieve method. I have heavily borrowed this from db/models/ query.py and

Re: django-tinymce not appearing in admin

2009-08-19 Thread zignorp
Hello, Can you post the example of Setting the Media nested class with the TinyMCE media? I'm in exactly the same place, Thanks, Wendy On Aug 14, 3:15 pm, diogobaeder wrote: > Kenneth, > > Setting the Media nested class with the TinyMCE media worked! :-) > > Thanks for the help, and sorry for th

Re: invitation mechanism implementation, ideas needed

2009-08-19 Thread Kenneth Gonsalves
On Thursday 20 Aug 2009 7:14:40 am Nicolas Aggelidis wrote: > once again i need your help. I want to implement a simple friendship > invitation/rejection mechanism. In more words, a user sends an > invitation to another user, the latter has the option to accept it , > or reject it... > > > What pa

invitation mechanism implementation, ideas needed

2009-08-19 Thread Nicolas Aggelidis
hi friends, once again i need your help. I want to implement a simple friendship invitation/rejection mechanism. In more words, a user sends an invitation to another user, the latter has the option to accept it , or reject it... What parts of django should i look into? (i am new to django!) .

Re: Problem installing Django 1.1 on XP

2009-08-19 Thread Karen Tracey
2009/8/19 Nikola Smiljanić > > Django-1.1.tar.gz > MD5: b2d75b4457a39c405fa2b36bf826bf6b > > Same thing. File __init__ in django/utils starts exactly like > traceback says: > > Django-1.1/Django was originally created in late 2003 at World Online, > the Web division > of the Lawrence Journal-Worl

Re: Django "freezing" after a few minutes?

2009-08-19 Thread Graham Dumpleton
On Aug 20, 1:01 am, erikcw wrote: > Hi, > > I'm running Django through mod_wsgi and Apache (2.2.8) on Ubuntu 8.04. > > I've been running Django on this setup for about 6 months without any > problems. Yesterday, I moved my database (postgres 8.3) to its own > server, and my Django site started

Template Filters

2009-08-19 Thread WilsonOfCanada
Hellos, I was wondering if there is a filter that can remove these '\' that python added when strings are appended to a list or dictionary. I cannot use cut because I still need one of the '\' ex. C:\\moo Code: arrPlaces = [] intPoint =0 while (len(testline)): testline = fileName.re

Re: Form upload passed to ftp method

2009-08-19 Thread Karen Tracey
On Wed, Aug 19, 2009 at 1:06 AM, Jonathan wrote: > > I am trying to write a view that will take a file uploaded via form, > pass it to an ftp method and save it on an ftp server. However I am > running into problems when with the file object that gets passed to > the ftp method. > > This is my v

ANN: Django 0.96.5 released

2009-08-19 Thread James Bennett
Due to an issue with a misapplied patch in the recent Django 0.96.4 security release, tonight the Django project has issued Django 0.96.5. Full information is available here: http://www.djangoproject.com/weblog/2009/aug/19/bugfix/ Please note that this will be the *final* release in the Django

Re: Displaying username on every page

2009-08-19 Thread grahamu
If you use RequestContext(), you automatically get visibility to the current user and their permissions. See http://docs.djangoproject.com/en/dev/topics/auth/#authentication-data-in-templates. My base templates use a block like this: {% block user %} {% if user.is_authenti

Re: Accent-insensitive queryset filter

2009-08-19 Thread Karen Tracey
On Wed, Aug 19, 2009 at 6:47 PM, A Melé wrote: > > Is there any way to perform an accent insensitive match when you are > filtering a queryset? I'm looking for something like iexact (http:// > docs.djangoproject.com/en/dev/ref/models/querysets/#iexact) but accent- > insensitive. Is there any simp

Re: Displaying username on every page

2009-08-19 Thread Kenneth Gonsalves
On Thursday 20 Aug 2009 3:57:13 am John Barham wrote: > I could of course pass in the username as a dictionary value for each > page, but this quickly becomes tedious. I also use render_to_response > a lot and if I understand correctly it doesn't pass through the user > info automatically, but wi

Displaying username on every page

2009-08-19 Thread John Barham
Apologies in advance if this is a FAQ but I've searched the list and can't find a precise answer. I want to display the login status of the user at the top of every page. If they were logged in, it should say something like "Logged is as (Log Out)" and if they're not logged in it should show a

Accent-insensitive queryset filter

2009-08-19 Thread A Melé
Is there any way to perform an accent insensitive match when you are filtering a queryset? I'm looking for something like iexact (http:// docs.djangoproject.com/en/dev/ref/models/querysets/#iexact) but accent- insensitive. Is there any simple way to do it? Thank you! --~--~-~--~~-

Re: Problem with Django/Jython and Postgres backend

2009-08-19 Thread fwierzbicki
On Aug 18, 10:54 am, Brandon Taylor wrote: > Hi everyone, > > I'm getting this exception with the latest Django-Jython and > Jython2.5: What version of Django are you using? What where you doing at the time that you get this error? -Frank --~--~-~--~~~---~--~~

Adding ManyToMany field to django comments

2009-08-19 Thread grahamu
In general, I'm wondering how to retrieve a Queryset provided to a Form (choices for a ManyToMany field) from within a view that only accepts POST data from that form. This isn't really a question about extending django.contrib.comments, but that framework provides a good point of reference for th

Re: How do you remove a manytomany relationship in django?

2009-08-19 Thread Ray
Hi, thanks for the fast response! I'm trying to use the remove function right now just like this sample code: # And from the other end >>> p2.article_set.remove(a5) >>> p2.article_set.all() [] >>> a5.publications.all() [] from http://www.djangoproject.com/documentation/models/many_to_many/ I'm

Re: How do you remove a manytomany relationship in django?

2009-08-19 Thread Daniel Roseman
On Aug 19, 10:09 pm, Ray wrote: > Hi, > thanks for the fast response! I'm trying to use the remove function > right now just like this sample code: > > # And from the other end>>> p2.article_set.remove(a5) > >>> p2.article_set.all() > [] > >>> a5.publications.all() > > [] > > fromhttp://www.djang

Re: PIL & imagefield validation

2009-08-19 Thread zayatzz
OK. Apparently this is not PIL problem. I replaced validation errormessage with custom messages for debugging and i found out that imagefield validation fails here : try: # load() is the only method that can spot a truncated JPEG, # but it cannot be called sanely

Re: PIL & imagefield validation

2009-08-19 Thread zayatzz
I followed the instructions on that website. I used kfind to find all files/folders containing PIL. I removed PIL.pth files and PIL folders from several places. Then i tried importing PIL in python prompt and got the error. - no pil in the system. Then i reinstalled PIL. tested it and got the va

Function fields in admin change view?

2009-08-19 Thread deadguy
Hello, Can you add fields whose values are generated by functions to the admin change view like you can to the list view? They would have to be read only, of course, since there's no db column for them. I'd like them to be presented in the fieldset along with everything else. thanks! --~--~--

Re: custom authentication backend not being used...

2009-08-19 Thread Peter Herndon
On 08/19/2009 02:04 PM, Jay wrote: > Sorry, nevermind. I finally figured this out right after I posted > this. > > What was the solution? Both for posterity, and because I'm personally curious. Thanks, ---Peter --~--~-~--~~~---~--~~ You received this messa

Google app engine patch translation : model_set.all doesnt work

2009-08-19 Thread justin jools
It seems google app engine patch doesnt support _set.all. I have tried my original django only version and it works but with google app engine patch does not. my template code: {% for model in object.product_model_set.all %} {{ model.full_title }} {% endfor %} I dont how / what to replac

Re: custom authentication backend not being used...

2009-08-19 Thread Jay
Sorry, nevermind. I finally figured this out right after I posted this. On Aug 19, 12:48 pm, Jay wrote: > First off, I'm using Django 1.1. > > I've been having problems getting my custom authentication backend to > work, specifically in the "admin" site. > > I've been using this page as guide t

custom authentication backend not being used...

2009-08-19 Thread Jay
First off, I'm using Django 1.1. I've been having problems getting my custom authentication backend to work, specifically in the "admin" site. I've been using this page as guide to put together an auth backend that uses my subclass of the User model to authenticate. http://scottbarnham.com/blog

Re: save a form

2009-08-19 Thread Alex Gaynor
On Wed, Aug 19, 2009 at 11:22 AM, luca72 wrote: > > how i can get the value of the fields? > > On 19 Ago, 17:45, Daniel Roseman wrote: >> On Aug 19, 3:40 pm, luca72 wrote: >> >> > Iis but form.save don't work >> >> That's true. >> -- >> DR. > > > On a validated form the values will be in the di

Re: explanation of: {{ action.action_time|date:_("DATETIME_FORMAT") }}

2009-08-19 Thread Margie
Ah, thank you very much! That makes more sense now. Margie On Aug 18, 4:30 pm, Ramiro Morales wrote: > On Tue, Aug 18, 2009 at 7:08 PM, Margie > > Roginski wrote: > > > I was trying to figure out how to run the date filter, using > > SETTINGS.DATETIME_FORMAT as an argument. > > > When I greppe

Re: Django "freezing" after a few minutes?

2009-08-19 Thread erikcw
Hi Thomas, Thanks for the reply. I have postgres max_connections=100, but when I run "select count(*) from pg_stat_activity;" I only get 2. So I would think that I'm not maxing out the connections. (is that right -- I'm fairly new to Postgres) Here are the results from an strace: # pgrep apac

Re: save a form

2009-08-19 Thread luca72
how i can get the value of the fields? On 19 Ago, 17:45, Daniel Roseman wrote: > On Aug 19, 3:40 pm, luca72 wrote: > > > Iis but form.save don't work > > That's true. > -- > DR. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goo

Re: Error in setting up psycopg2

2009-08-19 Thread Simon Lee
Hi Thomas, Tried your method and modified /mysite3/apache/myapp.wsgi as followed: import os, sys sys.path.append('/Users/myname') sys.path.append('/Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/django') sys.path.append('/Library/Frameworks/Python.framework/Version

Re: Database design question

2009-08-19 Thread ringemup
Validation turns out to be well-nigh impossible using parent / child aliases, but pretty easy with parent / child accounts. Here's what I've ended up with: class Account(models.Model): user = models.ForeignKey(User, unique=True, null=True, blank=True) alias = models.CharField(ma

Re: Problem with "Cancel" button

2009-08-19 Thread David
Thanks Thomas for your reply. I just tested it with Firefox. "Cancel" button works perfect. With IE "Cancel" button has such a problem. Let me do more test and see. On Aug 19, 7:50 am, Thomas Guettler wrote: > Hi David, > > David schrieb: > > > Hello, > > > I have a "Cancel" button on one of m

Re: save a form

2009-08-19 Thread Daniel Roseman
On Aug 19, 3:40 pm, luca72 wrote: > Iis but form.save don't work > That's true. -- DR. --~--~-~--~~~---~--~~ 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@googlegr

Re: That model works on doctests but...

2009-08-19 Thread Daniel Roseman
On Aug 19, 4:14 pm, Mirat Bayrak wrote: > http://dpaste.com/82737/< here is models.py , as you see i wrote > doctests for every model and they are working well. But when i try to > create GeneralProperties or AccomodationProperties from admin page, > when i press save button it gives that error :

Re: is Django a good choice for a LAN app?

2009-08-19 Thread snfctech
UPDATE Looks like the Django multi-DB support didn't quite make it in yet: http://groups.google.com/group/django-developers/browse_thread/thread/267a2fd7104f0209?hl=en On another note, I came across the web2py project, which has multi-db support built in - "table attributes are attributes of a

Re: Database design question

2009-08-19 Thread ringemup
I'm not asking as a Django / foreign key thing. I'm having a lot of trouble referencing each model from the other's save method for validation purposes, because there's always going to be one that's declared after the other. On Aug 19, 10:35 am, Joshua Russo wrote: > You can, it just creates

Re: user profile problems

2009-08-19 Thread Justin
Figured it out. Apparently when I did my intial test I did not have a profile create for the user which was causing a different error. the correct string was 'engine.UserProfile' Justin On Aug 19, 10:11 am, Justin wrote: > I am sure this is a newbie mistake but I can't seem to find exactly >

That model works on doctests but...

2009-08-19 Thread Mirat Bayrak
http://dpaste.com/82737/ < here is models.py , as you see i wrote doctests for every model and they are working well. But when i try to create GeneralProperties or AccomodationProperties from admin page, when i press save button it gives that error : http://dpaste.com/82736/ Do you see what i am

user profile problems

2009-08-19 Thread Justin
I am sure this is a newbie mistake but I can't seem to find exactly the right setting. I have create a user profile class. I am trying to attach into my django project via the AUTH_PROFILE_MODULE setting in the settings.py file. The error I get is as follows when I try to retrieve the profile >

Re: Django "freezing" after a few minutes?

2009-08-19 Thread Thomas Guettler
Just a first guess: How many wsgi-clients access the db server at the same time? Maybe the db does accept only N, while apache/wsgi tries it with N+1. Then the connection could hang. What do the wsgi processes do? You can use "strace -p WSGI-PID" to find this out. You can sent SIGINT (like ctrl

Django "freezing" after a few minutes?

2009-08-19 Thread erikcw
Hi, I'm running Django through mod_wsgi and Apache (2.2.8) on Ubuntu 8.04. I've been running Django on this setup for about 6 months without any problems. Yesterday, I moved my database (postgres 8.3) to its own server, and my Django site started refusing to load (the browser spinner would just

Re: Problem with Django/Jython and Postgres backend

2009-08-19 Thread Thomas Guettler
Hi Brandon, I don't use Jython and not OSX, but if you look at the stacktrace and at the source, you should see the error. Brandon Taylor schrieb: > File "/Users/btaylor/jython2.5.0/Lib/site-packages/doj/backends/ > zxjdbc/postgresql/base.py", line 54, in __init__ > self.client = Database

Re: Check server type at runtime?

2009-08-19 Thread Thomas Guettler
Hi, AFAIK there is no such variable in settings.py. It would be nice to have it. In your company we use the variable STAGE. ringemup schrieb: > Is there any way to check at runtime whether Django is running on the > development server? > > Thanks! -- Thomas Guettler, http://www.thomas-guettl

Running test suite without CREATE permission.

2009-08-19 Thread J. Cliff Dyer
When running a test suite, django starts by creating a test database. I am trying to run it on a webfaction account, and I can create an extra database through the site's control panel, but I can't give django permission to create one. Is there a way to get django to use a pre-existing database

Re: Problem with "Cancel" button

2009-08-19 Thread Thomas Guettler
Hi David, David schrieb: > Hello, > > I have a "Cancel" button on one of my Webpages. The button sometimes > works as expected, sometimes it does not. After the button has been > clicked, it is supposed that the webpage is re-directed to another > page. However, this re-direction seems not work

Re: Error in setting up psycopg2

2009-08-19 Thread Thomas Guettler
Hi, you need to know what sys.path looks like. This is a list of searched directories. try: import # Import lines that failes except ImportError, exc: import sys raise ImportError('%s %s' % (exc, sys.path)) Then check if the stuff you want to import is on sys.path. Simon Lee s

Re: save a form

2009-08-19 Thread luca72
Iis but form.save don't work On 19 Ago, 16:23, Daniel Roseman wrote: > On Aug 19, 3:21 pm, luca72 wrote: > > > Hello i have a POST form (not modelform) how i can save the data in > > the db, and if i need to change the data before the save how i can do? > > > Thanks > > If it's not a modelform,

Re: Database design question

2009-08-19 Thread Joshua Russo
You can, it just creates headaches. At least one of the ForeignKeys needs to not be required (I believe that's the default anyway). On Wed, Aug 19, 2009 at 1:27 PM, ringemup wrote: > > > Is having two classes that reference one another just simply something > that can't be done in Python? > > >

Re: Adding model-specific exceptions like DoesNotExist?

2009-08-19 Thread Joshua Russo
In that case you can create an abstract model class and use that instead of models.Model: class MyModel(models.Model): class Meta: abstract = True class DoesNotExist(Exception): pass On Wed, Aug 19, 2009 at 1:22 PM, Idan Gazit wrote: > > Yes, and then I also need to imp

Re: Database design question

2009-08-19 Thread ringemup
Is having two classes that reference one another just simply something that can't be done in Python? On Aug 19, 4:36 am, Joshua Russo wrote: > On Tue, Aug 18, 2009 at 11:04 PM, ringemup wrote: > > > Well, I'm trying to implement parent / child aliases, but I'm running > > into problems with

Re: save a form

2009-08-19 Thread Daniel Roseman
On Aug 19, 3:21 pm, luca72 wrote: > Hello i have a POST form (not modelform) how i can save the data in > the db, and if i need to change the data before the save how i can do? > > Thanks If it's not a modelform, what does it mean to save it in the database? It's not associated with any model, b

Re: Adding model-specific exceptions like DoesNotExist?

2009-08-19 Thread Idan Gazit
Yes, and then I also need to import that class into every place that I want to use it, no? The benefit of making it part of the model is that any place I'm using it, I already have the exception handy: try: # ... do some things m = MyModel(foo=bar, baz=bling) m.save() except MyModel.

save a form

2009-08-19 Thread luca72
Hello i have a POST form (not modelform) how i can save the data in the db, and if i need to change the data before the save how i can do? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group.

Subselect in query set .extra(tables=...)

2009-08-19 Thread Matt Hoskins
A couple of times I've wanted to be able to pass in a sub query as a table in query_set.extra to be able join in some extra information but have been thwarted as the query code always insists on quoting what you pass in as tables to .extra (i.e. it assumes it's always table names). Back in 2005 w

Re: Adding model-specific exceptions like DoesNotExist?

2009-08-19 Thread Joshua Russo
On Wed, Aug 19, 2009 at 12:56 PM, Idan Gazit wrote: > > Hey all, > > I'd like to add some custom exception to a model of mine, > Foo.FrobNotAllowed, along the lines of ModelName.DoesNotExist. > > From looking at models/base.py, it looks like the pattern is to > override __new__() and use add_to_c

Adding model-specific exceptions like DoesNotExist?

2009-08-19 Thread Idan Gazit
Hey all, I'd like to add some custom exception to a model of mine, Foo.FrobNotAllowed, along the lines of ModelName.DoesNotExist. >From looking at models/base.py, it looks like the pattern is to override __new__() and use add_to_class. Something like: def __new__(cls, name, bases, attrs): n

Re: new session ID is created for every request from IE 7

2009-08-19 Thread Kelvan
Setting SESSION_ENGINE to 'django.contrib.sessions.backends.cached_db' in Django 1.1 solved my problem. Sorry for my "spam". On Aug 19, 2:03 pm, Kelvan wrote: > Tested without apache on the server, seems to work. > I think my problem has another reason. > > On Aug 19, 1:05 pm, Kelvan wrote: > >

Re: new session ID is created for every request from IE 7

2009-08-19 Thread Maksymus007
On Thu, Aug 13, 2009 at 4:21 AM, humble wrote: > > Hi, > > I am writing a web application that involves session management with > the corporate backend module. I wrote my own authentication backend > plugin to satisfy the corporate requirement, not the default > authentication backend. I use file

Re: new session ID is created for every request from IE 7

2009-08-19 Thread Kelvan
Tested without apache on the server, seems to work. I think my problem has another reason. On Aug 19, 1:05 pm, Kelvan wrote: > I have a similar problem with FF and Etch (with Django 1.0 and 1.1 > tested). > Works when running on my notebook (Ubuntu 9.10a4 with Django 1.1). > I'm using Apache/mod

Re: new session ID is created for every request from IE 7

2009-08-19 Thread Kelvan
I have a similar problem with FF and Etch (with Django 1.0 and 1.1 tested). Works when running on my notebook (Ubuntu 9.10a4 with Django 1.1). I'm using Apache/mod_python. On 13 Aug., 23:07, humble wrote: > Hi Malcolm > > Thanks for your suggestion. I did to try using a FQDN to configure IE > fo

Re: OT: Drawing lines in the browser

2009-08-19 Thread Thomas Guettler
Chris McCormick schrieb: > On Tue, Aug 18, 2009 at 07:40:00AM -0700, Ian McDowall wrote: >> On Aug 18, 8:53 am, Thomas Guettler wrote: >>> Hi, >>> >>> this is offtopic: How can you draw lines in a (django) web application? >>> >>> I think you need to use flash or java to do it. I googled for it

Re: Database design question

2009-08-19 Thread Joshua Russo
On Tue, Aug 18, 2009 at 11:04 PM, ringemup wrote: > > Well, I'm trying to implement parent / child aliases, but I'm running > into problems with class declaration order because I need to reference > the Alias class from within the Account class as well as referencing > Account from Alias for valid

Re: how to access ForeignKey models properties?

2009-08-19 Thread Marek Palatinus
On Wed, Aug 19, 2009 at 10:04 AM, Daniel Roseman wrote: > photo_set = models.ForeignKey(PhotoSet, blank=True, null=True) Are you sure you have set up data in database correctly? Your model allow null value in photo_set, so maybe everything is working well and you forgot to fill database... ;) Ma

Re: how to access ForeignKey models properties?

2009-08-19 Thread Daniel Roseman
On Aug 18, 10:48 pm, onoxo wrote: > this is my model.py: > > class Event(models.Model): >     title = models.CharField('Event Name', max_length=300) >     photo_set = models.ForeignKey(PhotoSet, blank=True, null=True) > > class PhotoSet(models.Model): >     title = models.CharField(max_length=300

Re: template syntax

2009-08-19 Thread Daniel Roseman
On Aug 19, 8:55 am, elminio wrote: > You don't understand me. > WQhat I want to achieve is to use student.id as a key in dictionary > (Im talking abous template) > If I use: > > {% for student in students %} > > ... do sth ... > > {{dictionary.student.id }} > > {% endfor %} > > using dictionary

Re: template syntax

2009-08-19 Thread elminio
You don't understand me. WQhat I want to achieve is to use student.id as a key in dictionary (Im talking abous template) If I use: {% for student in students %} ... do sth ... {{dictionary.student.id }} {% endfor %} using dictionary.1 works using dictionary.student.id doesnt work because th

Re: OK to put app_directories before filesystem template loader?

2009-08-19 Thread David Christiansen
Well, it doesn't seem to make much sense to me. I use the default order so that I can place files in a site-level templates directory in order to override the default templates in the app directory without having to directly open it up and modify its template files. -David Christiansen On Aug 1

Re: Flatpages - what am I missing to make these work (advice, please)?

2009-08-19 Thread gegard
Thank you! That has resolved my problem. The admin shell does not show the site id number by default, so I supposed that removing the default 'example.com' and adding 'mysite' would enable Django to reuse id 1. I should have assumed otherwise - the new site was id == 2, of course. I should have e

Re: how to access ForeignKey models properties?

2009-08-19 Thread onoxo
someone? i need this today... tnx! On Aug 18, 11:48 pm, onoxo wrote: > this is my model.py: > > class Event(models.Model): >     title = models.CharField('Event Name', max_length=300) >     photo_set = models.ForeignKey(PhotoSet, blank=True, null=True) > > class PhotoSet(models.Model): >     tit

Re: Using custom table instead of "user" in django

2009-08-19 Thread Marek Wawrzyczek
How about writting adapter to the django user class? It can have descriptor for login (getting login would return users email). While creating such user login would be set (only once, during creation) for example the following value: user id converted to string preceded by one character. For other