Re: on latest svn am getting a type error TypeError: argument 1 must be str, not unicode

2010-02-02 Thread Kenneth Gonsalves
On Wednesday 03 Feb 2010 1:02:34 pm Russell Keith-Magee wrote: > On Wed, Feb 3, 2010 at 2:41 PM, Kenneth Gonsalves wrote: > > On Wednesday 03 Feb 2010 11:44:36 am Russell Keith-Magee wrote: > >> Ok - seriously - if you want help debugging this, you need to get your > >> story

Re: on latest svn am getting a type error TypeError: argument 1 must be str, not unicode

2010-02-02 Thread Russell Keith-Magee
On Wed, Feb 3, 2010 at 2:41 PM, Kenneth Gonsalves wrote: > On Wednesday 03 Feb 2010 11:44:36 am Russell Keith-Magee wrote: >> Ok - seriously - if you want help debugging this, you need to get your >> story straight. > > please believe me - I *am* trying. Ok, lets try to be

Re: save() got an unexpected keyword argument 'using'

2010-02-02 Thread Russell Keith-Magee
On Wed, Feb 3, 2010 at 2:12 PM, Ramdas S wrote: > I just upgraded to the latest trunk SVn 12377, and this error has started > propping up on some of my existing working code. > > Here is the traceback > > http://dpaste.com/153987/ > > > Apparently get_or_create is not working

Most-polished forum application?

2010-02-02 Thread peppergrower
As part of a site restructuring and migration from PHP to Django, I'm looking for a Django forum app to replace phpBB in our current setup. (We'd like to get rid of PHP altogether and avoid needing to keep it updated and secured.) I found this comparison page:

Website themes in django

2010-02-02 Thread Waqqas Jabbar
Hi, I am thinking of making a "theme" application. The idea is to change the theme of the site easily from a list of available them (like in gmail). The theme selection can be based on - User (every user can choose her own theme) - Site (every site can have its own theme) - Browser specific -

Re: on latest svn am getting a type error TypeError: argument 1 must be str, not unicode

2010-02-02 Thread Kenneth Gonsalves
On Wednesday 03 Feb 2010 11:44:36 am Russell Keith-Magee wrote: > Ok - seriously - if you want help debugging this, you need to get your > story straight. > please believe me - I *am* trying. Ok, lets try to be straight: 1. site used for testing: http://bitbucket.org/lawgon/csrftest/src/ 2.

Re: on latest svn am getting a type error TypeError: argument 1 must be str, not unicode

2010-02-02 Thread Russell Keith-Magee
On Wed, Feb 3, 2010 at 1:46 PM, Kenneth Gonsalves wrote: > On Wednesday 03 Feb 2010 10:09:44 am Russell Keith-Magee wrote: >> > Exception Type: NameError at / >> > Exception Value: global name 'query' is not defined >> >> This isn't the same problem that you originally

save() got an unexpected keyword argument 'using'

2010-02-02 Thread Ramdas S
I just upgraded to the latest trunk SVn 12377, and this error has started propping up on some of my existing working code. Here is the traceback http://dpaste.com/153987/ Apparently get_or_create is not working properly at least as per docs and its expecting a using keyword. Any idea how to

Re: on latest svn am getting a type error TypeError: argument 1 must be str, not unicode

2010-02-02 Thread Kenneth Gonsalves
On Wednesday 03 Feb 2010 10:09:44 am Russell Keith-Magee wrote: > > Exception Type: NameError at / > > Exception Value: global name 'query' is not defined > > This isn't the same problem that you originally reported. This > particular problem was logged as #12732, and fixed in [12359]. this

Re: fintering a queryset based on time

2010-02-02 Thread HARRY POTTRER
nevermind, i figured it out. .extra(where=['EXTRACT (HOUR FROM datetime) = 0']) add that to the queryset. Works in Postgres, don't know about the others On Feb 2, 10:47 pm, HARRY POTTRER wrote: > I have a table that has a bunch of rows, each with a datetime field. > These

Re: Trouble with the Django tutorial: Template DoesNotExist(1.1 on Win XP, Python 2.5.4)

2010-02-02 Thread Karen Tracey
On Tue, Feb 2, 2010 at 5:17 PM, OkaMthembo wrote: > Hi Kathy, > > Thanks for looking into it. When i paste it into the cmd as an argument to > dir, i still get File Not Found (specific screen shot attached). > > So really, that file doesn't exist. What is the real full name

Re: on latest svn am getting a type error TypeError: argument 1 must be str, not unicode

2010-02-02 Thread Russell Keith-Magee
On Wed, Feb 3, 2010 at 12:03 PM, Kenneth Gonsalves wrote: > On Tuesday 02 Feb 2010 5:10:27 pm Russell Keith-Magee wrote: >> >> traceback is this: >> > >> > I went back to 12300 - same problem, but 12200 is ok. >> >> Kenneth - we need two things: >> >>  * A specific revision

Re: Filtering by the intermediary table using the GET parameters

2010-02-02 Thread Woongcheol Yang
Let's say your model looks like the following: class Standard(models.Model): class Product(models.Model): has_standard = models.ManyToManyField(Standard, through="ProductStandard") class ProductStandard(models.Model): standard = models.ForeignKey(Standard) product =

Re: on latest svn am getting a type error TypeError: argument 1 must be str, not unicode

2010-02-02 Thread Kenneth Gonsalves
On Wednesday 03 Feb 2010 9:33:34 am Kenneth Gonsalves wrote: > > * The input that is causing things to break. "Sporadic error" and a > > stack trace doesn't really help us identify a problem. The problem > > isn't sporadic for the case that is causing it to fail. We just don't > > know what that

Re: on latest svn am getting a type error TypeError: argument 1 must be str, not unicode

2010-02-02 Thread Kenneth Gonsalves
On Tuesday 02 Feb 2010 5:10:27 pm Russell Keith-Magee wrote: > >> traceback is this: > > > > I went back to 12300 - same problem, but 12200 is ok. > > Kenneth - we need two things: > > * A specific revision that breaks things. You only need to do 8 > checks to find a specific revision between

Re: Added-value over PHP?

2010-02-02 Thread Ovnicraft
2010/2/2 Shawn Milochik > There is much to say on this topic. I suggest doing some Google searching > on "Django versus PHP" and read until you know the answer to your question. > > My brief summary is that Django lets you do everything you can do in PHP, > and much better

fintering a queryset based on time

2010-02-02 Thread HARRY POTTRER
I have a table that has a bunch of rows, each with a datetime field. These rows are created every three hours (midnight, 03:00, 06:00, 09:00, etc). I want to filter the queryset to only grab the objects where the datetime field is midnight. Is there an easy way to do this? Something like:

Re: unexpected Error: OperationalError: no such column: ...

2010-02-02 Thread HWM-Rocker
Hi Thomasz Zielinski, On Jan 20, 6:38 pm, Tomasz Zieliński wrote: > On 20 Sty, 20:52, HWM-Rocker wrote: > > > o...@olaf-laptop:~/workspace/truemen$ ./manage.py shell > > Not touching you question, you could try shell_plus from django- >

Re: on latest svn am getting a type error TypeError: argument 1 must be str, not unicode

2010-02-02 Thread Kenneth Gonsalves
On Tuesday 02 Feb 2010 5:10:27 pm Russell Keith-Magee wrote: > > I went back to 12300 - same problem, but 12200 is ok. > > Kenneth - we need two things: > > * A specific revision that breaks things. You only need to do 8 > checks to find a specific revision between 12300 and 12200 if you do a >

Re: Import problems, Windows, Python26, SVN checkout

2010-02-02 Thread Sam Lai
On 3 February 2010 12:28, Nick Mellor wrote: > Hi, > > Trying to get started with Django on Windows XP. Trying to create a > project. Fails with: > > ImportError: No module named django.core > > Have grabbed djtrunk from svn. The same error, whether I have run >

Re: Added-value over PHP?

2010-02-02 Thread Nick Lo
> I'm no expert on web applications, and have a couple of questions > about Djanjo: > > 1. What are the advantages of using a framework like Django over > writing the same type of database-driven in PHP? You are comparing a development framework (Django) to a programming language (PHP). A

Re: IE7/VISTA problems with form submissions -- blank page or "Internet Explorer cannot display the webpage"

2010-02-02 Thread Sam Lai
If I remember correctly, I think there's a setting in IE7 (Tools -> Options -> Advanced -> Show friendly error pages or something like that) where if you disable it, it should show you the HTTP error code. Also, try using Fiddler to see what's going on - http://www.fiddler2.com/fiddler2/ On 3

Import problems, Windows, Python26, SVN checkout

2010-02-02 Thread Nick Mellor
Hi, Trying to get started with Django on Windows XP. Trying to create a project. Fails with: ImportError: No module named django.core Have grabbed djtrunk from svn. The same error, whether I have run setup.py or not (originally I didn't, as per the svn install instructions.) Python: 2.6

Re: Default Selection in ChoiceField

2010-02-02 Thread Sumanth
Thanks guys Both work Sumanth On Feb 1, 11:09 pm, Shawn Milochik wrote: > You can do it in your view after creating the form, if you like. > > form = SomeForm() > form.fields['meal_pref'].initial = 2 > > Shawn -- You received this message because you are subscribed to the

Re: Trouble with the Django tutorial: Template DoesNotExist(1.1 on Win XP, Python 2.5.4)

2010-02-02 Thread OkaMthembo
:O Did i say "Kathy"? The horror! Am terribly sorry, Karen. It's very late here and i'm seeing double vision :) On Tue, Feb 2, 2010 at 11:37 PM, Karen Tracey wrote: > On Tue, Feb 2, 2010 at 4:18 PM, OkaMthembo wrote: > >> [snip] > > Template Loader Error:

Re: Trouble with the Django tutorial: Template DoesNotExist(1.1 on Win XP, Python 2.5.4)

2010-02-02 Thread OkaMthembo
Hi Kathy, Thanks for looking into it. When i paste it into the cmd as an argument to dir, i still get File Not Found (specific screen shot attached). On Tue, Feb 2, 2010 at 11:37 PM, Karen Tracey wrote: > On Tue, Feb 2, 2010 at 4:18 PM, OkaMthembo wrote:

Re: Speeding the code-test-debug cycle

2010-02-02 Thread Phlip
Malcolm Box wrote: > Has anyone got any ideas on how to speed this up - for instance, is there a > way to say "use an existing test database"? Per my other advice to use fab and a fabfile with a test() target in it, you should set its (local()) target to something like python manage.py test

OkaMthembo wants to chat

2010-02-02 Thread OkaMthembo
--- OkaMthembo wants to stay in better touch using some of Google's coolest new products. If you already have Gmail or Google Talk, visit: http://mail.google.com/mail/b-2970ece0ee-ce47945a4e-40d01243a0ae2efd You'll need to click

Re: Trouble with the Django tutorial: Template DoesNotExist(1.1 on Win XP, Python 2.5.4)

2010-02-02 Thread Karen Tracey
On Tue, Feb 2, 2010 at 4:18 PM, OkaMthembo wrote: > [snip] Template Loader Error: > Django tried loading these templates, in this order: > Using loader django.template.loaders.filesystem.load_template_source: > *c:\projects\sasalaries\sasalaries\mytemplates\polls\index.html

Speeding the code-test-debug cycle

2010-02-02 Thread Malcolm Box
Hi, As my django application has grown I'm noticing I'm spending longer and longer waiting for ./manage.py test to start up - ie create all the tables etc. Not helped of course by working on a laptop with a slow disk, as I suspect many of us do these days. This is slowing down my test-debug

Problem with Last-modified header and Apache/mod_python

2010-02-02 Thread Malcolm Box
Hi, I'm seeing a strange problem with Last-modified headers on my Apache/mod_python install. The problem being that they don't get sent. Running my django app locally, and using 'curl -v' to see the headers, I see correctly generated 'Last-modified' headers. When I deploy the same code to a

Trouble with Django tutorial: Template DoesNotExist (1.1 on Win XP, Python 2.5.4)

2010-02-02 Thread OkaMthembo
Hi folks, I am doing the Django tutorial (part 3 _ Django Documentation.htm). I created an HTML template in a folder within my Django project/ site (C:\Projects\SASalaries\sasalaries\mytemplates\polls) and my TEMPLATE_DIRS setting in settings.py is as follows: TEMPLATE_DIRS = (

Trouble with the Django tutorial: Template DoesNotExist(1.1 on Win XP, Python 2.5.4)

2010-02-02 Thread OkaMthembo
Hi folks, I am doing the Django tutorial (part 3 _ Django Documentation.htm). I created an HTML template in a folder within my Django project/ site (C:\Projects\SASalaries\sasalaries\mytemplates\polls) and my TEMPLATE_DIRS setting in settings.py is as follows: *TEMPLATE_DIRS = (

Re: Gathering performance statistics

2010-02-02 Thread Andy McKay
I was going to build something like this for Django since neither django-tracking or analytics quite tick all the boxes. I was going to use carrot and celery using this great example here: http://ask.github.com/celery/tutorials/clickcounter.html If you do build something, that's probably the

Re: Gathering performance statistics

2010-02-02 Thread gkelly
I found the following and am now working on porting it to django middleware: http://www.vineetmanohar.com/2009/03/23/using-google-analytics-event-api-to-track-your-website-performance/ On Feb 2, 2:45 am, Tomasz Zieliński wrote: > On 2 Lut, 00:22, gkelly

Re: Django development version docs

2010-02-02 Thread Thomas B. Higgins
@Karen, Oops, sorry. I had an extra folder name in my Tortoise SVN checkout settings. My mistake. Thank you for being so efficient at policing nonsense. Tom On Feb 2, 11:33 am, Karen Tracey wrote: > On Tue, Feb 2, 2010 at 2:25 PM, Thomas B. Higgins >

Re: Django development version docs

2010-02-02 Thread Thomas B. Higgins
@Karen, Oops, sorry. I had an extra folder name in my Tortoise SVN checkout settings. My mistake. Thank you for being so efficient at policing nonsense. Tom On Feb 2, 11:33 am, Karen Tracey wrote: > On Tue, Feb 2, 2010 at 2:25 PM, Thomas B. Higgins >

Re: Scammer / Job fraud rehash - Do NOT perform any business with Eike Post

2010-02-02 Thread James Bennett
Anybody who wants to continue this thread: take it off-list immediately or face the wrath of the list moderators. -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." -- You received this message because you are subscribed to the Google Groups "Django users"

Re: Django FormWizard Dynamically Alter form_list

2010-02-02 Thread David Durham
On Sat, Jan 30, 2010 at 1:25 PM, leveille wrote: > I'm having some issues with the form wizard, that maybe someone can > shed some light on. According to the docstring in the method > process_step: I can "dynamically alter self.form_list". So, based on > my project needs, I'm

Filtering by the intermediary table using the GET parameters

2010-02-02 Thread Eugene Mirotin
I have 3 models - Standard, Product, and ProductStandard. Standards represents some standardization document. Product represents some product. ProductStandard is the intermediary table having 2 FKs (Standard and Product) as well as some extra fields (like comments about the Standard for the

Re: logic of forloop.revcounter and revcounter0

2010-02-02 Thread harryos
thanks Bill for the detailed answer..it really helped me to understand the logic harry Bill Freeman wrote: > Looking at the code in django/template/defaulttags.py, where len_values > is the number of itterations in the loop: > > counter0 runs from 0 through len_values-1 > counter runs from 1

Re: Django FormWizard Dynamically Alter form_list

2010-02-02 Thread leveille
On Feb 2, 3:03 am, Paddy Joy wrote: > I had a similar issue but never got to the bottom of it so I am > interested to know if you figured this out? > > In this bug (a similar issue to > yours)http://code.djangoproject.com/ticket/8808 > Jacob mentions that a workaround is to

Re: Django development version docs

2010-02-02 Thread Karen Tracey
On Tue, Feb 2, 2010 at 2:25 PM, Thomas B. Higgins wrote: > I believe the directory structure for Django has changed. So, Writing > your first Django app, Part 1, > http://docs.djangoproject.com/en/dev/intro/tutorial01/, > should refer to site-packages/django/django/bin,

Re: URL reverse failed for urlencoded string

2010-02-02 Thread Karen Tracey
On Tue, Feb 2, 2010 at 12:13 PM, timc3 wrote: > I am working with an external REST Provider whose GUIDs might have > spaces, plus signs and a few other characters in (I can't change > this). > > In my template I use the following, which normally works except when > their are

Re: help with Django model and 'choices'

2010-02-02 Thread Chris McComas
Gleber, I'll try that as well. If I can just figure out how to multiply total = = new_green.hp_grade * hp_credithours Where hp_grade is a FloatField (double in the MySQL db) with hp_credithours which is a DecimalField (decimal in the MySQL db) I think they'd solve the problem. On Feb 2, 2:25 

Re: help with Django model and 'choices'

2010-02-02 Thread Gleber
Try surround the values of the constants with Decimal("x"), like: APLUS = Decimal("4.33") A = Decimal("4") AMINUS = Decimal("3.67") ... On Feb 2, 4:58 pm, raj wrote: > To populate a ModelMultipleChoiceField of a ModelForm I'd used a hack > similar to Shawn's initial

Django development version docs

2010-02-02 Thread Thomas B. Higgins
I believe the directory structure for Django has changed. So, Writing your first Django app, Part 1, http://docs.djangoproject.com/en/dev/intro/tutorial01/, should refer to site-packages/django/django/bin, not site-packages/ django/bin as the path entry. If you all agree I am getting this right,

Re: Scammer / Job fraud rehash - Do NOT perform any business with Eike Post

2010-02-02 Thread Bongoboy
and he's still hiring new developersi'm so bored -_- His message: "Thomas: Wir programmieren eine Voip Software mit Python, Django, Asterix und suchen noch einen Mitgründer in der Gegend um Karlsruhe. Wir bewerben uns um eine BMBF Förderung mit Hilfe des CIE Karlsruhe. Falls die Förderung

Re: help with Django model and 'choices'

2010-02-02 Thread raj
To populate a ModelMultipleChoiceField of a ModelForm I'd used a hack similar to Shawn's initial suggestion. So I hope this will work: Add to your modelform: def __init__(self, whatever_there_are_as_args): super() # with usual syntax and required_args if instance is not None and

Re: help with Django model and 'choices'

2010-02-02 Thread Chris McComas
Again, this is my view: http://dpaste.com/153735/ I'm thinking the error is in someway related to this line: new_green.hp_coursepoints = new_green.hp_grade * hp_credithours The only thing I changed was changed hp_grade from a DecimalField to FloatField On Feb 2, 1:14 pm, Chris McComas

Re: help with Django model and 'choices'

2010-02-02 Thread Chris McComas
I dropped the table again, and changed the fields in my model from DecimalField to FloatField. Now it works, it'll display the proper option that's been selected. However, when I try to save it on the form I created in my view, it'm getting this error: http://dpaste.com/153802/ Ugh. Ha On Feb

Re: any suggestion about how to build Continuous testing for django project?

2010-02-02 Thread Simon Brunning
On 1 February 2010 17:25, pyleaf wrote: > I am new for django. > any suggestion about how to build Continuous testing for django project? If you build your Django app with buildout () you could try Hudson (). I'm going to be

Re: help with Django model and 'choices'

2010-02-02 Thread Chris McComas
Nope. I dropped the table completely and started from scratch. I'm still testing it out, so there hasn't been any real data entered so I can play around with it. I dropped the table, uploaded my new models, syncdb, and then filled out a form, saved it. It saved properly, went back to edit the form

Re: logic of forloop.revcounter and revcounter0

2010-02-02 Thread Bill Freeman
Looking at the code in django/template/defaulttags.py, where len_values is the number of itterations in the loop: counter0 runs from 0 through len_values-1 counter runs from 1 through len_values revcounter runs from len_values down to 1 (essentially it is len_values - counter0)

Re: URL reverse failed for urlencoded string

2010-02-02 Thread timc3
Well the space was still an issue it seems. I have the following urlconf: url(r'^group_view/(?P[-\w\s]+)/$', 'mysite.views.vs_group_view', name="group_view"), Which matches the whitespace but my URL reverse match still breaks. Any ideas? -- You received this message because you are

Re: help with Django model and 'choices'

2010-02-02 Thread Shawn Milochik
On Feb 2, 2010, at 12:48 PM, Chris McComas wrote: > Like this? > > http://dpaste.com/153790/ Yeah. Does that help with the pre-population in your form? Shawn -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: Apache & wsgi & Django > Content-Length

2010-02-02 Thread urosh
Brett Parker THANK YOU! This was it I just added 'django.middleware.http.ConditionalGetMiddleware', to the middleware and that's it. I think I would search answer for this problem for a few days if you would't told me for this middleware. It is strange although that sometimes content-length was

Re: help with Django model and 'choices'

2010-02-02 Thread Chris McComas
Like this? http://dpaste.com/153790/ On Feb 2, 12:19 pm, Shawn Milochik wrote: > On Feb 2, 2010, at 11:49 AM, Chris McComas wrote: > > > Shawn -> thnx for your help, that "hacky" fix isn't working tho... > > Sorry 'bout that. I didn't really test it. But in the loop, do some

Re: Apache & wsgi & Django > Content-Length

2010-02-02 Thread urosh
Thank you very much for answering. The examples with wget are done on the same url. Nothing is missing. It's just that sometimes content-length is set and sometimes is not and when that happens i noticed that phone can't fetch xml. Xml is always the same in this case. And in the log of apache.log

Re: URL reverse failed for urlencoded string

2010-02-02 Thread timc3
To answer my own question I think this has more to do with matching a URL that has a string in it to my urls.py. So this should really be about creating the correct entry in my urls to match spaces.. -- You received this message because you are subscribed to the Google Groups "Django users"

Re: help with Django model and 'choices'

2010-02-02 Thread Shawn Milochik
On Feb 2, 2010, at 11:49 AM, Chris McComas wrote: > Shawn -> thnx for your help, that "hacky" fix isn't working tho... Sorry 'bout that. I didn't really test it. But in the loop, do some creative print or log.debug statements with the values in scope and see what you can figure out. Maybe

Re: any suggestion about how to build Continuous testing for django project?

2010-02-02 Thread timc3
Or you could try BuildBot. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more

URL reverse failed for urlencoded string

2010-02-02 Thread timc3
I am working with an external REST Provider whose GUIDs might have spaces, plus signs and a few other characters in (I can't change this). In my template I use the following, which normally works except when their are encoded characters in the string: {% url group_view group.groupName|urlencode

Re: any suggestion about how to build Continuous testing for django project?

2010-02-02 Thread Phlip
pyleaf wrote: > what about bitten? I can't find a screenshot. Can it compete with this? http://c0485891.cdn.cloudfiles.rackspacecloud.com/620ad37c-398d-4509-ae45-b88399c1c4a6_2_full.jpeg Also note that _none_ of those should be red. I'm sure the crew only broke them just to illustrate the

Re: help with Django model and 'choices'

2010-02-02 Thread Chris McComas
Shawn -> thnx for your help, that "hacky" fix isn't working tho... On Feb 2, 11:09 am, Chris McComas wrote: > Thnx. The reason the grade values are 4.33, 4. 3.67 etc is because > that value is multiplied by the value entered for ha_credithours and > hp_credithours. If

IE7/VISTA problems with form submissions -- blank page or "Internet Explorer cannot display the webpage"

2010-02-02 Thread jepr
I am developing a web app using Python 2.6.1 and Django 1.1 on RedHat Linux. When a user on VISTA and IE7 submits form data (POST method), they either get a blank page or the error message "Internet Explorer cannot display the webpage". I do not see the same error on Firefox, Chrome or IE8.

Re: help with Django model and 'choices'

2010-02-02 Thread Chris McComas
Thnx. The reason the grade values are 4.33, 4. 3.67 etc is because that value is multiplied by the value entered for ha_credithours and hp_credithours. If there's a better way to do this from the beginning, like changing the values for the grade_choices and then multiplying it different in my

Re: model design and derived classes - need advice please?

2010-02-02 Thread Tomasz Zieliński
On 2 Lut, 16:06, Simon Davies wrote: > Hi > > I am writing a web shop.  I have a shopping cart class, which has a > many to many relationship to an item class, the item class has three > derived classes.  The basic schema is shown below: > > class Item(models.Model): >        

Re: help with Django model and 'choices'

2010-02-02 Thread Shawn Milochik
On Feb 2, 2010, at 10:40 AM, Chris McComas wrote: > Here's my view: > > http://dpaste.com/153735/ > > One thing I just thought of, is it a problem that the data for > ha_grade and hp_grade are saved in the db as 4.3300 or 4. or > 3.6700 but in the on my form they're like this: 4.33 or 4.0

Re: help with Django model and 'choices'

2010-02-02 Thread Chris McComas
Here's the view... http://dpaste.com/153735/ Could it possibly be that the grade is saved in the db as 4.3300 or 4. or 3.6700 but when I view source the select on the form looks like this: - A+ A A- B+ B B- C+ C C- CR On Feb 2, 10:32 am, Shawn Milochik wrote:

Re: Project based permissions - best way to implement?

2010-02-02 Thread Stodge
I'm providing my own functions for determining permissions, so I store the user, a permission and a project. I'll have to keep admins away from the permissions page as that'll bypass project based permissions. On Jan 28, 2:53 pm, Stodge wrote: > I thought there might be a way

Re: Template-Include and block.super

2010-02-02 Thread Alex Robbins
Daishy, it would help if you posted the template code you already tried. This is basically how you could do what you are describing: base.html {% block extrahead %} {% endblock %} sub_page.html {% extends "base.html" %} {% block extrahead %} {{ block.super }}

Re: help with Django model and 'choices'

2010-02-02 Thread Chris McComas
Here's my view: http://dpaste.com/153735/ One thing I just thought of, is it a problem that the data for ha_grade and hp_grade are saved in the db as 4.3300 or 4. or 3.6700 but in the on my form they're like this: 4.33 or 4.0 or 3.67 ??? On Feb 2, 10:32 am, Shawn Milochik

Re: Rebuild admin site after dropping field from models.py?

2010-02-02 Thread Alex Robbins
John, I don't think the problem is as fixed as it appears. You probably still have the foreign key in your database. Like Shawn said, syncdb only adds new models as tables in the db. It doesn't do anything to existing models. It won't delete a model that you delete, or change fields on a model

Re: help with Django model and 'choices'

2010-02-02 Thread Shawn Milochik
Okay. Sorry, I don't see anything in the model or ModelForm that seem like they might cause this behavior. How about the view(s) that instantiate the ModelForm? Shawn -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: help with Django model and 'choices'

2010-02-02 Thread Chris McComas
Here's my model form: http://dpaste.com/153728/ The info isn't being saved as an empty value. When I view my db with phpmyadmin, the correct values are in the ha_grade and hp_grade field in the db, the drop-down list on the forms is just not displaying them as being 'selected'. On Feb 2,

Re: help with Django model and 'choices'

2010-02-02 Thread Shawn Milochik
If you post the ModelForm we might be able to help more, but I'll venture a guess. Do you have any templates where you use this ModelForm but do not show the grades for editing? If so, and someone does an update, you're saving those fields with empty values unless you explicitly exclude them

model design and derived classes - need advice please?

2010-02-02 Thread Simon Davies
Hi I am writing a web shop. I have a shopping cart class, which has a many to many relationship to an item class, the item class has three derived classes. The basic schema is shown below: class Item(models.Model): title = models.CharField(max_length=100) description =

help with Django model and 'choices'

2010-02-02 Thread Chris McComas
I have this model http://dpaste.com/153722/ and I have a ModelForm for it on my site. When I complete the form it saves everything as it should and displays just a detail page for each entry with all of the correct information from the Model. When I go back to edit the form, or I view it in the

Re: Apache & wsgi & Django > Content-Length

2010-02-02 Thread Brett Parker
On 02 Feb 06:30, urosh wrote: > Hello. > > I have a problem with content-length heater in HTTP-message. I am > writing application for voip phone, which is not always specified, > then the phone can't download xml file correctly (stupid, I gess). > > How can I correct this behaviour? > I tested

Re: Wanted: someone to customize shipping module in Satchmo

2010-02-02 Thread Shawn Milochik
#1: Post this on DjangoGigs #2: Asking for a time estimate with no requirements can not produce useful responses. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To

Wanted: someone to customize shipping module in Satchmo

2010-02-02 Thread Jordan
We need someone to customize the shipping module in Satchmo. If this is something you have done or think you have the skills to do please send information about how much time it will take, per hour cost and when it can be ready. -- You received this message because you are subscribed to the

Re: Added-value over PHP?

2010-02-02 Thread Vincent
Thanks Richard. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options,

Apache & wsgi & Django > Content-Length

2010-02-02 Thread urosh
Hello. I have a problem with content-length heater in HTTP-message. I am writing application for voip phone, which is not always specified, then the phone can't download xml file correctly (stupid, I gess). How can I correct this behaviour? I tested this with wget tool. Here are results.

Re: Added-value over PHP?

2010-02-02 Thread Richard Shebora
http://pinaxproject.com/ On Tue, Feb 2, 2010 at 9:21 AM, Vincent wrote: > On 2 fév, 15:15, Shawn Milochik wrote: > > There is much to say on this topic. I suggest doing some Google searching > on "Django versus PHP" and read until you know the

Re: Added-value over PHP?

2010-02-02 Thread Vincent
On 2 fév, 15:15, Shawn Milochik wrote: > There is much to say on this topic. I suggest doing some Google searching on > "Django versus PHP" and read until you know the answer to your question. > > My brief summary is that Django lets you do everything you can do in PHP, and

Re: Added-value over PHP?

2010-02-02 Thread Shawn Milochik
There is much to say on this topic. I suggest doing some Google searching on "Django versus PHP" and read until you know the answer to your question. My brief summary is that Django lets you do everything you can do in PHP, and much better and faster because it has all the mundane and

Re: Applications disapearing from admin at random

2010-02-02 Thread Karen Tracey
On Tue, Feb 2, 2010 at 6:10 AM, Thomas Schreiber wrote: > Missing applications in the admin is the sign of an error in an admin.py > I'd double check there first. > Or admin registrations being placed somewhere besides admin.py. Sometimes people put them in models.py and that

Re: Initial data fixtures and auto_now_add=True

2010-02-02 Thread Andrew Turner
On Feb 2, 1:45 pm, Russell Keith-Magee wrote: > Correct. I'm guessing that the same thing is happening - the default > value is being used because the fixture doesn't specify a value. Feel > free to update the ticket so the auto_now case isn't forgotten. Done ;) Kind

Re: inspectdb question

2010-02-02 Thread Karen Tracey
On Mon, Feb 1, 2010 at 11:32 PM, Mike wrote: > Hi, > > I've tried to import my legacy MySQL database using > > python manage.py inspectdb --database=myolddb >>models.py > > and found that all varchar(N) fields became models.CharField > (max_length=3*N,...) > i.e. three times

Re: Initial data fixtures and auto_now_add=True

2010-02-02 Thread Russell Keith-Magee
On Tue, Feb 2, 2010 at 9:41 PM, Andrew Turner wrote: > On Feb 2, 1:29 pm, Russell Keith-Magee wrote: >> The cause of the problem is your initial fixture. Django doesn't >> listen to auto_now_add or auto_now fields on fixture loading - fixture >>

Re: Initial data fixtures and auto_now_add=True

2010-02-02 Thread Russell Keith-Magee
On Tue, Feb 2, 2010 at 5:12 PM, Andrew Turner wrote: > On Feb 2, 8:07 am, Russell Keith-Magee wrote: >> It is possible you've found a bug, but in order to verify that, we >> need a minimal example that reproduces the problem - that is, the >>

Added-value over PHP?

2010-02-02 Thread Fred
Hello I'm no expert on web applications, and have a couple of questions about Djanjo: 1. What are the advantages of using a framework like Django over writing the same type of database-driven in PHP? 2. Is Django domain-agnostic, or are there applications for which it's a better idea to use

Re: CheddarGetter module for Django/Python - easy recurring billing

2010-02-02 Thread Joe Kueser
Could come in quite handy for us very soon. Thanks, Jason. On Feb 1, 3:11 pm, Jason Ford wrote: > We just released pychedder, an open source module for integrating > CheddarGetter with Django and Python: > >

inspectdb question

2010-02-02 Thread Mike
Hi, I've tried to import my legacy MySQL database using python manage.py inspectdb --database=myolddb >>models.py and found that all varchar(N) fields became models.CharField (max_length=3*N,...) i.e. three times longer. Is it a bug or an expected behavior? BTW I use trunk rev. 12374 and

Re: Any clues on error importing middleware?

2010-02-02 Thread phoebebright
OK - removed all the custom middleware and revealed an earlier problem: ] __import__(name), referer: http://phb.tinycomms.com/ ] File "/home/django/tinycomms/libs/tinycomm.py", line 13, in , re ] from tinycomms.tinycomm.models import *, referer: http://phb.tinycomms ] File

Re: test fixtures

2010-02-02 Thread knight
Hi, Thanks for the reply. Checked both things and it's fine. I mean, I can load the fixtures with loaddata and I'm importing from django.test. Any other ideas? On Feb 1, 4:28 pm, Russell Keith-Magee wrote: > On Mon, Feb 1, 2010 at 10:01 PM, knight

Re: Any clues on error importing middleware?

2010-02-02 Thread phoebebright
Gonzalo, Double checked that one, Checked all calls to a fields module (only 2) and I can import both fine in the shell and I can see both in the list of files. Any other thoughts?! Phoebe. On Feb 2, 12:12 pm, Gonzalo Delgado wrote: > El 02/02/10 08:33, phoebebright

Re: Any clues on error importing middleware?

2010-02-02 Thread Gonzalo Delgado
El 02/02/10 08:33, phoebebright escribió: > But fields is not mentioned in the middleware: > > from libs.utils import changehat > class CheckScopeMiddleware: > """ > if there is a hat in the GET then swithc to that hat (if > different) > """ > def process_request(self, request): >

Re: Overriden Model.save causes TabularInline save error

2010-02-02 Thread Henning Kage
Thanks a lot, I missed to override the TabularInline class, too. I will give it a try. On 1 Feb., 18:01, Daniel Roseman wrote: > On Feb 1, 4:11 pm, Henning Kage wrote: > > > > > > > Hello together, > > > I have overriden the models.Model.save

  1   2   >