Re: Why is my string not auto escaped?

2008-10-29 Thread shabda
So if these built in filters are marking my strings safe, inspite of unsafe data being passed in, should they not handle escaping as well? Rajesh Dhawan wrote: > On Oct 29, 8:35 am, shabda <[EMAIL PROTECTED]> wrote: > > I need to create a custom filter which displays some data from db > >

Re: Form with 2 models

2008-10-29 Thread Paddy Joy
Masklinn wrote: > On 29 Oct 2008, at 15:06 , Paddy Joy wrote: > > Is there an easy way of doing this or do I need to create a custom > > form that contains the fields of both models and then separate the > > data in my view? > > > > Paddy > > What's wrong with creating two different Forms (one

Trying to avoid duplicate form posts/database inserts

2008-10-29 Thread Stan Dyck
I'm converting a simple database-backed web form to Django. Each form submit inserts a row into a database. To avoid multiple posts inserting duplicate rows I calculate a checksum on selected fields in the form and insert the checksum value into the database along with the form data itself.

Migrating strings from MySQL latin1 to Postgres UTF-8

2008-10-29 Thread perchance
Anyone know a good way to transform latin 1 foreign characters from MySQL into UTF-8 for insertion into Postgres? I feel like I'm missing something obvious. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: 'RegistrationForm' object has no attribute 'clean_data'

2008-10-29 Thread Tsinga
I searched and replaced clean_data with cleaned_data! It's working now! Great.. Thanks!!! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: 'RegistrationForm' object has no attribute 'clean_data'

2008-10-29 Thread Karen Tracey
On Wed, Oct 29, 2008 at 11:05 PM, Tsinga <[EMAIL PROTECTED]> wrote: > > I am working with a new book (Learning Website Development with > Django) from Ayman Hourieh. > I am going through the application presented in that book. > The change you are having trouble with (clean_data renamed to

Re: 'RegistrationForm' object has no attribute 'clean_data'

2008-10-29 Thread Steve Holden
Tsinga wrote: > I am working with a new book (Learning Website Development with > Django) from Ayman Hourieh. > I am going through the application presented in that book. > If you want people who *don't* have the book to help you, you should provide a little more information. I realise that

Re: Form with 2 models

2008-10-29 Thread Steve Holden
Masklinn wrote: > On 29 Oct 2008, at 15:06 , Paddy Joy wrote: >> Is there an easy way of doing this or do I need to create a custom >> form that contains the fields of both models and then separate the >> data in my view? >> >> Paddy > > What's wrong with creating two different Forms (one for

Re: 'RegistrationForm' object has no attribute 'clean_data'

2008-10-29 Thread Tsinga
I am working with a new book (Learning Website Development with Django) from Ayman Hourieh. I am going through the application presented in that book. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: 'RegistrationForm' object has no attribute 'clean_data'

2008-10-29 Thread Karen Tracey
On Wed, Oct 29, 2008 at 10:38 PM, Tsinga <[EMAIL PROTECTED]> wrote: > > Hey guys, > > I am a newbie to Django, and I am having trouble. Need help! This is > the Traceback: > > Environment: > > Request Method: POST > Request URL: http://127.0.0.1:8000/register/ > Django Version:

'RegistrationForm' object has no attribute 'clean_data'

2008-10-29 Thread Tsinga
Hey guys, I am a newbie to Django, and I am having trouble. Need help! This is the Traceback: Environment: Request Method: POST Request URL: http://127.0.0.1:8000/register/ Django Version: 1.0-final-SVN-unknown Python Version: 2.5.2 Installed Applications: ['django.contrib.auth',

Re: Filter on multiple fields and/or multiple values...

2008-10-29 Thread Ronny Haryanto
On Thu, Oct 30, 2008 at 8:31 AM, megrez80 <[EMAIL PROTECTED]> wrote: > I want to do something like the following: > > my_query_set = my_table.objects.filter(field1 = some_val and > field2 = another_val) > > or > my_query_set = my_model.objects.filter(field1 = some_val or >

How to pass a special character in url

2008-10-29 Thread Zeal
Hi, All, I just want to pass a special character by using url to the proper view. For example, "http://127.0.0.1/sampleview/?obj=xxx; , but seems django cannot handle such pattern. Does any one know this, or are there any relevant doc I can learn for this. Your precious suggestion would be

Migrate app from MySQL to PostgreSQL

2008-10-29 Thread Naitik Shah
I looked around but didn't find anything obvious or simple. This is a live Django app with data in MySQL which I want to migrate to PostgreSQL. Suggestions? (Before I do my own thing :)) -Naitik --~--~-~--~~~---~--~~ You received this message because you are

Filter on multiple fields and/or multiple values...

2008-10-29 Thread megrez80
Hello, I want to do something like the following: my_query_set = my_table.objects.filter(field1 = some_val and field2 = another_val) or my_query_set = my_model.objects.filter(field1 = some_val or field1 = another_val) I couldn't find anything in the docs that describes

Re: Admin Interface for Searching Only

2008-10-29 Thread Sean
Although Data Browser is interesting. I was hoping for something much closer to the admin interface, but for viewing and searching. It would seem like DRY would suggest that using the admin interface for read- only access would actually be the right way to do this, simply making someone staff,

Re: Using raw_id_fields with a many-to-many field

2008-10-29 Thread Brian Rosner
On Wed, Oct 29, 2008 at 4:35 PM, AndrewD <[EMAIL PROTECTED]> wrote: > > # models.py > class Membership(models.Model): > person = models.ForeignKey(Person) > group = models.ForeignKey(Group) > > # admin.py > class MembershipInline(admin.TabularInline): > model = Membership

Re: Using raw_id_fields with a many-to-many field

2008-10-29 Thread AndrewD
I have a ManyToMany field that works as a raw_id_fields item. It is an intermediary ManyToMany model class using the through='ClassName' feature. The admin.py shows that ManyToMany model using an Inline admin class. The Inline class has the raw_id_fields and extras attributes. Here is an example

Re: Custom change list and list_display

2008-10-29 Thread Fabio Natali
Rajesh Dhawan wrote: > Hi Fabio, > > > I have to create a summary page for one of my models. With "summary > > page" I mean a table where each item of my model is listed along with > > its properties/values. [...] Rajesh, your explanation is very clear and full of details. Thank you so much!

Re: unable to open database file - sqlite3/apache problem - help?

2008-10-29 Thread Jason Sidabras
this solution doesn't fix it for me. i have my db in /var/www/myproject/databasefile and i've just simply `chmod 777` the parent directory On Oct 17, 1:22 pm, Emilio <[EMAIL PROTECTED]> wrote: > I found the solution: > > http://django.freelancernepal.com/errors/django-says-unable-to-open-d... >

Re: Test failures with SQLite :memory: database - contenttypes, auth and sites

2008-10-29 Thread Chris H.
Brian, Thanks for the reply! On Oct 28, 4:57 pm, Brian Gershon <[EMAIL PROTECTED]> wrote: > I just ran into this same issue.  I eventually figured out that adding > TEST_DATABASE_NAME to settings.py (to prevent Django from using the > default memory database for sqlite) works around the issue.

Re: Form with 2 models

2008-10-29 Thread Masklinn
On 29 Oct 2008, at 15:06 , Paddy Joy wrote: > Is there an easy way of doing this or do I need to create a custom > form that contains the fields of both models and then separate the > data in my view? > > Paddy What's wrong with creating two different Forms (one for the account, one for the

Re: Admin page: How to add a column for user that added an item

2008-10-29 Thread Steve Holden
Robert Dailey wrote: > On Oct 28, 2:47 pm, Robert Dailey <[EMAIL PROTECTED]> wrote: > >> On Oct 28, 11:17 am, Steve Holden <[EMAIL PROTECTED]> wrote: >> [...] >> >> I'm have some more questions for you if you don't mind. When I add a >> note, now there is a combo box with a list of users to

Re: Why is my string not auto escaped?

2008-10-29 Thread Rajesh Dhawan
On Oct 29, 8:35 am, shabda <[EMAIL PROTECTED]> wrote: > I need to create a custom filter which displays some data from db > depending on its data type. > > My code is something like, > > from django.template.defaultfilters import linebreaks, urlize > > def filterxx(data) > return

Re: Form with 2 models

2008-10-29 Thread Rajesh Dhawan
Hi Paddy, > I have an Account model: > > class Account(models.Model): > > accountname = models.CharField(max_length=50, unique=True) > owner = models.ForeignKey(User) > admins = models.ManyToManyField(User, related_name='admins', > blank=True) > accounts =

Re: best practice to change allowed characters in a username

2008-10-29 Thread Jarek Zgoda
Wiadomość napisana w dniu 2008-10-29, o godz. 16:57, przez Benedict Verheyen: >> You have to unregister the admin class for User model before >> registering your own. > > Thanks, that seems to solve the register error. > However, the other question remains, is the way i'm going about to >

Re: Custom change list and list_display

2008-10-29 Thread Rajesh Dhawan
Hi Fabio, > I have to create a summary page for one of my models. With "summary > page" I mean a table where each item of my model is listed along with > its properties/values. > > Some of those properties/values are fields of the db itself, while > other values are calculated on the fly (maybe

How to chain filters with multi-value realtions?

2008-10-29 Thread Peter Krantz
Hi! I am new to Django and just discovered an issue when trying to filter querysets with multi-value relations. Let's say I have a Article and Tag model where an Article can have many Tags. I have a use case where a bunch of get parameters filters the list of articles based on Article model

Re: Admin Interface for Searching Only

2008-10-29 Thread Sean
I just found this: http://www.djangoproject.com/documentation/databrowse/ but other input is welcome. Thanks, Sean On Oct 29, 9:43 am, Sean <[EMAIL PROTECTED]> wrote: > I add a staff user with no additional permission to my admin > interface, hoping that they would be able to use the

Re: Admin page: How to add a column for user that added an item

2008-10-29 Thread barbara shaurette
You need a save_model() method in your corresponding admin class: def save_model(self, request, obj, form, change): obj.user = request.user obj.save() http://docs.djangoproject.com/en/dev/ref/contrib/admin/#modeladmin-methods

Admin Interface for Searching Only

2008-10-29 Thread Sean
I add a staff user with no additional permission to my admin interface, hoping that they would be able to use the interface for searching, but unfortunately since they do not have permissions to edit anything they seem unable to search either. At the moment, I would actually prefer to use this

Custom change list and list_display

2008-10-29 Thread Fabio Natali
Hi everybody! I have to create a summary page for one of my models. With "summary page" I mean a table where each item of my model is listed along with its properties/values. Some of those properties/values are fields of the db itself, while other values are calculated on the fly (maybe with a

Re: Email notification on updates?

2008-10-29 Thread [EMAIL PROTECTED]
Thanks Brian. The Observer in notification doesn't help me (I'd rather keep my existing observer). The more I look at it, the more notification looks like a nice piece of work. I just don't know how much I'll end up reworking it for my purposes.

Re: Where to put signals?

2008-10-29 Thread Benjamin Buch
Hi Adi, Radov proposed the same, I just answered to his reply... It works like you two guys said! Danke! benjamin Am 29.10.2008 um 17:04 schrieb Adi Jörg Sieker: > > On 29.10.2008 12:49 Uhr, Benjamin Buch wrote: >> >> >> Why do I have to set an environment variable for this? >> Django never

Re: Where to put signals?

2008-10-29 Thread Benjamin Buch
Hi Radovan, thanks for your reply! Am 29.10.2008 um 13:07 schrieb urukay: > Benjamin, i did't have to use singnals so far, but when something is > needed > in various app (models), i create new app and put it there (e.g. > signals.py). > And you don't have to bother with cross imports

Re: Where to put signals?

2008-10-29 Thread Adi Jörg Sieker
On 29.10.2008 12:49 Uhr, Benjamin Buch wrote: > The thing is, I don't want to tie the comments signals to a specific > application. > It's more of a project-wide thing. > > So I did put the code into signals.py, stuffed it into my project root > (not in an app) > and imported it in my project's

Re: Django along with PHP - avoiding Apache crashes

2008-10-29 Thread Giles Thomas
Graham, Thanks once again. > There is still the risk of conflicts as Python module is using a > reentrant version of library and PHP isn't. > OK, that makes sense. I guess we need to recompile PHP5, then. Regards, Giles -- Giles Thomas MD & CTO, Resolver Systems Ltd. [EMAIL PROTECTED]

Re: Email notification on updates?

2008-10-29 Thread Brian Rosner
On Wed, Oct 29, 2008 at 8:26 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I have a very simple "watchlist" app which allows people to keep an > eye on their favorite bits of content on the site... forum topics, > cars, articles, etc. Not much to it--it simply stores the object and > who's

Re: best practice to change allowed characters in a username

2008-10-29 Thread Benedict Verheyen
Jarek Zgoda wrote: > You have to unregister the admin class for User model before > registering your own. Thanks, that seems to solve the register error. However, the other question remains, is the way i'm going about to change the allowed characters ok? Thanks, Benedict

Re: best practice to change allowed characters in a username

2008-10-29 Thread Jarek Zgoda
Wiadomość napisana w dniu 2008-10-29, o godz. 16:39, przez Benedict Verheyen: > I tried to override the 2 forms in my models.py file > > class MyUserCreationForm(UserCreationForm): >username = forms.RegexField(label=_("Username"), max_length=30, > regex=r'[EMAIL PROTECTED]', >

best practice to change allowed characters in a username

2008-10-29 Thread Benedict Verheyen
Hi, i want to know what the best practice is for following problem. I use the built in user authentication framework. I've already made the login authenticate against our AD. Works fine (see http://www.djangosnippets.org/snippets/901/) In our company, usernames are specified with a period

Re: cannot import name call_command

2008-10-29 Thread Karen Tracey
On Wed, Oct 29, 2008 at 11:05 AM, noureddine <[EMAIL PROTECTED]> wrote: > > i have this problem > is there anybody hwo know the solution. > please tell me. > You've specified the wrong import, or the wrong pythonpath, or have a corrupt installation, or ...? Without some specifics of what you are

generic query builder

2008-10-29 Thread Thomas Guettler
Hi, has someone written a generic query builder? The view should take a model class as argument and create a HTML form for creating a query. Foreignkey relationships should be followed... Integer and date fields should be queryable with ranges... Last: Ordering of the result should be

cannot import name call_command

2008-10-29 Thread noureddine
i have this problem is there anybody hwo know the solution. please tell me. --~--~-~--~~~---~--~~ 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

Re: Admin page: How to add a column for user that added an item

2008-10-29 Thread Robert Dailey
On Oct 28, 2:47 pm, Robert Dailey <[EMAIL PROTECTED]> wrote: > On Oct 28, 11:17 am, Steve Holden <[EMAIL PROTECTED]> wrote: > > > > > Robert Dailey wrote: > > > On Oct 28, 10:29 am, Steve Holden <[EMAIL PROTECTED]> wrote: > > > >> Robert Dailey wrote: > > > >>> Hi, > > > >>> I currently have the

Email notification on updates?

2008-10-29 Thread [EMAIL PROTECTED]
I have a very simple "watchlist" app which allows people to keep an eye on their favorite bits of content on the site... forum topics, cars, articles, etc. Not much to it--it simply stores the object and who's watching it: class Watch(models.Model): subscriber = models.ForeignKey(User,

Re: Is this a quirk with the admin template override mechanism or is it me?

2008-10-29 Thread Steve Holden
AndyB wrote: > I can see why it would fail - but I still wonder whether the current > behaviour is ideal. I would say that it's more likely someone would > want to override a template project wide and I can't see a neat way to > do this. > The easiest way would surely be to add another

Re: Is this a quirk with the admin template override mechanism or is it me?

2008-10-29 Thread AndyB
I can see why it would fail - but I still wonder whether the current behaviour is ideal. I would say that it's more likely someone would want to override a template project wide and I can't see a neat way to do this. --~--~-~--~~~---~--~~ You received this message

Form with 2 models

2008-10-29 Thread Paddy Joy
I have an Account model: class Account(models.Model): accountname = models.CharField(max_length=50, unique=True) owner = models.ForeignKey(User) admins = models.ManyToManyField(User, related_name='admins', blank=True) accounts = models.ManyToManyField(User,

Re: Easiest way to pass django documentation from rest to HTML?

2008-10-29 Thread Mr. Z
Ok. Thank you James. On 29 oct, 12:31, "James Bennett" <[EMAIL PROTECTED]> wrote: > On Wed, Oct 29, 2008 at 5:59 AM,Mr.Z<[EMAIL PROTECTED]> wrote: > > Thank you both. I'm trying to create a view that converts the ReST > > documentation to HTML and shows it integrated with my templates, but > >

Re: Is this a quirk with the admin template override mechanism or is it me?

2008-10-29 Thread Robert Lofthouse
On Oct 29, 1:14 pm, AndyB <[EMAIL PROTECTED]> wrote: > Let's say I want to override change_list.html for an app called 'cms'. > > I create a /admin/cms/change_list.html > > and then call back to the original admin template overriding just want > I want to change: > > {% extends

Is this a quirk with the admin template override mechanism or is it me?

2008-10-29 Thread AndyB
Let's say I want to override change_list.html for an app called 'cms'. I create a /admin/cms/change_list.html and then call back to the original admin template overriding just want I want to change: {% extends "admin/change_list.html" %} {% block extrahead %} ... {% endblock %} However if I

Re: sql query to insert into table

2008-10-29 Thread Tim Chase
> Why do you want to use raw SQL? What's wrong with using the normal > Django ORM? One reason that I use in my own code is to snapshot multiple values efficiently, a'la: INSERT INTO stored_groups (statementitem_id, groupname, groupvalue) SELECT si.id, g.groupname, gv.groupvalue

Re: 500 displayed instead of 404

2008-10-29 Thread Thomas Guettler
> Thanks to all who answered, now I'll go looking for the person who > messed with the development machine. > Everybody can make mistakes. The root of the problem is (or was) that you don't see tracebacks if settings.DEBUG=False. I see them in the apache error log. I use mod_wsgi. Thomas

PyCon 2009 - Call for tutorials nearing the end

2008-10-29 Thread Greg Lindstrom
The period for submitting tutorial proposals for Pycon 2009 (US) is open and will continue through Friday, October 31th. This year features two "pre-conference" days devoted to tutorials on Wednesday March 25 & Thursday March 26 in Chicago. This allows for more classes than ever. Tutorials are

Re: Triggering a custom signal

2008-10-29 Thread redmonkey
Exactly that. Here's what I put together: class Catalogue(models.Model): ... everything above ... # Added field to store reference to at-job number at_job_number = models.IntegerField(editable=False) def save(self, **kwargs): self.create_at_job()# new method

Why is my string not auto escaped?

2008-10-29 Thread shabda
I need to create a custom filter which displays some data from db depending on its data type. My code is something like, from django.template.defaultfilters import linebreaks, urlize def filterxx(data) return linebreaks(urlize(data.value)) My data.value is Asdfghjkl alert('hole') This

Re: Where to put signals?

2008-10-29 Thread urukay
Benjamin, i did't have to use singnals so far, but when something is needed in various app (models), i create new app and put it there (e.g. signals.py). And you don't have to bother with cross imports exceptions, can change everything in one place for each model etc. Radovan -- View this

Re: looping to create an array of category breadcrumbs

2008-10-29 Thread Dj Gilcrease
def get_parent(self): if self.parent: return [self.parent] return [] def get_parent_tree(self): asc = self.get_parent() for p in asc: asc.extend(p.get_parent()) return asc This is what I use for generating a category crumb

Re: sql query to insert into table

2008-10-29 Thread limas
thank u very much for ur reply.. i were just stuck in my project.It helps me realy... thanks... On 29 Oct, 16:42, Daniel Roseman <[EMAIL PROTECTED]> wrote: > On Oct 29, 10:26 am, limas <[EMAIL PROTECTED]> wrote: > > > hello > > > i am new in django. > > i want to insert values into two

Re: running django from apache2 or from runserver behaves different when using custom admin templates and css

2008-10-29 Thread anonymous
I forgot to say that my problem is different from http://docs.djangoproject.com/en/dev/howto/deployment/modpython/#id3 , as I want to use my custom css and js that lives in myproj/myapp/ static but not those that live ni django/contrib/admin/media. What is more, I wouldn't want to change anything

Re: Where to put signals?

2008-10-29 Thread Benjamin Buch
The thing is, I don't want to tie the comments signals to a specific application. It's more of a project-wide thing. So I did put the code into signals.py, stuffed it into my project root (not in an app) and imported it in my project's __init__.py. Now I get this Error if I try to

Re: sql query to insert into table

2008-10-29 Thread Daniel Roseman
On Oct 29, 10:26 am, limas <[EMAIL PROTECTED]> wrote: > hello > > i am new in django. > i want to insert values into two tables from a single form. > i think ModelForm didnot work for this. > Can i use raw sql query to insert into tables. i am using mysql and > latest subversion of django. > >

Re: Easiest way to pass django documentation from rest to HTML?

2008-10-29 Thread James Bennett
On Wed, Oct 29, 2008 at 5:59 AM, Mr. Z <[EMAIL PROTECTED]> wrote: > Thank you both. I'm trying to create a view that converts the ReST > documentation to HTML and shows it integrated with my templates, but > with docutils it gives out a lot of errors. And with sphinx it just > generates plain

Re: 25 new messages in 15 topics - digest

2008-10-29 Thread Stephen Wolff
Is there anything like this for Django? http://www.sitepoint.com/blogs/2008/10/24/rails-rumble-245000-lines-of-code-in-48-hours/ I know sprints exist for work on the Django core - but is anyone interested in a Django web app session similar to the Rails one metioned in this article? Stephen

Re: Splitting models.py won't install models

2008-10-29 Thread Alistair Marshall
Ok, perhaps this is a pinax issue? I would not have thought that it would have made a difference but I'll try asking on the pinax list. Thanks for your help --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: Where to put signals?

2008-10-29 Thread Adi Jörg Sieker
Since a django application is a normal python module you could create a signals.py and import it in your applications __init__.py or whatever pleases you. a django application can contain whatever new files modules you want. It has to respect somethings so that django recognises it as an

Re: Easiest way to pass django documentation from rest to HTML?

2008-10-29 Thread Mr. Z
Thank you both. I'm trying to create a view that converts the ReST documentation to HTML and shows it integrated with my templates, but with docutils it gives out a lot of errors. And with sphinx it just generates plain complete html files with links beteween them :( How could I do it? Thank

running django from apache2 or from runserver behaves different when using custom admin templates and css

2008-10-29 Thread anonymous
The custom admin templates I've put into my application templates/ admin folder are ignored when I'm using apache2 (http:// myapp.mydomain.org) but are running when I'm using runserver (http:// localhost:8000). On the contrary, custom admin css and js are running when using apache2 but aren't

Are Querysets threadsafe?

2008-10-29 Thread Will McGugan
Hi, Are querysets threadsafe? i.e. If a query set object is shared across requests, will it cause any issues? I ask because some of the code in django/db/models/query.py looks like it might access the same resources if called simultaneously from two threads. Regards, Will McGugan

Re: looping to create an array of category breadcrumbs

2008-10-29 Thread coderb
hi Thomas, thanks for all the details, actually my post was not really clear on what I have. the category model looks like this: class Category(models.Model): name = models.CharField(max_length=100, unique=True) slug = models.SlugField(max_length=100, unique=True)

sql query to insert into table

2008-10-29 Thread limas
hello i am new in django. i want to insert values into two tables from a single form. i think ModelForm didnot work for this. Can i use raw sql query to insert into tables. i am using mysql and latest subversion of django. please give me some sugessions.

Re: comment_was_posted

2008-10-29 Thread Eric Abrahamsen
On Oct 29, 2008, at 6:01 PM, sam wrote: > > hello, > > I try to redirect a user who comments a post on my blog to the same > page, > to do that, i need to use the signal : 'comment_was_posted' > > i have put the code below in my blog 'models.py' to be sure it has > been loaded, > but when i

comment_was_posted

2008-10-29 Thread sam
hello, I try to redirect a user who comments a post on my blog to the same page, to do that, i need to use the signal : 'comment_was_posted' i have put the code below in my blog 'models.py' to be sure it has been loaded, but when i post a new message, i'm not redirected to google ... from

Re: help for Date base generic views

2008-10-29 Thread Jarek Zgoda
Wiadomość napisana w dniu 2008-10-29, o godz. 10:02, przez please smile: > Hi All, > Can anyone please send me a small date based generic view > application . > Thank You. There is good explanation of date-based generic views in Practical Django Projects (Chapter 4).

Re: help for Date base generic views

2008-10-29 Thread pihentagy
Metoo. I also don't quite understand how can I use it easily. On Oct 29, 10:02 am, "please smile" <[EMAIL PROTECTED]> wrote: > Hi All, >           Can anyone please send me a small date based generic view > application . >          Thank You.

help for Date base generic views

2008-10-29 Thread please smile
Hi All, Can anyone please send me a small date based generic view application . Thank You. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: 500 displayed instead of 404

2008-10-29 Thread janedenone
Hi all, I found the solution. Someone (not me!) changed the django.views.defaults.page_not_found(). The first line of the method definition read def page_not_found(request, template_name='404_default.html'): instead of def page_not_found(request, template_name='404.html'): Thanks to all who

Re: File upload problem

2008-10-29 Thread Benedict Verheyen
Roodie wrote: > Hello, > > I have an interesting problem. One of the users of my ( test ) django > site reported that he cannot upload image banners to the site using > the custom admin. I've checked the logs, and found the following > exception logged: > > Traceback (most recent call last): >

File upload problem

2008-10-29 Thread Roodie
Hello, I have an interesting problem. One of the users of my ( test ) django site reported that he cannot upload image banners to the site using the custom admin. I've checked the logs, and found the following exception logged: Traceback (most recent call last): File

Re: Where to put signals?

2008-10-29 Thread Benjamin Buch
Hi, short summary for all who didn't follow or don't remember (it's been a while since the last reply...): I have signals wired up for comments (email-notification on commenting). Users are allowed to comment on three different models. Where should the code live? Am 29.09.2008 um 14:36

Re: Getting a NameError: global name 'Lesson' is not defined

2008-10-29 Thread Daniel Strasser
Thank you very much for your precise answer. I think I misunderstood a lot and I will go through the tutorial again. On 28 Okt., 15:04, bruno desthuilliers <[EMAIL PROTECTED]> wrote: > On 28 oct, 14:05,DanielStrasser<[EMAIL PROTECTED]> wrote: > > > > You have a circular reference between

Re: Django full text search best solution

2008-10-29 Thread Thomas Guettler
alain D. schrieb: > Being inside database transactions is a good reason to use database's > full text index ... but the sake of simplicity, a full text index > created by python code inside the models declaration (easily > maintainable) would be nice ... > > > This is inside the model

Re: Splitting models.py won't install models

2008-10-29 Thread patrickk
strange. I´m using this for one of my applications and it works fine. hers´s my setup: /library/ __init__.py admin.py views.py /models/ __init__.py addon.py camera.py material.py __init__.py (in the models-directory): from library.models.material

Re: looping to create an array of category breadcrumbs

2008-10-29 Thread Thomas Guettler
Hi, Does this help you? myslug=... parents=[] while myslug: cat_crumb=Category.objects.get(slug=myslug) # I guess slug is unique parents.append(cat_crumb) myslug=cat_crumb.parent But be careful, you might get infinite loops if the parent links to a child. To avoid this you could

Problem with pyExcelerator and response

2008-10-29 Thread laspal
Hi, I am trying to create Excel file using pyExcelerator but my problem is I am not able to attach file to response. code : workbook = Workbook() worksheet = workbook.add_sheet('My Test Sheet') worksheet.write(0,0, 'Company', font_style('left', 1, 'red')) worksheet.write(1,1,