Re: Something wrong with dividing

2008-04-16 Thread [EMAIL PROTECTED]
:27 am, Poz <[EMAIL PROTECTED]> wrote: > Hello all, > > I've got a small problem. I am a newbie and I can't figure out what is > wrong with the script below. > > I'm trying to count up the "likes" and divid them by the > "likes"+"dislikes"

Re: Enterprise applications with Django

2008-04-16 Thread [EMAIL PROTECTED]
One thing you can do for PDF's is create an HTML page using standard django templates(or however you like) and then use html2pdf to create the pdf. On Apr 16, 2:42 pm, Tim Chase <[EMAIL PROTECTED]> wrote: > > Did you use any open source (or commercial) tools/ framework > > for

Re: Have you used OrderingField?

2008-04-16 Thread [EMAIL PROTECTED]
FWIW this seems like something that would go hand in hand with portions of #13 On Apr 16, 12:36 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Wed, Apr 16, 2008 at 9:41 AM, Julien <[EMAIL PROTECTED]> wrote: > > Thanks Karen for the clarification!

Re: Images

2008-04-16 Thread [EMAIL PROTECTED]
I managed to get this working properly. Thanks for all the help. On Apr 16, 3:00 am, "Rishabh Manocha" <[EMAIL PROTECTED]> wrote: > Did you take a look > athttp://www.djangoproject.com/documentation/static_files/#how-to-do-it. > If you are using the dev serv

Distributed databases

2008-04-16 Thread [EMAIL PROTECTED]
this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---

Re: session data or ???

2008-04-16 Thread [EMAIL PROTECTED]
> ones. Naturally you could also simply pass that choice using GET > parameters, but again: This depends on how you want to use this value. > > -- Horst > > On Tue, Apr 15, 2008 at 3:09 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >> ok i will try to explain

Re: Accessing multiple databases

2008-04-15 Thread [EMAIL PROTECTED]
I've been using the multi db branch of Django successfully for three years on one of my projects...works great On Apr 15, 8:03 pm, RaviKondamuru <[EMAIL PROTECTED]> wrote: > Hi, > I am intending to use two different databases. Essentially retrieve > some data from a remote databas

Re: Images

2008-04-15 Thread [EMAIL PROTECTED]
it is most appreciated. Static is the name of my image directory for anyone who wanted to know. On Apr 15, 3:28 pm, "Erik Vorhes" <[EMAIL PROTECTED]> wrote: > In production environments, you need to use something like Apache or > Lighttpd (sp?) to serve media--it's not somethi

New site - www.iau.org

2008-04-15 Thread [EMAIL PROTECTED]
ecause you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---

Re: django calendar for a datatime field

2008-04-15 Thread [EMAIL PROTECTED]
No, I would reccomend looking at a javascript library(Mootools, YUI, jQuery, prototype, etc.), almost all of them have some sort of datepicker, here is jQuery's for example http://docs.jquery.com/UI/Datepicker On Apr 15, 2:51 pm, Chris <[EMAIL PROTECTED]> wrote: > Hell

Re: Images

2008-04-15 Thread [EMAIL PROTECTED]
The error I get is the white box with the red X which means it can't find the image. On Apr 15, 1:39 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > On Apr 15, 12:06 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > I have searched high and low to

Images

2008-04-15 Thread [EMAIL PROTECTED]
ango-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---

Re: session data or ???

2008-04-15 Thread [EMAIL PROTECTED]
> On Tue, Apr 15, 2008 at 2:19 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >> hi Horst >> >> the last_login is an example from documentation. My problems are, that >> when i save something to the session(as current date, or user agent) >> with

Re: session data or ???

2008-04-15 Thread [EMAIL PROTECTED]
, I don't see > the relation with a session there :-/ > > -- Horst > > On Tue, Apr 15, 2008 at 2:05 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >> hi all >> >> please , i would like to ask for a little help. I have few functions >> stored

session data or ???

2008-04-15 Thread [EMAIL PROTECTED]
--~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google

Re: Dynamic queryset to ModelChoiceField

2008-04-14 Thread [EMAIL PROTECTED]
Sure, just give the modelchoicefield Topic.objects.all() to start with, as this will never actually get used. On Apr 14, 11:14 pm, shabda <[EMAIL PROTECTED]> wrote: > I have a form where I want to do something like, > > class SetDefaultForm(forms.Form): >     topics = form

Re: Newbie Question: Is "ordering" a list or a tuple or both / either?

2008-04-14 Thread [EMAIL PROTECTED]
AFAIK, Django accepts lists and tuples interchangeably (if isinstance(xxx, (list, tuple)) allows for xxx to be either of the two) in many cases. On Apr 14, 11:22 am, Kevin Cole <[EMAIL PROTECTED]> wrote: > Hi, > > I'm following along in the book, and noticed that when "

Re: Slow template

2008-04-14 Thread [EMAIL PROTECTED]
. Good luck! On Apr 14, 10:28 am, Sebastian <[EMAIL PROTECTED]> wrote: > Hi all, > > Ive been using Django for a while now, and there has been one page in > my application that has been running very slowly no matter what I do. > Im using Django 0.96.1. > > The page in quest

Re: cannot resolve keyword mmtype__eq into field

2008-04-14 Thread [EMAIL PROTECTED]
http://www.djangoproject.com/documentation/db-api/#field-lookups On Apr 14, 3:02 pm, Jaap <[EMAIL PROTECTED]> wrote: > Thanks - that worked. I then tried > pdata=myfile.objects.filter(mmtype__in=["W", "X"]) > and that worked too! > > Question: wh

Re: Announcing the Django Dash!

2008-04-14 Thread [EMAIL PROTECTED]
Lukens <[EMAIL PROTECTED]> wrote: > What about Python libraries like PIL or ReportLab? > > On Apr 11, 10:42 pm, "Daniel Lindsley" <[EMAIL PROTECTED]> wrote: > > > We'd like to announce the firstDjangoDash > > (http://www.djangodash.com/) to the communi

sudo: port: command not found

2008-04-14 Thread [EMAIL PROTECTED]
you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---

Re: Security concerns about publically exposing admin tool

2008-04-13 Thread [EMAIL PROTECTED]
Once newforms-admin hits you will be able to change that if you want(without hacking on the django source). On Apr 13, 11:08 pm, meppum <[EMAIL PROTECTED]> wrote: > I simply meant that after a few failed password attempts the user is > not presented with a CAPTCHA or something. I

Re: Security concerns about publically exposing admin tool

2008-04-13 Thread [EMAIL PROTECTED]
There's no reason you have to put it at /admin/ , you could always put it somewhere else(/boogy_man/) for security through obscurity. On Apr 13, 10:36 pm, meppum <[EMAIL PROTECTED]> wrote: > I noticed that most django sites including djangoproject.com and even > curse.com allow their

Re: How to display a image in the template?

2008-04-13 Thread [EMAIL PROTECTED]
You need to actually be serving static content: http://www.djangoproject.com/documentation/static_files/ On Apr 13, 10:25 pm, Duke <[EMAIL PROTECTED]> wrote: > Hi > Can any tell me how to display a image in the hrml in Django > > > > Hello, Image > > > &

Re: Accessing Session from urls.py

2008-04-13 Thread [EMAIL PROTECTED]
I would do per request url routing: http://www.b-list.org/weblog/2007/nov/06/urlconf/ On Apr 13, 9:17 pm, "Cole Tuininga" <[EMAIL PROTECTED]> wrote: > Hey folks - > > I'm looking to make url "routing" choices based on some values from > the session. T

Re: Allowing html tags for filter.

2008-04-11 Thread [EMAIL PROTECTED]
It sounds like you want to use an inclusion tag here: http://www.djangoproject.com/documentation/templates_python/#inclusion-tags. -- Rob Tirrell [EMAIL PROTECTED] On Apr 11, 2:23 pm, "Erik Vorhes" <[EMAIL PROTECTED]> wrote: > >  I have a custom filter that outputs some

Re: Catch-all route?

2008-04-11 Thread [EMAIL PROTECTED]
This is the default behavior. If no pattern matches the URL from the request, it will load and display "404.html". This is assuming that DEBUG=False. If debug is set to True, then you will get a helpful debug page. On Apr 11, 1:07 pm, Brandon Taylor <[EMAIL PROTECTED]> wrot

Re: how do I create a zebra table using a template?

2008-04-11 Thread [EMAIL PROTECTED]
Chas, I think the forloop.counter starts at 1 and forloop.counter0 starts at 0. On Apr 11, 12:10 pm, "Chas. Owens" <[EMAIL PROTECTED]> wrote: > On Fri, Apr 11, 2008 at 12:09 PM, Kenneth Gonsalves<[EMAIL PROTECTED]> wrote: > > snip> >> {% if for

How to add other class attributes to Admin's fields attribute?

2008-04-11 Thread [EMAIL PROTECTED]
--~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit

Re: translation Django DB-API into raw SQL

2008-04-10 Thread [EMAIL PROTECTED]
"main_page"."slug", "main_page"."content" FROM "main_page" ORDER BY "main_page"."id" ASC' On Apr 10, 7:10 pm, [EMAIL PROTECTED] wrote: > I need to translate django db-api query code like > modelobject.objects.all() to a r

Re: Has anyone made an MS excel exporter in a django site yet?

2008-04-10 Thread [EMAIL PROTECTED]
On Apr 10, 3:22 am, Tim Chase <[EMAIL PROTECTED]> wrote: > > yeah but the thing is XLS spreadsheets have a lot more > > meta-data than CVS can handle > > I've found the easiest way for us was to use the "XML > Spreadsheet" option (available via the Save A

Re: Two sites, one django project

2008-04-10 Thread [EMAIL PROTECTED]
in each database? On Apr 10, 6:10 am, Tim Sawyer <[EMAIL PROTECTED]> wrote: > Came across this the other day, never used it. > > http://code.google.com/p/django-databasetemplateloader/ > > It seems to allow you to store templates in the database, so could this be > used

Re: accessing dom elements

2008-04-09 Thread [EMAIL PROTECTED]
I would take a look at BeautifulSoup(http://www.crummy.com/software/ BeautifulSoup/) On Apr 9, 10:16 pm, [EMAIL PROTECTED] wrote: > I'm looking for the easiest way to parse xml file in Django/Python > without using dom methods like getelementbyid etc. I preffer jquery- > like syntax/

SQL Queries Outside of "App"

2008-04-09 Thread [EMAIL PROTECTED]
e because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---

Re: store user as owner automaticaly

2008-04-09 Thread [EMAIL PROTECTED]
Hi Manuel, On Apr 9, 2:46 pm, Manuel Meyer <[EMAIL PROTECTED]> wrote: > in a model Article i want to store the user who created the article. > I have this: > > class Article(models.Model): > > owner = models.ForeignKey(User, null=True, blan

Re: newforms-admin questions

2008-04-09 Thread [EMAIL PROTECTED]
On Apr 9, 2:54 pm, Kevin Monceaux <[EMAIL PROTECTED]> wrote: > Django Fans, > > > Since newforms-admin will one day replace the current admin my thought > > was to go ahead and dive into it now to save the trouble of duplicating > > the effort when it lands

(Very) Large File Upload - mod_python MemoryError

2008-04-09 Thread [EMAIL PROTECTED]
--~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.

Re: How to hook the admin interface?

2008-04-09 Thread [EMAIL PROTECTED]
On Apr 9, 10:15 am, "Emrah Unal" <[EMAIL PROTECTED]> wrote: > Thats my first time in Django. So far everything is great, thanks to > everybody , who worked in the project. > > I need to show the user a printable pdf after clicking save in an > admin form. Creating

Re: app engine db backend project

2008-04-08 Thread [EMAIL PROTECTED]
send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---

Re: app engine db backend project

2008-04-08 Thread [EMAIL PROTECTED]
subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---

Re: formatting patterns in FileField's upload_to?

2008-04-07 Thread [EMAIL PROTECTED]
Once ticket 5361(http://code.djangoproject.com/ticket/5361) gets committed upload_to will be able to take a callable and call it to format the folder each time. If you need these feature now perhaps you could test out the ticket. On Apr 7, 9:17 pm, akonsu <[EMAIL PROTECTED]> wrote: &

Re: Whitespaces in URLs

2008-04-07 Thread [EMAIL PROTECTED]
Slugs, http://www.djangoproject.com/documentation/model-api/#slugfield On Apr 7, 5:29 pm, garrido <[EMAIL PROTECTED]> wrote: > Hi everyone, > > Forgive me if this is a stupid question, but here goes: I have started > my first Django project, and in it I have an object ca

Re: Repeat a string X times, where X is a database value.

2008-04-06 Thread [EMAIL PROTECTED]
I would make a filter there takes a string and repeats it the number of times in the arg. On Apr 6, 9:27 pm, Lee Hinde <[EMAIL PROTECTED]> wrote: > Hi; > > i have a database field "pricing_level". It's an int between 1 and 5. > > In a web page, I'm iterating throug

Re: Creating a Random Hash for Invitations

2008-04-06 Thread [EMAIL PROTECTED]
) On Apr 6, 1:31 pm, "Alex Ezell" <[EMAIL PROTECTED]> wrote: > My use case is that I need to send invites via email to people. These > are not site users, but are people being invited to join the site (and > a particular group on this site) by current users. So, I can't ask &

Re: Serving binary files "through" django

2008-04-05 Thread [EMAIL PROTECTED]
You would do something like this: http://www.djangoproject.com/documentation/outputting_pdf/ but instead of generating the pdf you could just serve a file object. On Apr 5, 2:19 pm, Tim Sawyer <[EMAIL PROTECTED]> wrote: > Hi Folks, > > I'd like to have a site that gives away

Re: PayPal integration

2008-04-04 Thread [EMAIL PROTECTED]
Take a look at django-cart, too. On Apr 4, 2:49 pm, Norbert <[EMAIL PROTECTED]> wrote: > There is a recipe in > ASPNhttp://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/456361 > > Not tested by me and not django related but maybe it helps > > On 27 Mrz., 05:54, e &

django-voting and sites framework

2008-04-04 Thread [EMAIL PROTECTED]
? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more opti

Re: Parent/Child problem

2008-04-04 Thread [EMAIL PROTECTED]
a) It should be related to "self" not 'Task'. b) Add the kwarg: symmetrical=False, by default this is true and it makes it so the relationship is assumed to go both ways. On Apr 4, 2:22 am, Dmitriy Sodrianov <[EMAIL PROTECTED]> wrote: > Hi to all! > > I have a model &g

Re: Track number of hits on object

2008-04-03 Thread [EMAIL PROTECTED]
If you are counting hits as every time it is accesed from the db, I would overide the __init__ method. On Apr 3, 1:58 pm, Mike Axiak <[EMAIL PROTECTED]> wrote: > Hey Evan, > > If you're looking for performance, you might want to try using > memcached's 'inc' command. You

Re: inspectdb and foreign keys

2008-04-02 Thread [EMAIL PROTECTED]
In your database ( not in the model ) rename the field 'category in table MdlCourse to category_id and it should fix the problem... normally a ForeignKey field name in the database is ClassName_id On Apr 2, 6:12 pm, mthorley <[EMAIL PROTECTED]> wrote: > Greetings, I used inspectdb to

Re: Syntax for Updating Arbitrary Model Object Fields

2008-04-02 Thread [EMAIL PROTECTED]
with that dict as the kwargs, for example: In [2]: filter = {'title__icontains': 'test'} In [3]: Page.objects.filter(**filter) Out[3]: [] In [4]: var = 'title__icontains' In [5]: filter = {var: 'test'} In [6]: Page.objects.filter(**filter) Out[6]: [] On Apr 2, 2:58 pm, Szaijan <[EMAIL PROTEC

Re: Syntax for Updating Arbitrary Model Object Fields

2008-04-02 Thread [EMAIL PROTECTED]
]: Page.objects.filter(**filter) Out[3]: [] In [4]: var = 'title__icontains' In [5]: filter = {var: 'test'} In [6]: Page.objects.filter(**filter) Out[6]: [] On Apr 2, 2:58 pm, Szaijan <[EMAIL PROTECTED]> wrote: > A follow on question. In a similar vein, I need to be able to call > the ob

Re: How often do you update your django?

2008-04-02 Thread [EMAIL PROTECTED]
Just take the current revision, it is as stable as any other revision(probably moreso), I would stick to that, and track the trunk and if a new feature comes out that you want, review the backwards incompatible changes page, and then SVN up. On Apr 2, 12:02 pm, SteveMc <[EMAIL PROTECTED]>

Re: Database API reference:

2008-04-02 Thread [EMAIL PROTECTED]
In [3]: Page.objects.values('id', 'title') Out[3]: [{'id': 1, 'title': u'This is a test page'}] In [4]: Page.objects.values('id', 'title').filter(id__gt=1) Out[4]: [] On Apr 2, 12:22 pm, Jaap <[EMAIL PROTECTED]> wrote: > QuerySet methods that return new QuerySets: > values(*field

Re: django-survey Extracted from PyCon

2008-04-02 Thread [EMAIL PROTECTED]
and tying choices to models via generic relations. -Doug On Apr 1, 11:35 am, yml <[EMAIL PROTECTED]> wrote: > Hello, > Last week I have discovered that some of the apps composing PyCon > backend [2] have been exposed on "code.google.com". I am especially > inte

Need help structuring a reviews and ratings app

2008-04-02 Thread [EMAIL PROTECTED]
ango-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---

Re: Auth System

2008-04-02 Thread [EMAIL PROTECTED]
groups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---

Re: Adding an "invalid" choice to a ChoiceField?

2008-04-01 Thread [EMAIL PROTECTED]
I assume he meant required=True, because being required is what causes '' to not be allowed. On Apr 1, 8:38 pm, Michael <[EMAIL PROTECTED]> wrote: > > TOPIC_CHOICES=[('', '-- pick one --'), ('key1', '...'), ...] > > Thanks, using an empty string for the value see

Re: edit_inline and the Django Admin interface

2008-04-01 Thread [EMAIL PROTECTED]
I have exactly the same issue. Have you found a solution? /mac On Mar 27, 1:40 am, ocamljohn <[EMAIL PROTECTED]> wrote: > My model includes a class called "Topic", and there exists a many-to- > many relationship between Topics. This relationship between topics > al

Re: Dynamic Subdomain Generation for Users

2008-03-31 Thread [EMAIL PROTECTED]
Thanks, Dan! Just what I needed. On Mar 31, 5:58 pm, Dan Ellis <[EMAIL PROTECTED]> wrote: > Hi, Levi. I've just had a look through the code, and it appears you're > in luck (at least in the trunk -- I haven't looked elsewhere). core/ > handlers/base.py contains this line[1]

Re: Dynamic Subdomain Generation for Users

2008-03-31 Thread [EMAIL PROTECTED]
if that helps, Levi On Mar 31, 4:02 pm, "Bruno Tikami" <[EMAIL PROTECTED]> wrote: > Hi vemon, > > when the user access user.domain.com the request will be treated by a > different project or all users share the same project? Though it may look a > stupid question, if t

Dynamic Subdomain Generation for Users

2008-03-31 Thread [EMAIL PROTECTED]
. Thanks, Levi --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL

Re: Problem with django unit testing

2008-03-31 Thread [EMAIL PROTECTED]
environment, I'll try to find them. On Mar 30, 8:03 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On Sat, Mar 29, 2008 at 11:00 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > but when I run unit test to test the failed function use: > > $

Re: Model Inheritance

2008-03-31 Thread [EMAIL PROTECTED]
to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---

Re: Localizing URLs

2008-03-30 Thread [EMAIL PROTECTED]
Perhaps you could try doing a per request url conf: http://www.b-list.org/weblog/2007/nov/06/urlconf/ I'm not sure how this would work, but I think it might help, although I guess you'd need a URL conf for each languages :/ On Mar 30, 11:58 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>

Re: Problem with django unit testing

2008-03-30 Thread [EMAIL PROTECTED]
Any one who can help me? Thank you so much! On Mar 29, 11:00 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi, all, > > I meet a strangely problem on django unittesting. I use django svn > version, the test code like this: > > """"

Re: Finding out the index of a model instance in a list

2008-03-29 Thread [EMAIL PROTECTED]
= GalleryImage.objects.filter(album_id=foo).select_related() then pass ImageList and ImageList.count() to the template, where you can use the forloop.counter: http://www.djangoproject.com/documentation/templates/#for Derek Willis On Mar 29, 7:00 pm, Tim Sawyer <[EMAIL PROTECTED]> wrote: > Is there a b

Need Help Thinking Through How to Setup URLS and VIEWS

2008-03-29 Thread [EMAIL PROTECTED]
send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---

Re: Language code as part of URL

2008-03-29 Thread [EMAIL PROTECTED]
--~-~--~~----~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---

Re: MySQL-python-1.2.2 errors

2008-03-28 Thread [EMAIL PROTECTED]
-bit? On Mar 25, 8:36 am, Mike H <[EMAIL PROTECTED]> wrote: > I had the same problem just this morning. > > Commenting out > > #ifndef uint > #define uint unsigned int > #endif > > from _mysql.c fixed it for me, and all the django tests pass with a > mysql bac

Tutorial: Admin Template Customization

2008-03-28 Thread [EMAIL PROTECTED]
groups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---

Re: javascript in django

2008-03-28 Thread [EMAIL PROTECTED]
ame would be "id_foo" --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [

Re: javascript in django

2008-03-28 Thread [EMAIL PROTECTED]
send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---

Checkbox instead of select in admin

2008-03-28 Thread [EMAIL PROTECTED]
? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For mo

Re: Empty Queryset

2008-03-28 Thread [EMAIL PROTECTED]
bool(query) will return false if there are no results. On Mar 28, 4:30 am, Rufman <[EMAIL PROTECTED]> wrote: > Hey > > What is the best way to see if a queryset is empty? (No result from > the SELCET query)? > > Stephane --~--~-~--~~~-

Re: Counting over a ManyToManyField of a ManyToManyField, a question of style.

2008-03-27 Thread [EMAIL PROTECTED]
Yes, instead of returning all the records and counting them in python you would be using your databases COUNT() funciton. On Mar 27, 10:33 pm, Rodrigo Culagovski <[EMAIL PROTECTED]> wrote: > On Mar 27, 3:43 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > wrote: > &

Re: css problem

2008-03-27 Thread [EMAIL PROTECTED]
http://www.djangoproject.com/documentation/static_files/ On Mar 27, 9:28 pm, "Brian Armstrong" <[EMAIL PROTECTED]> wrote: > Greg, check out settings.py. CSS counts as media -- it's a static > file you want to serve up to the outside. The exact details of how >

Re: How to check the SQL that the Django ORM is executing?

2008-03-27 Thread [EMAIL PROTECTED]
It depends, thats better if you want to actively see what queries are being run, this is better if you want to see what SQL a specific query executes. On Mar 27, 3:24 pm, shabda <[EMAIL PROTECTED]> wrote: > wouldn't getting the queries from connection.queries be abetter > approach? &

Re: How to check the SQL that the Django ORM is executing?

2008-03-27 Thread [EMAIL PROTECTED]
]) : In [21]: show_sql(Page.objects.all()) Out[21]: 'SELECT "main_page"."id", "main_page"."title", "main_page"."slug", "main_page"."content" FROM "main_page" ORDER BY "main_page"."id" ASC'

Re: Counting over a ManyToManyField of a ManyToManyField, a question of style.

2008-03-27 Thread [EMAIL PROTECTED]
Well, books can be redefined as: def books(self): progs = self.programs.all() return sum([prog.publications.all().filter(type=u'Book').count() for prog in progs]) and likewise for the other methods. On Mar 27, 1:27 pm, Rodrigo Culagovski <[EMAIL PROTECTED]> wrote: > My applic

Re: how to convert {{candidate.vote_set.filter(vote='TU').count()}} in template syntax

2008-03-27 Thread [EMAIL PROTECTED]
Alternatively you can create a templatetag to accomplish this. On Mar 27, 3:14 am, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On Thu, Mar 27, 2008 at 3:52 PM, django <[EMAIL PROTECTED]> wrote: > > > Hi, > > I want to use {[candidate.vo

Re: newforms image upload and validation

2008-03-26 Thread [EMAIL PROTECTED]
thanks karen..guess I'm overworked -- I was trying out something like "if self.cleaned_data['avatar'] == ' ' " failed to notice that the ImageField is 'None' if empty... thanks a bunch..you made my day :-) -pd. On Mar 26, 10:07 pm, "Karen Tracey" <[EMAIL PROTECTED]&g

Re: Forms not same fields than Models

2008-03-26 Thread [EMAIL PROTECTED]
Read this: http://collingrady.wordpress.com/2008/02/18/editing-multiple-objects-in-django-with-newforms/ On Mar 26, 8:02 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > On 26-Mar-08, at 6:44 PM, didier rano wrote: > > > I need to have a Form (newforms) with different fields

newforms image upload and validation

2008-03-26 Thread [EMAIL PROTECTED]
d email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---

Re: Forms and Models question

2008-03-26 Thread [EMAIL PROTECTED]
Check out this guide: http://collingrady.wordpress.com/2008/02/18/editing-multiple-objects-in-django-with-newforms/ On Mar 26, 3:02 pm, "didier rano" <[EMAIL PROTECTED]> wrote: > Hi, > > I have a model like that: > > REF(Model) > M2(Model): > title >

tutorial __str__() method not working

2008-03-26 Thread [EMAIL PROTECTED]
p. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---

Re: Displaying a variable in my base template

2008-03-25 Thread [EMAIL PROTECTED]
If it is going to be in every page I would just use the now tag( http://www.djangoproject.com/documentation/templates/#now ) in the base.html On Mar 25, 9:56 pm, Brandon Taylor <[EMAIL PROTECTED]> wrote: > Hello everyone, > > Still fairly new to Django, but I'm loving it! > &g

Re: MySQL-python-1.2.2 errors

2008-03-25 Thread [EMAIL PROTECTED]
So, even though my CPU architecture is 64-bit I should install the 32- bit version of MySQL? On Mar 25, 8:04 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Tue, Mar 25, 2008 at 3:49 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> > wrote: > > > > > > &

Re: How often do you update your django?

2008-03-25 Thread [EMAIL PROTECTED]
cd into the directory where you have django, then do svn update, it will update the checkout there. To be able to this you can not have used setup.py instead you should be symlinking django/ into your site- packages directory. On Mar 25, 2:31 pm, jmDesktop <[EMAIL PROTECTED]> wrote: &g

Re: Can the django admin site be exposed to the outside?

2008-03-25 Thread [EMAIL PROTECTED]
. On Mar 25, 2:30 pm, jmDesktop <[EMAIL PROTECTED]> wrote: > Just learning, but I have the admin site running. I wanted to know if > I can get to the admin site from another computer instead of only > localhost. Thanks. --~--~-~--~~~---~--~---

Re: How often do you update your django?

2008-03-25 Thread [EMAIL PROTECTED]
I update pretty much daily locally, I'm going to be deploying a site pretty soon and I doubt that I will update it ever except for security released, qs-rf, and nfa merges, and of course if I need to update the site with a new feature. On Mar 25, 1:04 pm, "Joseph Heck" <[EMAIL PROT

MySQL-python-1.2.2 errors

2008-03-25 Thread [EMAIL PROTECTED]
glegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---

Re: How to use a Queryset from one model to filter the Queryset from another model

2008-03-24 Thread [EMAIL PROTECTED]
How about recent_authors = Author.object.filter(book__pk__in=[b.pk for b in recent_books]).distinct() That can probably be done without the list comprehension but this should work. On Mar 24, 7:23 pm, davenaff <[EMAIL PROTECTED]> wrote: > This seems like something that should be doab

Limiting database hits to retrieve related models

2008-03-24 Thread [EMAIL PROTECTED]
received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/gr

Re: Using mod in if in template

2008-03-24 Thread [EMAIL PROTECTED]
This seems to work fine for me: http://dpaste.com/41059/ On Mar 24, 2:29 pm, Tim Sawyer <[EMAIL PROTECTED]> wrote: > On Monday 24 Mar 2008, James Bennett wrote: > > > The first thing to do is to step back and remember that the Django > > template language is not Python &

Django hosting website

2008-03-24 Thread [EMAIL PROTECTED]
groups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---

Re: Better handling for Ajax Pages & Fragments?

2008-03-24 Thread [EMAIL PROTECTED]
by a generic return_hml_or_json function which looks into the request to determine the output format. Hope that helps. Philippe On Mar 23, 4:45 pm, "Tane Piper" <[EMAIL PROTECTED]> wrote: > Hey folks, > > I'm working on a new interface for my site at the moment, and I'm &

Re: Having issues displaying related items from db on templates

2008-03-10 Thread [EMAIL PROTECTED]
But I get a Name Error because FeedItems aren't defined. How can I define these when they're not defined in the model until after the Category (and Feed)? On Mar 10, 11:01 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I'm putting together a basic feed aggregator with th

Having issues displaying related items from db on templates

2008-03-10 Thread [EMAIL PROTECTED]
t to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---

Re: Admin recipes anyone?

2008-03-10 Thread [EMAIL PROTECTED]
On Mar 10, 9:44 am, David Reynolds <[EMAIL PROTECTED]> wrote: > On 9 Mar 2008, at 11:23 pm, Brandon Taylor wrote: > > > I'm in my 2nd day of using Django, and there are a couple of things > > I'd like to do, in regards to adding functionality to the outstanding > >

<    2   3   4   5   6   7   8   9   10   11   >