Re: Django Flatpages With Memcache as storage location

2007-09-16 Thread Ross Poulton
Try creating a template called '404.html' (Even if it's empty for starters; but you should put a useful message in there before go-live) and see if your flatpages work with Debug turned off. --~--~-~--~~~---~--~~ You received this message because you are subscribe

sending email with cc

2007-09-16 Thread medhat
Hi, I am trying to send an email from one of my views. I found http://www.djangoproject.com/documentation/email/ but I need to include people in the cc list of the message, and that page does not mention anything about cc! I tried the following: msg = EmailMessage(subject, body, frm, to, headers

Re: Efficient way to import many-to-many relations

2007-09-16 Thread Russell Keith-Magee
On 9/17/07, Julio César Carrascal Urquijo <[EMAIL PROTECTED]> wrote: > > def import_from_file(filename): > ... > for r in product_records(file): > p = Product() > p.code = r['code'] > p.parent = Product.get(code = r['parent_code']) > ... > p.save() >

Re: Directed graph implementations for Django

2007-09-16 Thread Julio César Carrascal Urquijo
I'm a newbie on Django my self but maybe this is what you are looking for: class Category(models.Model): code = models.CharField(maxlength=200, unique=True) products = models.ManyToManyField('Product') class Product(models.Model): parent = models.ForeignKey('Post')

Efficient way to import many-to-many relations

2007-09-16 Thread Julio César Carrascal Urquijo
I have the following models (Well, very simplified): class Category(models.Model): code = models.CharField(maxlength=200, unique=True) posts = models.ManyToManyField('Post') class Product(models.Model): parent = models.ForeignKey('Post') code = models.CharField(ma

Re: Django Flatpages With Memcache as storage location

2007-09-16 Thread Peter Pluta
Peter Pluta wrote: > > > > > On Sep 9, 8:52 pm, Brian Morton <[EMAIL PROTECTED]> wrote: >> What happens if you use a simple or dummy cache? >> >> On Sep 9, 2:51 pm, Sasha Weberov <[EMAIL PROTECTED]> wrote: >> >> >> >> > On Sep 9, 6:15 am, Thomas Badran <[EMAIL PROTECTED]> wrote: >> >> > > M

Directed graph implementations for Django

2007-09-16 Thread Paul Dorman
Hi all, definite newbie here. I'd like to implement a category type system in Django. I've looked in the cookbook and Googled a bit, but to no avail. What I'm after should be pretty simple: a directed graph for categories, where objects and perhaps categories can be a member of one or more categor

Re: export data to txt file

2007-09-16 Thread Russell Keith-Magee
On 9/17/07, Joaquin Quintas <[EMAIL PROTECTED]> wrote: > > Gjango users... i am new usign django, and this is my first > requirement, i have not idea.. please HELP! > i have a function that exports data to xml, now the users wants that > the same function exports to tt file.. What exactly do you

Re: testing questions

2007-09-16 Thread Russell Keith-Magee
On 9/17/07, john <[EMAIL PROTECTED]> wrote: > > coming from Rails so any help appreciated > > 1) I realize you can use doctests or unit tests - but is one > recommended over the other ? Not particularly. They both have their advantages. doctests are very easy to set up, and are very easy to read

testing questions

2007-09-16 Thread john
coming from Rails so any help appreciated 1) I realize you can use doctests or unit tests - but is one recommended over the other ? 2) Is it recommended to have unit tests within each class in the models.py file or in a separate testing file ? 3) Fixtures using json (I assume json is the recomm

"online/offline status" on user profile

2007-09-16 Thread johnny
What I want to do is display "online/offline status" on user profile? anybody have an idea how to get information about user is logged in(active session) or not? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Dja

Re: Obtaining newforms field values in a template

2007-09-16 Thread [EMAIL PROTECTED]
Collin, Thanks for the response. I don't want to use the built-in rendering, that's the thing. I'm building my form fields with a Javascript library, and using the Django newforms for the server-side validation goodness. As a result, I just want the value that's going to be displayed, bound or

Re: Setting "blank" to one Field?

2007-09-16 Thread Collin Grady
You've misunderstood - you need blank=True /and/ null=True. blank=True will tell admin to let you pick nothing for it, and null=True will then allow the NULL value to be entered. NULL is what you use to signify "unset" on a ForeignKey --~--~-~--~~~---~--~~ You r

Re: Obtaining newforms field values in a template

2007-09-16 Thread Collin Grady
What exactly is your use case here? This should all be handled automatically when you do {{ form.fieldname }}, depending on if it's bound or not :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" grou

Re: Using a filter with many to many relationship

2007-09-16 Thread r_f_d
Couple of things so I understand better, What is the attribute of term that contains 'ThemePark' and 'London' ? What are you trying to end up with, all records with themePark or only records with themepark and London ? -richard On Sep 16, 11:36 am, merric <[EMAIL PROTECTED]> wrote: > I can't get

VIDEOPERCUMA YANG TERUS HANGAT DIPASARAN !!!!

2007-09-16 Thread International Marketing
Salam hormat, Jangan sangka bahan percuma tidak berkualiti! Tapi saya akui yang perkara begini memang jarang berlaku... kerana kebanyakan produk percuma yang diedarkan tidak menepati citarasa saya. Jadi, berikan perhatian kepada apa yang saya ingin kongsi bersama di sini. "Video Percuma Dot Co

export data to txt file

2007-09-16 Thread Joaquin Quintas
Gjango users... i am new usign django, and this is my first requirement, i have not idea.. please HELP! i have a function that exports data to xml, now the users wants that the same function exports to tt file.. any ideas? thanks in advance --~--~-~--~~~---~--~~

Re: Creating link to root

2007-09-16 Thread James Bennett
On 9/16/07, Florian Lindner <[EMAIL PROTECTED]> wrote: > This template is used within different paths. Therefore I need to have the > styles.css availabe in every path the template could be used. > An alternative would be give the entire URL href="http://xgm.de/styles.css. > But then I need to cha

Re: Creating link to root

2007-09-16 Thread Michael Lake
Florian Lindner wrote: > Hello, > a common problem I have is that I have references in my main template like > CSS > or an background image: > > > > This template is used within different paths. Therefore I need to have the > styles.css availabe in every path the template could be used. I'm

Today's newform-admin branch, svn version 6364

2007-09-16 Thread Rob J Goedman
Hi, Today's version shows 2 problems, the first problem is related to date/time formats in fixtures, the 2nd to at least add forms, e.g. add users. Both using the newform-admin branch. The 1st problem can be created by installing a brand new project, creating an initial_data.json file and run

best site for hacking tricks , computer tweak

2007-09-16 Thread sourabh_swarnkar143
check this out buddies... a kool site for anti hacking and hacking tips and tricks , computer tweaks to enhance ur pc,small virus creation ,etc it's the best site ... www.realm-of-tricks.blogspot.com --~--~-~--~~~---~--~~ You received this messag

best site for hacking tricks , computer tweak

2007-09-16 Thread sourabh_swarnkar143
check this out buddies... a kool site for anti hacking and hacking tips and tricks , computer tweaks to enhance ur pc,small virus creation ,etc it's the best site ... www.realm-of-tricks.blogspot.com --~--~-~--~~~---~--~~ You received this messag

Re: User's permissions not updated

2007-09-16 Thread Manuel Meyer
To answer my own question: python manage.py syncdb > Hey, > > I added a class "News" to models.py of an installed app. But its > permissions doesn't appear in the Change User View of the admin > interface. Need it to be activated somehow? > As superuser I can use News. > I use .96-pre >

Creating link to root

2007-09-16 Thread Florian Lindner
Hello, a common problem I have is that I have references in my main template like CSS or an background image: This template is used within different paths. Therefore I need to have the styles.css availabe in every path the template could be used. An alternative would be give the entire URL hr

Re: filtering based on property

2007-09-16 Thread Doug B
Not without a little work, atleast as far as I know. A custom manger is what you want. Then you could do something like model.current.filter(otherstuff) or make an extra method on the manager and chain model.objects.is_current().filter(otherstuff) class CustManager(models.Manager): def is_c

Re: Creating link to root

2007-09-16 Thread Christian Joergensen
Florian Lindner wrote: > Hello, > a common problem I have is that I have references in my main template like > CSS > or an background image: > > > > This template is used within different paths. Therefore I need to have the > styles.css availabe in every path the template could be used. Coul

Re: GeoDjango : Error in admin site with geom fields

2007-09-16 Thread Ariel Mauricio Nunez Gomez
Did you have a previous geos installation?? Maybe you have some old .so's that are being linked instead of the new ones. Ariel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gro

Re: Odd behavior of filtering

2007-09-16 Thread merric
Does anybody recommend a good workaround - I'm experiencing the same problem On Aug 25, 1:57 pm, Djon <[EMAIL PROTECTED]> wrote: > Is there a ticket for it on the Trac? > How/where can I monitor it so that as soon as a fix is available I > could get the changeset? > > Thanks! > > On Aug 21, 11:4

Re: Derived, read-only attributes in the admin

2007-09-16 Thread Mike H
For these derived values, I usually have an attribute of the model that is updated at save time. You could have an 'order_total' on your Order model, and whenever you save an OrderLine, it updates the order_total on its associated Order and saves the order. Then it just becomes another attrib

Re: Using a filter with many to many relationship

2007-09-16 Thread merric
I can't get this to work for me. For example, I have two records which both share the term 'ThemePark", one of these records also has the additional term "London". However, when I run your suggestion I get an empty query set. Cheers On Sep 15, 2:27 am, r_f_d <[EMAIL PROTECTED]> wrote: > You ar

User's permissions not updated

2007-09-16 Thread Manuel Meyer
Hey, I added a class "News" to models.py of an installed app. But its permissions doesn't appear in the Change User View of the admin interface. Need it to be activated somehow? As superuser I can use News. I use .96-pre Thanks, Manuel --~--~-~--~~~---~--~~ Y

Arts and entertainment

2007-09-16 Thread Madan
Share your thoughts , videos , webpages , photos and make friends through a new powerful website. It's http://goodtolove.com . You will really enjoy surfing it.As well the best is that you can make money through this website using google adsense. --~--~-~--~~~---~--~

Derived, read-only attributes in the admin

2007-09-16 Thread [EMAIL PROTECTED]
Hi I have a fairly simple use-case which I feel should be achievable, but which I'm not able to pull off. What I want is the ability to modify the base query used by the admin to add some derived properties. For example, if you have Orders with corresponding OrderLines, it's useful to add the sub

GeoDjango : Error in admin site with geom fields

2007-09-16 Thread guillaume
Hi, I've build up a small geodjango app. Using the admin-site to view the records of my table gives me : /usr/lib/libgeos_c.so: undefined symbol: GEOSGeomFromHEX_buf my geos version is 3.0.0.RC4 my model is : class commune(models.Model, models.GeoMixin): depcom = models.CharField(maxlength=5

Re: Setting "blank" to one Field?

2007-09-16 Thread ringemup
Shouldn't the empty string be equivalent to blank? --~--~-~--~~~---~--~~ 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 gr

filtering based on property

2007-09-16 Thread cesco
Hi, is it possible to do filtering based on a method or a property of the model? Say I have a model with a from_date field and a to_date field and a method, defined within the model, which checks if the model instance is current, that is: from datetime import date @property def is_current(self):

Re: caching and authentication

2007-09-16 Thread patrickk
thanks for the answer. we _are_ doing a redirect on logout. On 16 Sep., 16:17, "James Bennett" <[EMAIL PROTECTED]> wrote: > On 9/13/07, patrickk <[EMAIL PROTECTED]> wrote: > > > if 2 users are logged in, the username is displayed correctly for each > > user. BUT: if a user is logged-out, his/he

Re: caching and authentication

2007-09-16 Thread James Bennett
On 9/13/07, patrickk <[EMAIL PROTECTED]> wrote: > if 2 users are logged in, the username is displayed correctly for each > user. BUT: if a user is logged-out, his/her username is still > displayed. something doesn´t seem to work here and I can´t figure out > what´s wrong. If a user logs out, the

Re: caching and authentication

2007-09-16 Thread patrickk
does anyone have an idea? we should go online with our site tomorrow and I don´t have a clue on how to solve this problem. thanks, patrick On 13 Sep., 10:23, patrickk <[EMAIL PROTECTED]> wrote: > one additional note: > if 2 users are logged in, the username is displayed correctly for each > user

Re: Generating Q objects for different model fields

2007-09-16 Thread Tim Chase
> I'd like to make a filter composed by ORing several Q objects, each of > which acts on a different model field. > For example I have a model with the fields "name", "title", > "description" and I want to make a Q object like the following: > Q_name = (Q(name__istartswith="hello") & Q(name__icont

OVER 10,000 People Join Every Week! FREE SIGN-UP! CLICK HERE!

2007-09-16 Thread dating the right mate
OVER 10,000 People Join Every Week! FREE SIGN-UP! CLICK HERE! http://www.blpurl.com/al42 --~--~-~--~~~---~--~~ 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@googl

Generating Q objects for different model fields

2007-09-16 Thread cesco
Hi, I'd like to make a filter composed by ORing several Q objects, each of which acts on a different model field. For example I have a model with the fields "name", "title", "description" and I want to make a Q object like the following: Q_name = (Q(name__istartswith="hello") & Q(name__icontains=

Re: Problem with generic views (404)

2007-09-16 Thread James Bennett
On 9/16/07, Florian Lindner <[EMAIL PROTECTED]> wrote: > {% if Abbreviation_list %} Read the generic views documentation carefully; the default variable name the view will give you is "object_list". -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~---

Re: Problem with generic views (404)

2007-09-16 Thread Florian Lindner
Am Sonntag, 16. September 2007 schrieb Collin Grady: > Do you actually have any Abbreviation objects? > > If you don't tell the view to allow empty results, it'll 404 if it has > nothing to show :) Yes, this was the problem, thanks! However I ran into the next problem just 5 minutes later. I ha

Re: Setting "blank" to one Field?

2007-09-16 Thread Xan
I suppose that it were exists. Because if we put no value in the database in one ForeignKey (in admin mode), then we could revert the value to blank. Internally I don't know how store blank values (if null is not True), but I think that it could be set someway Well, thanks, I will change all my b