Re: def __str__(self,):

2007-09-20 Thread mika
You could try return str(self.name) or return '%i' % self.name On 9/20/07, Greg <[EMAIL PROTECTED]> wrote: > > Do this method have to return a string? I have the following model: > > class Price(models.Model): > name = models.DecimalField(max_digits=6, decimal_places=2) > price_cat = mod

Problems creating django project in Windows 7

2012-03-07 Thread Mika
Went into my user directory(C:\Users\Mika) to find mysite folder, but it wasn't there. I'm not getting any error messages at all either in the command prompt, so I'm not sure what's going on. Please advise. thnx Mika -- You received this message because you are subscribed to t

Re: Problems creating django project in Windows 7

2012-03-07 Thread Mika
alBox or VMWare (or > whatever else) and do all this stuff from Ubuntu. It will save you > many, many headaches. > > On Mar 6, 8:56 pm, Mika wrote: > > > > > > > > > Hi, > > I uninstalled and reinstalled django to see if that would solve > > things, bu

Keep getting 404 error

2012-03-24 Thread Mika
I'm a total newbie to django and just started the book. I created a project and I'm now trying to create my first page, but I keep getting an error page that says: Page not found (404) Request Method: GET Request URL:http://127.0.0.1:8000/ Using the URLconf defined in redlab.urls, Django tried

Template file not recognized for some strange reason

2012-03-29 Thread Mika
I'm working through one of the template examples in the django book and the template file I created isn't being recognized for some reason even though it's in the folder. The error report is at the bottom of the page. The TEMP_DIRS variable is set to the correct file path in my settings file: TEMP

Can't get model to show up in admin interface

2012-04-26 Thread Mika
I'm working through James Bennet's Practical Django Projects 2nd edition. I have a folder called "coltrane" which has a models.py file with the following: from django.db import models class Category(models.Model): title = models.CharField(max_length = 250) slug = models.SlugField(

How do you write a django model that can crunch numbers and automatically populate another field with results?

2012-05-08 Thread Mika
There's a more detailed version of this question where I've embedded graphics and explained my algorithm to make it more clear on stackoverflow. I haven't gotten a response on it yet so I thought I might come here and see if anyone can help me out. http://stackoverflow.com/questions/10493279/how-d

Hi GQuery but for Django? Is somebody developing it?

2011-06-20 Thread Mika Sjöman
code like they do with java and jquery (sort of) in GQuery. Also creating a new DjQuery, would mean that developers could stick to writing the code inside their python code instead of having a second front end language like JQuery. What do you guys think of the idea? Cheers Mika -- You received

Re: Question about including views in base templates

2011-01-27 Thread Mika J
I see now what you mean. I can really use that. Thanks for the answer! Michael 2011/1/27 Shawn Milochik > I think you're looking for context processors. > > > http://docs.djangoproject.com/en/dev/ref/templates/api/#writing-your-own-context-processors > > You write functions that add to the cont

Re: Clueless Monk

2011-03-23 Thread Mika Sjöman
the python interpreter by opening up the Terminal app in the /Applications/Utillities/ folder and just write pyton and hit enter. happy coding! //mika On Wed, Mar 23, 2011 at 1:24 PM, Sadra Kasraian wrote: > I have a black Macbook with OS-X. I was wondering how do I start using it > python

Re: Is there any Open Source Django Newspaper CMS?

2011-03-23 Thread Mika Sjöman
Hi What about trying google first before asking? Try to google> Django cms. // mika On Wed, Mar 23, 2011 at 7:03 PM, Rehmetjan wrote: > I mean a out-of-box ready for production newspaper CMS. thanks > > -- > You received this message because you are subscribed to the Google G

Re: Is there any Open Source Django Newspaper CMS?

2011-03-23 Thread Mika Sjöman
django-cms.org //mika On Wed, Mar 23, 2011 at 7:14 PM, Rehmetjan Tursun < rehmetjan.tur...@gmail.com> wrote: > I Googled many times, not a beautifull answer (except > http://code.google.com/p/crimson-online/ ) Demo: > http://www.thecrimson.com/ > > Do you know others? >

Re: Instructions for code changing to Django 1.3

2011-03-30 Thread Mika Sjöman
Hi I missed out on that one, is it possible to see it online afterwards? I have no problem paying the everbrite fee. // mika On Wed, Mar 30, 2011 at 10:17 PM, Shawn Milochik wrote: > It just so happens that there's a two-hour Webinar by Jacob > Kaplan-Moss tomorrow on this

Hi multilingual charfields?

2011-03-31 Thread Mika Sjöman
think it should be built in to core since so many of us use multiple languages in our webapps, so using it would be something like this: 1. import the multilang in models.py 2. flag specific fields for content translation 3. set the LANGUAGES in settings.py What do you guys think? // mika -- You