sqlite3 backend error

2010-05-04 Thread mf
Hi, before installing Ubunto 10.04 all of my projects worked pretty well. Now I'm getting an error and I don't know how to solve it. This is the result of running the python manage.py runserver command: django.core.exceptions.ImproperlyConfigured: 'django.db.backends.sqlite3' isn't an available d

Change variable value after a click

2010-09-10 Thread mf
I'm working in a django view and I'd like to duplicate the items_rating value of myview when I click to "see more categories" in the template. All of this without refreshing the web. I think that I have to use jquery and Ajax to perform this action but I don't know how to do it. The examples I rea

Re: Change variable value after a click

2010-09-13 Thread mf
What about using request.is_ajax() inside my view?. -- 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...@googl

Implementing accounts

2010-09-28 Thread mf
After finishing the core functionalities of my project it's time to begin with other secundary but important things. I've something like the following models.py file: class Category(models.Model): name = models.CharField(max_length=30) class Transaction(models.Model): name = models.CharFi

Language problem with date based generic views

2010-10-12 Thread mf
I've changed the language-code from en-us to es-ar and the url's began to fail. Example: When I click in "Agosto 2010" the URL is "http://mysite.com/ weblog/2010/**ago**/" and the server couldn't finde the page. But if I browse "http://mysite.com/weblog/2010/**aug**/ the server finds and shows the

Re: Language problem with date based generic views

2010-10-12 Thread mf
Thanks Tom!, it worked perfectly fine. On 12 oct, 12:00, Tom Evans wrote: > On Tue, Oct 12, 2010 at 3:32 PM, smallfish wrote: > > \w not include *, try use (.*) > > -- > > blog:http://chenxiaoyu.org twitter: @nnfish > > I'm pretty sure he was just highlighting the differences between the > two U

Add a create button for foreign keys(ModelForms)

2010-11-11 Thread mf
I have the following models.py file: class Account(models.Model): name = models.CharField(max_length=30) user = models.ForeignKey(User, related_name='account_creator') class Category(models.Model): name = models.CharField(max_length=30) account = models.ForeignKey(Account, related

How to except a TranslationError

2010-02-01 Thread mf
I'm translating a db from english to spanish with the Google translator API. The problem is when a TranslationError occurs. I can except the first one, but I don't know how to except again. It must be a pythonic way to solve this, but I failed to find it. Here's a snippet from the code: english_f

[MODELS] Default value depending on other table field

2010-02-05 Thread mf
I have a table named service with a type field. The amount of the service depends on the type field. The price of the type of service could change. But the amount could sometimes be a different value, because of special clients, discounts, etc... I would like to fill the amount field with the defa

Utilization of get_FOO_display()

2010-02-08 Thread mf
I want to show the human-readable name for the type selected but I keep getting the stored value. TYPE_CHOICES = ( ('0', 'Basic'), ('1', 'Full'), ('2', 'Intermediate'), ) class ServiceType(models.Model): type = models.IntegerField(max_length=1, choices=TYPE_CHOICES

Stock trading app

2010-02-09 Thread mf
Someone knows about an open source stock trading application?. I'm not talking about a professional app, I mean a simple app where the different stock holders of a company can sell/buy stocks between them. -- You received this message because you are subscribed to the Google Groups "Django users

Building a financial app with Django

2010-04-06 Thread mf
Hi guys, I'm building an app for a small business so I've to work with currencies, decimal numbers, etc... My goal is to create something like pulseapp.com. I've searched for opensource projects to look and the only thing I had found was django-cashflow. This app uses python-money. I've read some

Serializing a model with a pickefield field

2011-11-09 Thread mf
I need to serialize a django model which contains a pickefield. The problem with this is that if I do the following: python manage.py dumpdata myapp --indent=4 > data.json I end up getting a data.json file with the following information in each picklefield field: "picklefield_field": "gA

Multiple access to static data

2011-12-03 Thread mf
I'm building an application and I'm having trouble making a choice about how is the best way to access multiple times to static data in a django app. My experience in the field is close to zero so I could use some help. The app basically consists in a drag & drop of foods. When you drag a food to

Add custom html between two model fields in Django admin's change_form

2011-06-07 Thread mf
Let's say I've two models: class Book(models.Model): name = models.CharField(max_length=50) library = models.ForeignKeyField('Library') class Library(models.Model): name = models.CharField(max_length=50) address = models.CharField(max_length=50) tel

Re: Add custom html between two model fields in Django admin's change_form

2011-06-07 Thread mf
lds = ('id', 'name',) admin.site.register(Presupuesto, PresupuestoAdmin) On 7 jun, 11:11, "christian.posta" wrote: > Create a different ModelForm that contains your readonly fields (and > populate them however you want) and set this on your ModelAdmin form

Re: Add custom html between two model fields in Django admin's change_form

2011-06-09 Thread mf
s, **kwargs) > >         if kwargs.has_key('instance'): >             instance = kwargs['instance'] >             # do something with the instance here, like use it to > calculate something, >             # then set the value on the 'test' field using >

NoReverseMatch in django production server

2011-07-07 Thread mf
The project is working fine in the dev server but when I try to use it in the production sv(Gunicorn + Nginx), NoReverseMatch error appears. I checked the code several times and I can't find the error. urls.py: from django.conf.urls.defaults import patterns, include, url from django.conf import s

Problem loading admin static files

2011-07-11 Thread mf
I'm trying to upload my project to the production server but it fails to load the admin static files. settings.py: import os PROJECT_DIR = os.path.dirname(__file__) MEDIA_ROOT = os.path.join(PROJECT_DIR, 'media') MEDIA_URL = '/media/' STATIC_ROOT ='/srv/www/antingprojects.com.ar/gobras/st

Django open source cashflow management app

2011-07-24 Thread mf
Does anyone knows about an open source cashflow management app like this one[0], built with django?. [0] http://pulseapp.com/ Thanks for your help. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-use

Thinking to change my db schema

2011-01-16 Thread mf
I'm building a web app with django. It uses postgresql. The app code is getting really messy and I'd like to improve it(my begginer skills being a big factor too). This is an excerpt of my models.py file: REPEATS_CHOICES = ( (NEVER, 'Never'), (DAILY, 'Daily'), (WEEKLY, 'Weekly'),

Submitting Django forms with AJAX

2011-02-03 Thread mf
I want to have a little feedback form in one of my views but I can't get it to work. I put a pdb.set_trace() to debug the views but when I click submit the view reloads and never gets into the if request.method == 'POST' and... code section. I'm very confused about how to approach ajax forms submis

Re: Submitting Django forms with AJAX

2011-02-04 Thread mf
Thanks Daniel, I made the change but I see no different results. On Feb 4, 6:29 am, Daniel Roseman wrote: > On Friday, February 4, 2011 1:41:36 AM UTC, mf wrote: > > > I want to have a little feedback form in one of my views but I can't > > get it to work. I put a pdb.s

Ajax form in django

2011-02-16 Thread mf
Hi, the problem I'm having is that, when I submit the form, the response is placed in a new url(/feedback) instead of placing it in the actual(/results) url. The alert never gets executed. I guess I'm doing something wrong in the template but I can't find views.py: def ajax_feedback(request):

Re: __unicode__ and return.self

2012-03-24 Thread MF-DOS
Thanks for the reply. If my model has 5 fields, why am I only returning one or two? Shouldn't I return all 5? On Mar 24, 9:19 pm, Jonathan Baker wrote: > The __unicode__ method allows models to return a more usable representation > of a record instead of a unicode object. This is useful in a var

all(), get(), create(), count(). More info?

2012-03-24 Thread MF-DOS
Running this tut: https://docs.djangoproject.com/en/1.1/intro/tutorial01/ Here is a list of shell commands I'm asked to issue, but I don't understand where the commands are coming from? Are these Django or Python commands? I've attempted to query help and read the docs but can't find them anywhere