Re: Vs: how to override a ModelChoiceField in order to add FKs directly in a TextInput?

2011-07-06 Thread snfctech
Hi, Martin. Thanks for your reply. I wound up using IntigerFields and getting around the "relation must be an instance" error by adding clean methods that returned instances, e.g. def clean_myfield(self): data = self.cleaned_data['myfield'] data = MyRelatedClass.objects.

how to override a ModelChoiceField in order to add FKs directly in a TextInput?

2011-06-25 Thread snfctech
I can get text inputs rendered fine by setting the widget to a TextInput like so: myrelation = ModelChoiceField(MyRelatedClass.objects.none(), widget=TextInput) But I still get ModelChoiceField validation errors on validate: 'Select a valid choice. That choice is not one of the available choices

Re: how to display form data with original values after validation failure?

2011-06-22 Thread snfctech
Figured it out - you have to populate both fs._errors _and_ loop through each form in the formset and populate its _errors attribute, as well. On Jun 22, 2:50 pm, snfctech wrote: > Hi, Michal. > > I tried that, but the errors don't get rendered for some reason (see > my firs

Re: how to display form data with original values after validation failure?

2011-06-22 Thread snfctech
Hi, Michal. I tried that, but the errors don't get rendered for some reason (see my first post). Tony On Jun 22, 1:59 pm, Michał Sawicz wrote: > Dnia 2011-06-22, śro o godzinie 13:44 -0700, snfctech pisze: > > > Which passes the form with the same post data and some error mes

Re: how to display form data with original values after validation failure?

2011-06-22 Thread snfctech
Hi, Kevin. Thanks for your reply. I actually don't want to show the entered values - I basically want the original form with values prior to the user submitting the form - but with the validation errors that prompt them to enter new values in the proper fields. I have already overridden the part

Re: how to display form data with original values after validation failure?

2011-06-21 Thread snfctech
Thanks for your reply, Shawn. I'll think about that - but I think I would prefer to use more boiler- plate Django form behavior and just get a formset with errors returned to my template in the full-page response. On Jun 21, 5:44 pm, Shawn Milochik wrote: > One good way is to just use AJAX: If i

how to display form data with original values after validation failure?

2011-06-21 Thread snfctech
In the case of editing a form, I want to display the original value of a field prior to validation failure, as well as the validation errors. This doesn't seem to work: if fs.is_valid(): fs.save() else: # return original data - not default c

Re: what is the recommended way to display currency?

2011-06-05 Thread snfctech
I guess this snippt would avoid the locale issue, but I don't know why something basic like this wouldn't be more obvious in the docs or included in the django core libraries.. http://djangosnippets.org/snippets/2365/ On Jun 5, 1:39 pm, snfctech wrote: > I thought this should be o

what is the recommended way to display currency?

2011-06-05 Thread snfctech
I thought this should be obvious but am having a hard time finding it in the docs. There are a couple snippets that suggest using a custom currency filter: http://www.djangosnippets.org/snippets/552/ http://djangosnippets.org/snippets/1825/ But both use locale.setlocale, which is apparently not

how to display a property in a ModelFormSet?

2011-05-31 Thread snfctech
I'm using a ModelFormSet to display and edit multiple records. Some of those records have related attributes that I want to display, but not edit. E.g. lineitem.quantity [editable] lineitem.product.description [not editable] So I thought I would add a property to my LineItem class in order to r

Re: how to implement a data grid? (or populate inlineformset with initial data)

2011-05-31 Thread snfctech
46 raise utils.IntegrityError, utils.IntegrityError(*tuple(e)), sys.exc_info()[2] DatabaseError: relation "jos_jevents_registration" does not exist On May 31, 8:10 am, Daniel Roseman wrote: > On Tuesday, 31 May 2011 15:20:11 UTC+1, snfctech wrote: > > > Thanks

Re: how to implement a data grid? (or populate inlineformset with initial data)

2011-05-31 Thread snfctech
any help. > > Thanks, > Jayapal > > On May 31, 6:39 am, snfctech wrote: > > > I want to display a list of records that have some editable fields and > > some readonly fields, as well as asynchronously add new records to the > > list.  I thought the way to star

how to implement a data grid? (or populate inlineformset with initial data)

2011-05-30 Thread snfctech
I want to display a list of records that have some editable fields and some readonly fields, as well as asynchronously add new records to the list. I thought the way to start would be with an InlineFormSet - but I can't figure out how to populate my formset with initial data. E.g. MyInlineFormset

Re: what's the right way to extend an admin view with AJAX?

2010-03-01 Thread snfctech
here... > > On Feb 26, 8:39 pm, snfctech wrote: > > > Thanks for the encouragement, Timothy.  I haven't given up, but I'm > > scratching my head, and puzzled by why I have to look at people's blog > > posts to figure out how to use javascript/AJAXwith Dj

Re: what's the right way to extend an admin view with AJAX?

2010-02-26 Thread snfctech
rite direction. > > On Fri, Feb 26, 2010 at 11:06 AM, snfctech wrote: > > (Disclamor: I am new to Python/Django.  Used to PHP/MVC ways of doing > > things.) > > > I want to customize the admin view, because it already does >50% of > > what I want for my appli

what's the right way to extend an admin view with AJAX?

2010-02-26 Thread snfctech
(Disclamor: I am new to Python/Django. Used to PHP/MVC ways of doing things.) I want to customize the admin view, because it already does >50% of what I want for my application. So, do I... 1. Alter the HTML sent to the template? One of the first things I want to do is add an AJAX onclick reco

Re: any suggestions for managing DB schema with visual ERD tool?

2010-02-18 Thread snfctech
7;m not sure I want to depend on an application like that for fundamental design work.. On Feb 18, 9:38 am, Dougal Matthews wrote: > On 18 February 2010 00:03, snfctech wrote: > > > I just built a complicated schema with MySQL workbench and am looking > > at Python frameworks to s

Re: any suggestions for managing DB schema with visual ERD tool?

2010-02-18 Thread snfctech
@Daniel: That's the idea! But it's Mac only. :-( @rebus_: Thanks for the links for graph_models. You still have to manage the models textually, though. I was hoping for something that you could manage visually. On Feb 18, 1:15 am, rebus_ wrote: > On 18 February 2010 01:03, sn

Re: anybody tried web2py and gone back to Django?

2010-02-18 Thread snfctech
@Vasil: thanks for the enumerated points. On Feb 18, 8:47 am, snfctech wrote: > Thanks for the reply, Wiiboy. > > I agree that web2py is cool and Massimo is a good guy. > > I'm still comparing the two frameworks and don't have a lot of > preferences to list yet, but

Re: anybody tried web2py and gone back to Django?

2010-02-18 Thread snfctech
Thanks for the reply, Wiiboy. I agree that web2py is cool and Massimo is a good guy. I'm still comparing the two frameworks and don't have a lot of preferences to list yet, but so far I prefer the way the online Django tutorial is written to the Overview/tutorial chapter of the web2py book. I al

any suggestions for managing DB schema with visual ERD tool?

2010-02-17 Thread snfctech
I just built a complicated schema with MySQL workbench and am looking at Python frameworks to start implementation. Does anybody in the Django community do this? What's your practice for going back and forth between the ERD and the ORM? I saw DjangoGraphviz http://code.djangoproject.com/wiki/Dja

anybody tried web2py and gone back to Django?

2010-02-17 Thread snfctech
If so, could you provide a bullet list of things you preferred in Django? Thanks. -- 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: satchmo customization experiences? customizing existing e-com vs. roll-your-own

2010-02-09 Thread snfctech
continue with Satchmo, let us know, I'm sure folks would > be interested in hearing how it goes but I do want to make sure you go in > with your eyes wide open. > > -Chris > > On Mon, Feb 8, 2010 at 11:32 AM, snfctech wrote: > > Thanks for your reply, Chris.  And th

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

2010-02-08 Thread snfctech
discuss a bit more about the changes you would need to make, we can > probably provide some more guidance on the relative difficulty of getting > them done. > > -Chris > > On Sat, Feb 6, 2010 at 12:57 PM, snfctech wrote: > > I'm building an order entry and tracking sy

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

2010-02-06 Thread snfctech
I'm building an order entry and tracking system for a Food Co-op for their case and special orders. We don't need the system to be on-line (at the moment), but many of the system requirements are already present in many existing e-commerce solutions (product catalog/search, order entry screens, or

multi-db vs. data warehouse

2009-09-21 Thread snfctech
I understand that there is a Django branch being actively worked on for connections to multiple DB vendors, or that Django + Elixir may be a good option. But I'm wondering if building a single data warehouse may still be a better way to go? Here's an example of some of the relations I'm going to

Re: is Django a good choice for a LAN app?

2009-08-19 Thread snfctech
jango + Elixir may be an option for multi-db support, so I may evaluate this as well if web2py falls short. On Aug 13, 3:45 pm, snfctech wrote: > @Torsten: Grüß Gott!  Agreed, I'm sold that the web client/server > model is the way to go for my project. > > @Jonas: Thanks for the ti

Re: how much python do i need to know to learn/use Django?

2009-08-14 Thread snfctech
Thanks for the note on the functional programming part, Mike. I've been meaning to look into that. On Aug 14, 10:01 am, Mike Ramirez wrote: > On Friday 14 August 2009 09:01:16 am Peter Herndon wrote: > > > > > I strongly disagree.  The thing to remember is that Django is just > > Python applied

Re: how much python do i need to know to learn/use Django?

2009-08-14 Thread snfctech
sp of Python, rather than diving to quickly into Django. I'm probably going to have to evaluate both of these Python frameworks simultaneously. On Aug 14, 9:13 am, "J. Cliff Dyer" wrote: > On Fri, 2009-08-14 at 08:30 -0700, snfctech wrote: > > Thanks for all the helpfu

Re: how much python do i need to know to learn/use Django?

2009-08-14 Thread snfctech
a bootcamp/course." On Aug 14, 8:30 am, snfctech wrote: > Thanks for all the helpful replies, django-users group! > > I've got: > > - Java and C++ coursework > - a little professional Java, Perl and Tcl/Tk experience (off and on > over several years) > - 1 year large

Re: how much python do i need to know to learn/use Django?

2009-08-14 Thread snfctech
Thanks for all the helpful replies, django-users group! I've got: - Java and C++ coursework - a little professional Java, Perl and Tcl/Tk experience (off and on over several years) - 1 year large Servoy project (like a Java based Filemaker) - about 2 years full-time PHP (including one MVC projec

how much python do i need to know to learn/use Django?

2009-08-13 Thread snfctech
I currently know zero Python and want to start a project with Django ASAP. I've got the opportunity through my work to either take a 5-day Python bootcamp or a Django bootcamp - not both. I don't anticipate having a whole bunch of time to brush up on Python before the Django class - but is that

Re: is Django a good choice for a LAN app?

2009-08-13 Thread snfctech
ers, multi-db support is being > actively worked on. > > roberto wrote: > > snfctech, > > As far as I know, Django doesn't have an option to set more than one > > database. If I am mistaken, please, let me know. > > I am not sure if there is any project to add thi

Re: is Django a good choice for a LAN app?

2009-08-12 Thread snfctech
t; In my opinion writing it in django/html/... is a lot easier and faster > than doing it in a real python GUI tool. Also you have the networking in > your LAN taken care of by the browser. > > snfctech wrote: > > One more question:  Any advantage to just using a Python GUI toolkit &g

Re: is Django a good choice for a LAN app?

2009-08-12 Thread snfctech
One more question: Any advantage to just using a Python GUI toolkit instead? On Aug 12, 9:18 am, snfctech wrote: > Thanks for all of the good feedback! > > At the very least I am enthusiastic about the health of this list! ;-) > > @Philippe: By mid-size I mean ~70 people in a

Re: is Django a good choice for a LAN app?

2009-08-12 Thread snfctech
endly pages for specific tasks (billing when employees > are working offsite). > > My app is around 25k lines of python+templates > > Hope this helps you make your mind. > > On Aug 11, 9:06 pm, snfctech wrote: > > > I'm about to start a fairly large project for a mid-s

is Django a good choice for a LAN app?

2009-08-11 Thread snfctech
I'm about to start a fairly large project for a mid-sized business with a lot of integration with other systems (POS, accounting, website, inventory, purchasing, etc.) The purpose of the system is to try to reduce current data siloing and give employees role-based access to the specific data entry

Re: Django/ Python 3 - nervous about starting large project

2009-08-06 Thread snfctech
Thanks for the tips, Berco, Wayne. @Wayne: Thanks for the welcome. Why are you using 2.5 for your new/ large project instead of 2.6? Tony On Aug 5, 2:22 pm, Wayne Koorts wrote: > Hi Tony, > > > However, I'm nervous about the Python 3 situation.  What if I start > > building a large project ba

Django/ Python 3 - nervous about starting large project

2009-08-05 Thread snfctech
Hello. We are researching technologies to begin what may become a pretty large intranet Dashboard project. I'm a PHP developer, so the fact that Django uses Python doesn't give me a head-start - but I've been wanting to consider it, because I am interested in learning Python. However, I'm nervo