Re: Inline validation

2010-02-08 Thread chefsmart
You could take a look at http://wadofstuff.blogspot.com/2009/08/requiring-at-least-one-inline-formset.html On Feb 8, 6:46 pm, Gabriel Reis wrote: > Hello guys, > > I have the following situation: > > class FooInline(TabularInline): >     model = Foo >     extra = 1 >    

Re: 'ValidationError' object has no attribute 'message_dict'

2010-02-08 Thread Kenneth Gonsalves
On Tuesday 09 Feb 2010 12:29:48 pm Karen Tracey wrote: > > simplest validation possible is giving me an error - if the data is > > valid, no > > error, but on invalid data I get the traceback appended below. Am I doing > > something wrong or is it bug no > >

Re: 'ValidationError' object has no attribute 'message_dict'

2010-02-08 Thread Karen Tracey
On Tue, Feb 9, 2010 at 1:47 AM, Kenneth Gonsalves wrote: > hi, > > I am using the latest revision 12398. I am trying model validation - but > the > simplest validation possible is giving me an error - if the data is valid, > no > error, but on invalid data I get the traceback

Customized filter for Django Admin

2010-02-08 Thread Derek
Given a model such as: class Country(models.Model): code = models.CharField(max_length=2, primary_key=True) name = models.CharField() class Region(models.Model): name = models.CharField() country = models.ForeignKey(Country) with an admin option: class

'ValidationError' object has no attribute 'message_dict'

2010-02-08 Thread Kenneth Gonsalves
hi, I am using the latest revision 12398. I am trying model validation - but the simplest validation possible is giving me an error - if the data is valid, no error, but on invalid data I get the traceback appended below. Am I doing something wrong or is it bug no

Re: want to convert object to json data.

2010-02-08 Thread Wayne Koorts
> I want to convert a given regular object to json object. i.e. I want > to create a function which takes the class object as parameter and it > should return the json object. Have a look at the built-in Django "serializers" module:

want to convert object to json data.

2010-02-08 Thread chiranjeevi.muttoju
Hi all, I want to convert a given regular object to json object. i.e. I want to create a function which takes the class object as parameter and it should return the json object. If anybody know please help me how to approach to get this. Thanks and regards, --chiranjeevi -- You received this

What do you think of pycharm?

2010-02-08 Thread Joshua Partogi
Hi all, I just found a new Python IDE that supports django, named pycharm (http://www.jetbrains.com/pycharm). I was wondering whether anyone else has used it? If so, what do you think about the django support in it? Do you think it's good or useless? Kind regards, -- http://twitter.com/scrum8

Re: "django-admin.py startproject xyz" opens text editor

2010-02-08 Thread Karen Tracey
On Tue, Feb 9, 2010 at 1:32 AM, gvkalra wrote: > "django-admin.py startproject xyz" opens my default text editor viz. > Notepad++ and opens the file django-admin.py in it for editing...What > could be the reason? I am not able to create a project > I guess you are on Windows?

"django-admin.py startproject xyz" opens text editor

2010-02-08 Thread gvkalra
"django-admin.py startproject xyz" opens my default text editor viz. Notepad++ and opens the file django-admin.py in it for editing...What could be the reason? I am not able to create a project -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: How can _meta.local_fields not match the table schema in the database?

2010-02-08 Thread Russell Keith-Magee
On Mon, Feb 8, 2010 at 1:10 AM, br...@instantdirectmarketing.com wrote: > I'm completely confused about why _meta.local_fields returns more > fields than the database table contains. The User model inherits from > contrib.auth.models.User. ... > I wonder if the

Tutorial 4 - generic views - No polls are available

2010-02-08 Thread galien
Yet Another Noob here... I've searched f the prblem I have. I found some but no post helped. I followed the tutorial step by step. I had no problem until generic views. (Windows XP - Django 1.1.1 - python 2.6.4.8 ) Here's the directory hierarchy E:\djanggoHttpDoc\mysite - settings.py,

Sorting by a GenericRelation Causes Result Oddities

2010-02-08 Thread Bryan Veloso
Alright, let's see if I can explain this: I have an Artist model and artists get positionally ranked. It has a GenericRelation to another model that stores scores from that ranking. I wanted to be able to sort Artists by their score using that GenericRelation. Here's an example (ran this in the

images in admin/change_list.html

2010-02-08 Thread django_jedi
I feel like I'm missing something obvious. Another set of eyes would be greatly appreciated. I'm trying to add an image to the change_list form in the admin. Doesn't seem to work. Here's a snippet I found that gets me most of the way there: (from models.py) def

Re: specifying the pk for an insert

2010-02-08 Thread felix
well I'll be damned, it worked usage: apt = Apt() # old is coming via multi-db connection to mysql # apt is saved in postgres apt.id = old.id # the seq name is {app}_{model}_id_seq legacy_save(apt,'nsproperties_apt_id_seq') # after all apts are imported then set the seq correctly:

Re: Creating an external url in the django admin section

2010-02-08 Thread Vasil Vangelovski
You can override the template for a specific app by first copying it to a template folder respectful to that app See this: http://docs.djangoproject.com/en/dev/ref/contrib/admin/#overriding-admin-templates On Mon, Feb 8, 2010 at 8:16 AM, djangonoob wrote: > Hi all. >

Re: Using ForeignKey with dJango and PyAMF

2010-02-08 Thread Vasil Vangelovski
There's a bug in PyAMF: http://dev.pyamf.org/ticket/694 On Mon, Feb 8, 2010 at 5:54 PM, WC wrote: > Hi Everyone, > > I have a ForeignKey field that is always null on the Flex client.  I > have tried using select_related(), but it's still null.  Any idea what > I am doing wrong?  

how to define DJANGO_SETTINGS_MODULE for multiple sites.

2010-02-08 Thread neridaj
I'm trying to setup my first cron job and I think the reason my script is not running is because I don't have DJANGO_SETTINGS_MODULE defined for my environment i.e., .profile script. I'm using mod_wsgi so my DJANGO_SETTINGS_MODULE is defined in the respective wsgi file for each site, so my

specifying the pk for an insert

2010-02-08 Thread felix
Hello - I'm migrating a large site (mysql/php to postgres/django) and would like to keep the primary ID of one of the tables. The id is public as in people call other people on the phone and say "hey what about that #9843 ?" all the code already refers to the ID for URLs etc. I'm thinking that

Re: Possible bug with django 1.2, postgresql and aggregates?

2010-02-08 Thread Russell Keith-Magee
On Tue, Feb 9, 2010 at 2:08 AM, Mathieu Pillard wrote: >> It may indeed be that the MAX clause is using "mat_foo" instead of the >> assigned correlation U0. What happens if you paste the two SQLs into a >> query window in PgAdmin 3 and execute them. If the 1.2 query fails >>

Re: Grouping and returning latest of each group?

2010-02-08 Thread Streamweaver
I think really I'm better off redesigning my model structure for this. Even trying to do it in pure SQL or with the extra attribute it's ungodly messy. What I really need is a Ticket model and a TicketHistory model. Keep the most rescent ticket information in Ticket and versions of tickets in

Re: How to setup multiple django domains under Apache and Ubuntu server???

2010-02-08 Thread Graham Dumpleton
Do you have appropriate NameVirtualHost directive anywhere in your Apache configuration? This must match pattern used by VirtualHost definitions. You would also normally use '*:80' and not just '*'. Thus: NameVirtualHost *:80 .. .. Graham On Feb 9, 11:57 am, WeissBlitz

How to setup multiple django domains under Apache and Ubuntu server???

2010-02-08 Thread WeissBlitz
Hello all! I setup an Ubuntu Server 9.04 running Apache c2.2.11 and Django v1.2. I basically have two sites installed using WSGI. While under development I'm using the following domain names for the sites: articlehub.dnsalias.com and jobsbot.gotdns.com, both pointing to my home IP. So I created

Re: sqlite3 gives "OperationalError: no such table: django_redirect"

2010-02-08 Thread Phlip
> It appears you have not run manage.py syncdb after adding > 'django.contrib.redirects' to INSTALLED_APPS. > > Karen Ah, I don't know if I have that in there yet (yes, it's hard to check), but I DO have this... 'django.contrib.redirects.middleware.RedirectFallbackMiddleware' ...in

Re: Page not found for password_reset_confirm

2010-02-08 Thread Sonal Breed
Thanks Shawn. I put the name of the production site instead of the local test site, hence the page not found error. :( Thanks again for your help, Thanks, Sincerely, Sonal. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

What's the latest on compound and nested forms?

2010-02-08 Thread Philip Zeyliger
Hi folks, I'm curious how people are managing complex forms in their django applications these days. As an example, let's say we're editing an address book entry, where someone can have multiple e-mail addresses and phone numbers. Ideally, I'd want to do something like: class

Re: Named urls and urlconf includes are incompatible

2010-02-08 Thread adambossy
Bingo. The value should have been invitation_key and not invitation_key.key. Good catch! On Feb 8, 3:41 pm, Karen Tracey wrote: > On Mon, Feb 8, 2010 at 6:24 PM, adambossy wrote: > > I'm trying to install the django-invitation app on bitbucket, but I'm

Re: sqlite3 gives "OperationalError: no such table: django_redirect"

2010-02-08 Thread Karen Tracey
On Mon, Feb 8, 2010 at 6:56 PM, Phlip wrote: > > It appears you have not run manage.py syncdb after adding > > 'django.contrib.redirects' to INSTALLED_APPS. > > Even when testing into sqlite3 :memory:? I thought that obviated all > syncdb considerations... > > No, for tests

Re: sqlite3 gives "OperationalError: no such table: django_redirect"

2010-02-08 Thread Phlip
> It appears you have not run manage.py syncdb after adding > 'django.contrib.redirects' to INSTALLED_APPS. Even when testing into sqlite3 :memory:? I thought that obviated all syncdb considerations... -- You received this message because you are subscribed to the Google Groups "Django users"

Re: Named urls and urlconf includes are incompatible

2010-02-08 Thread Karen Tracey
On Mon, Feb 8, 2010 at 6:24 PM, adambossy wrote: > I'm trying to install the django-invitation app on bitbucket, but I'm > running into an error I've been seeing repeatedly with urls. I've > googled this and various permutations have occurred to various people, > but not

Re: Page not found for password_reset_confirm

2010-02-08 Thread Shawn Milochik
Check the actual URL you're receiving in your e-mail. See if it matches any of the patterns in your urls.py. One thing that looks odd to me is that your pattern for forgot-password ends with '?$," which doesn't look right to me. But it seems like you're saying the problem is after that point.

Named urls and urlconf includes are incompatible

2010-02-08 Thread adambossy
I'm trying to install the django-invitation app on bitbucket, but I'm running into an error I've been seeing repeatedly with urls. I've googled this and various permutations have occurred to various people, but not this one in particular. The general problem occurs when I try to include a url

Re: Page not found for password_reset_confirm

2010-02-08 Thread Sonal Breed
Thanks Shawn! After changing the domain name in admin, I could get the subject right. however, the page not found problem still persists. I have provided my urls.py earlier. And I have the following files in the directory mentioned in TEMPLATE_DIRS setting.

Re: Page not found for password_reset_confirm

2010-02-08 Thread Shawn Milochik
Go into the admin and edit the entry in the Sites application for your site. It's using example.com as a placeholder. Shawn -- 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

Page not found for password_reset_confirm

2010-02-08 Thread Sonal Breed
Hi all, I am implementing "Forgot your password" feature using following tutorial. http://www.rkblog.rk.edu.pl/w/p/password-reset-django-10/ My email for password gets sent. but once I click the URL in the mail get page not found error. My urls.py is urlpatterns +=

Re: sqlite3 gives "OperationalError: no such table: django_redirect"

2010-02-08 Thread Karen Tracey
On Mon, Feb 8, 2010 at 4:51 PM, Phlip wrote: > Djangoids: > > I get this error message whenever I really need client.get() to run, > in a test. Different apps and configurations show the problem in > various situations. > > The only Google hit for the error message with

Re: Reversed URLs problem

2010-02-08 Thread Karen Tracey
On Mon, Feb 8, 2010 at 4:06 PM, adambossy wrote: > Hey folks, thanks for the responses. Your questions alone helped me > find the answer. Apparently, it was a problem with my apache2 > configuration. I basically copied the directives from the django > website, with one small

Grouping and returning latest of each group?

2010-02-08 Thread Streamweaver
I have a model called 'Ticket' with several fields 'number', 'milestone', 'status', 'resolution', 'estimate', 'last_updated' These are just multiple entries for the same support ticket that I'm pulling from another system. I keep multiple entries of a ticket so I can trac changes in estimation

Re: Javascript Modal Window

2010-02-08 Thread Shawn Milochik
You can use a jQuery UI Dialog. It can be modal, and you can easily use some jQuery AJAX to submit your login view and receive the response. Shawn -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: inputting a request.user into a model on the backend

2010-02-08 Thread goome
My previous mex got with wrong identation: the last 4 lines need to start at the same level: if request.method == 'POST': form = GoalForm(request.POST) if form.is_valid(): goal=form.save(commit=False) goal.user=request.user goal.save() form.save_m2m() -- You received this

sqlite3 gives "OperationalError: no such table: django_redirect"

2010-02-08 Thread Phlip
Djangoids: I get this error message whenever I really need client.get() to run, in a test. Different apps and configurations show the problem in various situations. The only Google hit for the error message with sqlite3 is some lone webpage dumping the problem. Get the full trace there!

Re: inputting a request.user into a model on the backend

2010-02-08 Thread goome
On 7 Feb, 22:26, kamilski81 wrote: > I am trying to set a user on a model, on the back-end. > >         u = request.user >         g = Goal() >         g.user = u >         form = GoalForm(request.POST, g) > > I am getting the following error: > goal.user_id may not be

moderation of djangosearch.com

2010-02-08 Thread Alrond
Hi all, I am the developer of the search engine djangosearch.com. I am supporting this project for several years. There are articles about django for the last four years, the search is available in 10 languages. I strictly supervise the quality of articles and news, I check all of them myself for

Javascript Modal Window

2010-02-08 Thread CrabbyPete
I want to use greybox to show a login form. My question is what is the best way to do this? Here is the line I am using in m template Login Should I directly link to the form, or use {% url xxx %}, or is there something else I should do? Also can I send it back up if I get errors? Any advice

Re: Django Mailing List Manager

2010-02-08 Thread Gonzalo Delgado
El 08/02/10 18:04, gregory.para...@gmail.com escribió: > Does anyone know of any good email list managers in Django? Even just > a simple app for a coming soon page that would take users email > address and let you email them with updates would be great. > You may want to take a look at

Re: Reversed URLs problem

2010-02-08 Thread adambossy
Hey folks, thanks for the responses. Your questions alone helped me find the answer. Apparently, it was a problem with my apache2 configuration. I basically copied the directives from the django website, with one small modification:

Django Mailing List Manager

2010-02-08 Thread gregory.para...@gmail.com
Does anyone know of any good email list managers in Django? Even just a simple app for a coming soon page that would take users email address and let you email them with updates would be great. -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: MySQL-python 1.2.3 and OS X 10.5: 64- or 32-bit?

2010-02-08 Thread monchi
Dave, Just wondering how you managed to get Django and MySQL to work on Leopard 10.5. I've spent 2 days on it and still stuck on the same error - described here: http://groups.google.com/group/django-users/browse_thread/thread/178bd307b9551e2b# Which versions of Python, MySQL and MySQLdb do you

creative commons london based django project - secretlondon - team needed

2010-02-08 Thread timjdavey
Hi there, Fancy joining a great team on a django community project? http://eu.techcrunch.com/2010/02/07/startup-to-launch-after-secret-london-facebook-group-amasses-18/ We'll be hosting a dev session this weekend - in a location somewhere in london. We have some great designers, a few css/js

Re: Possible bug with django 1.2, postgresql and aggregates?

2010-02-08 Thread Mathieu Pillard
> It may indeed be that the MAX clause is using "mat_foo" instead of the > assigned correlation U0. What happens if you paste the two SQLs into a > query window in PgAdmin 3 and execute them. If the 1.2 query fails > with the same error message, I'd report a bug. > > If it doesn't fail, it's still

Re: Possible bug with django 1.2, postgresql and aggregates?

2010-02-08 Thread Brian
It may indeed be that the MAX clause is using "mat_foo" instead of the assigned correlation U0. What happens if you paste the two SQLs into a query window in PgAdmin 3 and execute them. If the 1.2 query fails with the same error message, I'd report a bug. If it doesn't fail, it's still a Django

Re: Using ForeignKey with dJango and PyAMF

2010-02-08 Thread WC
By the way, all I really need is the parentBlock_id. On Feb 8, 11:54 am, WC wrote: > Hi Everyone, > > I have a ForeignKey field that is always null on the Flex client.  I > have tried using select_related(), but it's still null.  Any idea what > I am doing wrong?  In the

Re: No module named urls

2010-02-08 Thread Brian
Aaargh! I knew it had to be something like that! Thanx Karen. On Feb 7, 5:20 pm, Karen Tracey wrote: > On Sun, Feb 7, 2010 at 4:27 PM, Brian wrote: > > Hi all, > > > I'm putting together a Django application from scratch and have > > created my

Django 1.1.1 + mod_python = base.css was swallowed in admin pages

2010-02-08 Thread Andrew Budarevsky
Hello All, I am trying to get my admin pages work but failed. I have several django apps on the same hosting. For the latest I dopped in the latest brand new django 1.1.1 and mentioned it via PythonPath directive. Everything works but admin pages - they miss link to base.css. --

Possible bug with django 1.2, postgresql and aggregates?

2010-02-08 Thread Mathieu Pillard
Hi, I have been testing the 1.2 beta1 and think I found a bug, but since the query I'm using is a bit complicated I wanted to run it through the list first. The model I'm using: from django.db import models from django.contrib.auth.models import User class Foo(models.Model): subject =

Re: satchmo customization experiences? customizing existing e-com vs. roll-your-own

2010-02-08 Thread snfctech
Thanks for your reply, Chris. And thanks for the links. However, the Stack Overflow example seems to be talking about cloning and a tendency of developers to exaggerate their ability to understand the complexity of a piece of software and how long it would take them to do it. My point is not

Re: Callback method on session timeout

2010-02-08 Thread Andy McKay
On 2010-02-06, at 4:08 PM, adamjamesdrew wrote: > Does django have the ability to do a callback when a session time out > occurs? No, there is no session time out. Its just that a session isn't valid anymore. -- Andy McKay, @clearwind http://clearwind.ca/djangoski -- You received this

Re: Slow admin performance with specific inline

2010-02-08 Thread Andy McKay
Try using the django-debug-toolbar and see if that tells you anything useful. -- Andy McKay, @clearwind http://clearwind.ca/djangoski -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Callback method on session timeout

2010-02-08 Thread theiklabs
I would also like a way to monitor if there are any active connections to a certain web page ie domain.com/h.view Sent from my Verizon Wireless BlackBerry -Original Message- From: cootetom Date: Sun, 7 Feb 2010 15:21:58 To: Django

Re: how to do object lookup using hour ,minute

2010-02-08 Thread Bill Freeman
As far as I can see, there are two approaches to take. One is to filter the results of the query in python (Note: I'm not talking about the filter method of querysets). The downside to this is that the database still returns all objects, and you are discarding those that having the wrong minute

Re: I can't get urls with explicit keyword arguments to reverse correctly.

2010-02-08 Thread rebus_
On 8 February 2010 17:33, Luke Sneeringer wrote: > Good morning, Django e-mail list! Happy Monday! I have a problem. :) I > checked the Django documentation and Stack Overflow with no success, so you > guys are my next line of defense. This is an issue I've encountered

Slow admin performance with specific inline

2010-02-08 Thread Frank W. Samuelson
When I inline a particular model the admin interface slows down enormously. Inlining other models does not have this effect. This is with the python server (runserver). Any help would be great. When I use the following in my admin file, displaying a household object is very snappy, ~ 1 sec.

Using ForeignKey with dJango and PyAMF

2010-02-08 Thread WC
Hi Everyone, I have a ForeignKey field that is always null on the Flex client. I have tried using select_related(), but it's still null. Any idea what I am doing wrong? In the following sample code, parentBlock is always null on the Flex client: File: BlockVO.py from django.db import models

Re: Sub-classing users something else

2010-02-08 Thread Astley Le Jasper
Hi Shawn, Thanks for pointing me in the right direction. Really appreciated. I'll check it out. ALJ On Feb 8, 4:42 pm, Shawn Milochik wrote: > ALJ, > > I think you'd greatly benefit from just using this: > >

I can't get urls with explicit keyword arguments to reverse correctly.

2010-02-08 Thread Luke Sneeringer
Good morning, Django e-mail list! Happy Monday! I have a problem. :) I checked the Django documentation and Stack Overflow with no success, so you guys are my next line of defense. This is an issue I've encountered several times; this is just the first time working around it has bothered me

Re: editing an entry ,how to call the form action

2010-02-08 Thread jimgardener
thanks rebus -jim > > > {{entryform.as_ul }} > > -- 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

Re: editing an entry ,how to call the form action

2010-02-08 Thread rebus_
Opps, for you view context it should be "entryform" not "form": {{entryform.as_ul }} -- 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

Re: editing an entry ,how to call the form action

2010-02-08 Thread rebus_
On 8 February 2010 16:52, jimgardener wrote: > hi > I created a view function to edit an entry. > def edit_entry(request,id): >        entry=get_object_or_404(MyEntry,id=id) >        if request.method=='POST': >                form=MyEntryForm(request.POST,instance=entry) >

editing an entry ,how to call the form action

2010-02-08 Thread jimgardener
hi I created a view function to edit an entry. def edit_entry(request,id): entry=get_object_or_404(MyEntry,id=id) if request.method=='POST': form=MyEntryForm(request.POST,instance=entry) if form.is_valid(): form.save()

Re: Sub-classing users something else

2010-02-08 Thread Shawn Milochik
ALJ, I think you'd greatly benefit from just using this: http://docs.djangoproject.com/en/1.1/topics/auth/#storing-additional-information-about-users You can create a model to store all your info, and use the built-in settings.py option AUTH_PROFILE_MODULE. Essentially you're adding fields to

Re: Utilization of get_FOO_display()

2010-02-08 Thread Karen Tracey
On Mon, Feb 8, 2010 at 8:51 AM, mf wrote: > 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

Re: django admin interface

2010-02-08 Thread Russell Keith-Magee
On Mon, Feb 8, 2010 at 10:42 PM, Andy Cottell wrote: >> > > I am new to django, and have started building a project in it. I have >> > > tried to use theadmininterface with the project am having issues >> > > logging in. I have setup the interface as instruced in the django >>

Sub-classing users something else

2010-02-08 Thread Astley Le Jasper
(I've just started my first project and I'm already in trouble. I've read the documentation but still haven't assimilated it yet. So sorry for the numpty question.) I'm building an application to organise product demonstration events. It will include a foreign key identifying a member of our

Re: django admin interface

2010-02-08 Thread Andy Cottell
Bump! On Feb 2, 1:48 am, Andy Cottell wrote: > I have done this, and created an superuser when prompted. However the > login still fails with the same error. > > Here is the urls.py: > > from django.conf.urls.defaults import * > > # Uncomment the next two lines to enable

Re: Updating data

2010-02-08 Thread Anders Eide
Thank you so much! I'm new to Django and I have to say that the framework is so easy to use that it's frustrating to find out how to do things -Anders On Feb 8, 3:09 pm, Tom Evans wrote: > On Mon, Feb 8, 2010 at 1:46 PM, Anders Eide wrote: > >

Re: Updating data

2010-02-08 Thread Tom Evans
On Mon, Feb 8, 2010 at 1:46 PM, Anders Eide wrote: > I have a table width movies, and I would like to make a form and a > view thats updates a row. > > I build the form automatically from a model > > class SaveMovieForm(ModelForm): >    class Meta: >        model = Movie >  

Updating data

2010-02-08 Thread Anders Eide
I have a table width movies, and I would like to make a form and a view thats updates a row. I build the form automatically from a model class SaveMovieForm(ModelForm): class Meta: model = Movie id = forms.IntegerField( widget = forms.HiddenInput(), required =

Production site.

2010-02-08 Thread Massimiliano Bertinetti
Hi all, I finally put my first, little django site in production. This was my first work in django after several php site (cake, zend, joomla, magento and so on...). I take a VPS Hosting with Ubuntu 9.10 64 bit - the same linux distro I use for work and try to put in production the site

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,

Inline validation

2010-02-08 Thread Gabriel Reis
Hello guys, I have the following situation: class FooInline(TabularInline): model = Foo extra = 1 max_num = 1 class MyAdmin(admin.ModelAdmin): inlines = [FooInline,] Is there any way to perform a validation in which the user must have filled the fields of the inline formset?

Re: Deserializing xml or json goes into infinite recursion

2010-02-08 Thread Kurt Schwehr
Solved... The answer is to not user "pk" as a field in your model. I switch pk to something else and the serialize and deserialize work fine. -kurt On Feb 7, 2:28 pm, Kurt Schwehr wrote: > class alert(models.Model): >     pk = models.CharField(max_length=10,

Re: Next previous links from a query set / generi views

2010-02-08 Thread eaman
On Feb 8, 3:38 am, Eric Abrahamsen wrote: [CUT] > Now that you've got a date attribute, why not use that for next and   > previous? 1. Date based next and prev go throught the whole photo set, but I prefer next and prev to provide only items inside a gallery. But I guess that's

Re: Date-based generic views - UTC handling

2010-02-08 Thread David De La Harpe Golden
On 07/02/10 18:28, Wayne Dyck wrote: Is there an easy way to format this date_field to my local time zone i.e. PST? I have also tried using the "date" and "time" filters within the template itself, however, those are still UTC. Any pointers would be appreciated. Well, django-timezones has a

Re: mysql master-master setup

2010-02-08 Thread Tom Evans
On Sun, Feb 7, 2010 at 11:18 PM, Dennis Kaarsemaker wrote: > On ma, 2010-02-08 at 00:04 +0100, Henrik Genssen wrote: > >> what is the best way to setup a master-master replication using mysql >> with django? > > Not to do it :) > >> Has anyone any experiences with this? >