user profile is not getting saved in admin

2008-06-19 Thread Gene Campbell
I have looked through the docs and search the group and web. Seems other's are asking the question, but I haven't seen an answer yet. class UserProfile(models.Model): country = models.ForeignKey(Country, core=True) user = models.ForeignKey(User, unique=True, edit_inline=models.TABULAR, co

Thanks!!!!!!!!!!!!!!!!!

2008-06-19 Thread Gene Campbell
Just wanted to "THANKS" for an absolutely awesome web dev framework. --~--~-~--~~~---~--~~ 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.co

Re: Django HTML Editor

2008-06-19 Thread Gene Campbell
mmitted, and > that he has split the original Django mode. > > http://www.rutherfurd.net/jedit/modes/index.html#django > > Cheers, > > Tai > > On Jun 15, 2:23 am, "Gene Campbell" <[EMAIL PROTECTED]> wrote: >> jEdit - I've used it for years; it is goo

Re: unit testing and comparing dictionaries

2008-06-17 Thread Gene Campbell
expert at Python or Django!) On Wed, Jun 18, 2008 at 10:06 AM, Paul Winkler <[EMAIL PROTECTED]> wrote: > > On Jun 17, 1:46 am, "Gene Campbell" <[EMAIL PROTECTED]> wrote: >> Hello Djangonauts >> >> I'm a noob on both Django and Python, so thi

Re: unit testing and comparing dictionaries

2008-06-17 Thread Gene Campbell
Thanks for the insight! Do you write tests to check for constraints that are optional in definitions, for example? address4= models.CharField(max_length=45, null=True, blank=True) could be written as address4= models.CharField(max_length=45) Were is the most reasonable place to test t

Re: unit testing and comparing dictionaries

2008-06-17 Thread Gene Campbell
t;[EMAIL PROTECTED]> wrote: > > Gene Campbell wrote: >> Hello Djangonauts >> >> I'm a noob on both Django and Python, so this question might be easy >> for the experts out there. I am trying to do test first development >> during the development of my

unit testing and comparing dictionaries

2008-06-16 Thread Gene Campbell
Hello Djangonauts I'm a noob on both Django and Python, so this question might be easy for the experts out there. I am trying to do test first development during the development of my model code. (I have lots of experience with test first coding in the Java world, no practical experience in the

Re: help with fixtures

2008-06-15 Thread Gene Campbell
Many thanks for a very helpful response!! At this point, I assume the proper practice is to create the users in a setup() method when unittesting instead of assuming they'll be brought up automatically when testing. (Sorry, it's been a long day - I hope that makes sense.) On Mon, Jun 16, 2008

Re: simple python math help.

2008-06-15 Thread Gene Campbell
your doing integer division, and / gets you the number of times 200 is divisible by 400, which is 0 times in a integer context. try 200.0/400 if you make one a float, you get a float answer. or this... >>> size = float(200), float(400) >>> size[0]/size[1] 0.5 I'm still quite a python/django

Re: Django HTML Editor

2008-06-14 Thread Gene Campbell
jEdit - I've used it for years; it is good but not great for django. But, it's just a killer editor, I don't care. On Sun, Jun 15, 2008 at 3:42 AM, mario <[EMAIL PROTECTED]> wrote: > > Hi, > > Have you tried using TinyMCE. It works and is compatible with Django > Templates including bundled temp

Fwd: Pb with dumpdata/loaddata and unicode

2008-06-12 Thread Gene Campbell
I'm a noob, but perhaps this will help the discussion. http://www.djangoproject.com/documentation/serialization/ "If you're using UTF-8 (or any other non-ASCII encoding) data with the JSON serializer, you must pass ensure_ascii=False as a parameter to the serialize() call..." I saw this be

Re: Donate to Django

2008-06-11 Thread Gene Campbell
I, too, intend to donate (money, and hopefully time) as soon as I can. On Thu, Jun 12, 2008 at 5:51 AM, RKnobelspies <[EMAIL PROTECTED]> wrote: > > Well, Djangoproject is in progress of establishing a foundation and > after the paperwork is done (maybe it´s done already), you should > probably b

Re: reloading models in the shell

2008-06-11 Thread Gene Campbell
Oops. "For the changes to take effect, exit out of the Python shell and enter it again with python manage.py shell. (This is the simplest way to make code changes take effect.)" >From http://www.djangobook.com/en/1.0/chapter05/ On Thu, Jun 12, 2008 at 1:01 PM, Gene Campbell <

reloading models in the shell

2008-06-11 Thread Gene Campbell
I'm very new to Python and Django, I'm going through building some models for the first time. When I load the models in my shell like this python manage.py shell >>> from app.models import ModelClass then make a change to the ModelClass in models.py Now when back in the shell how do I reload th

Re: How to deserialize / serialize Json

2008-06-05 Thread Gene Campbell
Can't help you with your code below, you might want to provide the errors, and the import stmts. For JSON I use simplejson: http://code.google.com/p/simplejson/ hope that helps. On Fri, Jun 6, 2008 at 5:02 AM, mwebs <[EMAIL PROTECTED]> wrote: > > Hello, > > I try to deserialize Json. > >

Re: newforms custom field attribute

2008-05-30 Thread Gene Campbell
Something like with work for you? forms.CharField(attrs={'title':'blah'}) check out http://www.djangoproject.com/documentation/newforms/ On Sat, May 31, 2008 at 9:29 AM, skunkwerk <[EMAIL PROTECTED]> wrote: > > simple question - how can I add a custom attribute to a form field? > ie if I have a

Fwd: Does anyone use Eric to edit templates

2008-05-25 Thread Gene Campbell
anaged the whole Django project, it might be smart enough. On Sun, May 25, 2008 at 10:19 PM, Andre Meyer <[EMAIL PROTECTED]> wrote: > On Sun, May 25, 2008 at 12:13 PM, Kenneth Gonsalves <[EMAIL PROTECTED]> > wrote: >> >> >> On 25-May-08, at 10:37 AM, Gene Campbe

Does anyone use Eric to edit templates

2008-05-24 Thread Gene Campbell
Is there a way to make it "smart" - show enclosing structure of html elements, command complete django template syntax, etc. I'm new to so many of these tools. If there's something better than Eric for templates, can you recommend? I've used jEdit, but only for java dev. I can't remember how

Re: Looking for "django ready" web templates ....

2008-05-24 Thread Gene Campbell
That helps thanks. I'm new to python and django, coming from java and j2ee (gladly). I am about to dig into my very first html mockup template conversion soon, and I'm sure I understand how easy it is then. On Sat, May 24, 2008 at 2:00 PM, Jeff Anderson <[EMAIL PROTECTED]&g

Looking for "django ready" web templates ....

2008-05-23 Thread Gene Campbell
Is there a web template source, like http://www.templatemonster.com/, that provides templates ready to use with Django. I'm imagining a site that has different templates from which to choose and download, but is implemented with the django template language. For example, it could be a drop in r

design patterns

2008-05-23 Thread Gene Campbell
Someone recommended http://mochikit.com/ recommended as a good ajax toolkit. I don't think you'll find design patterns there - like how to design software. I'm a noob, and only trying to help. On Fri, May 23, 2008 at 5:14 AM, unixdude_from_mars <[EMAIL PROTECTED]> wrote: > > Being new to web d

What do you use for project management?

2008-05-20 Thread Gene Campbell
I have used Jira, and I'm looking at Trac today. Is there something more Djangonic? --~--~-~--~~~---~--~~ 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@googlegrou

Re: business logic and good practices

2008-05-20 Thread Gene Campbell
Hi, Thanks the for the reply. > The reason you must place your templates out from your app code is > because if you don't do that, anyone could access to the code via > browser. Just writing the path of your files, and they have the code. > It could be a security issue. Umm, if it doesn't matc

Fwd: Django and Linux distros

2008-05-19 Thread Gene Campbell
rote: >> On Mon, 2008-05-19 at 19:10 +1200, Gene Campbell wrote: >> > I totally agree. I took this path over the last 5 years: redhat (1 >> > yr) -> gentoo (3 yrs)-> archlinux (6 mos) -> pclinuxos (1 day) -> >> > ubuntu (6 mos) >> > >> &g

Re: Django and Linux distros

2008-05-19 Thread Gene Campbell
I totally agree. I took this path over the last 5 years: redhat (1 yr) -> gentoo (3 yrs)-> archlinux (6 mos) -> pclinuxos (1 day) -> ubuntu (6 mos) I loved Gentoo, taught me quite a bit. Now I love Ubuntu for the opposite reasons. I like not having to do much to keep my machine going. I'm n

What is the best search product?

2008-05-18 Thread Gene Campbell
Hi everyone, I am building a site that will require search. It will hold only about 600,000 web pages, but it may get quite a few users. I am looking at Solr and pylucene. Can anyone offer up some experience with these products? Are there any other ways to impl search like this with Python? -