Re: Separate a project into 2 - both need to access the same models

2009-09-16 Thread Merrick
Got it thanks, I'll try it out. On Sep 15, 11:47 pm, Daniel Roseman wrote: > On Sep 16, 6:45 am, Merrick wrote: > > > > > I have a project that I am thinking of breaking up into 2 sites/ > > projects. The goal is to be able to make changes to one site/project > > without affecting the other one

Re: django and model field translations

2009-09-16 Thread aschmid
so i checked a few apps and im between django-transmeta and django- multilingual, not sure yet what i should use. i have only one field for every model which i want to be multilingual. the easier approach would be the transmeta package at a first look... is there anybody with a bit of experience

djangorecipe questions

2009-09-16 Thread Chris Withers
Hi Jeroen, What's the best mailing list to ask questions about djangorecipe on? I'm CC'ing django-users in the meantime, let me know if there's a better list... I'm just coming to Django myself but I've been a heavy buildout user for a year or so now... I'm curious as to why djangorecipe does

best option to override login_required decorator

2009-09-16 Thread Robert
As a business requirement we have to show login form in an ajax response for some login_required actions. I want to change the login_required decorator to behaive differently in case the request is an ajax request and not a normal GET / POST request. What do you think is the best way to override

db design: "Cross reference" a ManyToManyField?

2009-09-16 Thread mcgritch
Hi there. Not sure how to layout this data. I have a Course which is made up of BFUClasses (which I would like to have organized in Semesters) currently defined roughly like this... class Semester(models.Model): #some variables class Course(models.Model): #some variables semesters =

Help with Admin forms validation error

2009-09-16 Thread adee...@googlemail.com
Hi Guys, I am quite new to Django, I'm having few problems with validation forms in Admin module, more specifically with raising exception in the ModelForm. I can validate and manipulate data in clean methods but cannot seem to raise any errors. Whenever I include any raise statement I get this e

Re: Remote login via XML-RPC or SOAP?

2009-09-16 Thread ash
Why do we need such a mechanism for the relationship between client database and the master server. Maybe you need something else entirely. Could you tell more general idea. On Sep 15, 12:16 pm, "djfis...@gmail.com" wrote: > SOAP and XMLRPC have quite a few tradeoffs, but without knowing > exact

Re: django and model field translations

2009-09-16 Thread Anish
You can use django-multilingual. It's simplest of the two. You can have the complete installation and usage on the django- multilingual wiki On Sep 16, 12:45 pm, aschmid wrote: > so i checked a few apps and im between django-transmeta and django- > multilingual, not sure yet what i should use

Re: django and model field translations

2009-09-16 Thread andreas schmid
why do you think its simpler? at a first look i really feel transmeta is the simpler one. specially to integrate with an already working project with front end editing and forms in the templates which are not written manually and with use of uni-form. and what if i have a custom save on the add_m

Re: F() expression order of operations

2009-09-16 Thread chairface
Here is the documentation on F() expressions: http://docs.djangoproject.com/en/dev/topics/db/queries/#query-expressions . Basically, they are a way for you to refer to a model's own fields in a query. As for win_percentage being a property on MyModel, rather than a field - yes, that would work w

Re: Long user creation forms

2009-09-16 Thread Rodney Topor
I've decided this *is* a good way to solve my problem. On Sep 10, 2:40 pm, Rodney Topor wrote: > The default UserCreationForm in django.contrib.auth.forms only asks > for username and password.  Given that users also have first and last > names and emails, it would be natural for the default for

Re: User profile creation forms

2009-09-16 Thread Rodney Topor
Without having to use django-registration or django-profile, I've discovered that it's easy enough to seamlessly concatenate a user form and a profile form for data entry, then to create a separateuser object and profile object from the same resulting request.POST, then connect and save the object

Inheritance from real model (or models with the same fields but different table)

2009-09-16 Thread Maksymus007
I need to have 4 versions of exactly the same model - but named differently and using different table/views (some complex filtering is required and database permission stuff) I simply did: class Event(models.Model): a = models.IntegerField() class Meta: db_table = 'event' and th

Re: F() expression order of operations

2009-09-16 Thread Russell Keith-Magee
On Wed, Sep 16, 2009 at 9:36 AM, Brent Hagany wrote: > > I'm having some trouble getting F() expressions to obey my parentheses > when I don't want the default order of operations.  For example, given > the model: > > class MyModel(models.Model): >    wins = models.DecimalField(max_digits=1, deci

Re: Select models based on m2m relationship.

2009-09-16 Thread Léon Dignòn
bump On 15 Sep., 19:36, Léon Dignòn wrote: > Hello, > > I have a m2m relationship like this: > > class Actor(models.Model): >     name = models.CharField(unique=True) > class Movie(models.Model): >     name = models.CharField(unique=True) >     actors = models.ManyToManyField(Actor) > class Comm

Re: F() expression order of operations

2009-09-16 Thread Russell Keith-Magee
On Wed, Sep 16, 2009 at 7:32 PM, Russell Keith-Magee wrote: > On Wed, Sep 16, 2009 at 9:36 AM, Brent Hagany wrote: >> >> I'm having some trouble getting F() expressions to obey my parentheses >> when I don't want the default order of operations.  For example, given >> the model: >> >> class MyMo

Re: Remote login via XML-RPC or SOAP?

2009-09-16 Thread Rodrigo Cea
> Why do we need such a mechanism for the relationship between > client database and the master server. Maybe you need something > else entirely. Could you tell more general idea. The general idea is to allow users to register and login on our server, but store all the users information on our cl

Re: F() expression order of operations

2009-09-16 Thread chairface
> FYI: I've fixed this bug in trunk r11581; the 1.1.X branch has the > same fix as r11582. > > Yours, > Russ Magee %-) Wow, thanks for the quick resolution Russell! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "D

Re: Help with Admin forms validation error

2009-09-16 Thread Anish
Hi, please check whether you import statement is this ---from django import forms On Sep 16, 3:15 pm, "adee...@googlemail.com" wrote: > Hi Guys, > > I am quite new to Django, I'm having few problems with validation > forms in Admin module, more specifically with raising exception in the > ModelF

Re: django and model field translations

2009-09-16 Thread Anish
We have used both multilingual and transmeta in a project and feel multilingual is much simpler to use. Both have its own pros and cons though. Both of them pose certain limitations on your model. You can develop your own translation process best fit your needs. You can refer the translation us

Re: Help with Admin forms validation error

2009-09-16 Thread ankit rai
First of all keep ur form in separate file named as forms.py .What all u r importing can u describe them .And check ur if condition. if desc and len(desc)>10: rasie .. On Wed, Sep 16, 2009 at 3:57 PM, Anish wrote: > > Hi, > please check whether you import statement is this ---from django >

Re: path depth problem

2009-09-16 Thread dijxtra
Thanks a bunch! On Sep 15, 10:57 pm, Tiago Serafim wrote: > Hi, > > The right way(TM) to do this is using named urls: --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: Django generate unique sequence for each organisation in a SaaS app

2009-09-16 Thread Michael Manfre
You can do this without a stored procedure, but it will require two db queries. Create a custom field with an overridden pre_save that fetches the last RecordNum for the org and returns the next in the sequence. You'll want an index on org and recordnum. class AutoRecordNumberField(models.Intege

django ommit non-set field on insert

2009-09-16 Thread Maksymus007
Is there any way to make Django ORM NOT assign every possible column a value? I just want it to insert values i defined or have set default=Something, but don't touch other s columns leaving database default? Currently django fills ununsed fields with NULL, but i just want it ommit them. --~--~-

Re: Formwizard dropdown lists

2009-09-16 Thread Karen Tracey
On Tue, Sep 15, 2009 at 11:45 PM, dingue fever wrote: > > Hi, > > I have modelform that I use in a formwizard and I populate a few of > the dropdown selects by accessing the database and creating a list for > the choice. However when I add an item to a table via the admin site > and then goto my f

Re: best option to override login_required decorator

2009-09-16 Thread Karen Tracey
On Wed, Sep 16, 2009 at 4:53 AM, Robert wrote: > > As a business requirement we have to show login form in an ajax > response for some login_required actions. I want to change the > login_required decorator to behaive differently in case the request is > an ajax request and not a normal GET / POS

Re: Django ORM - Table Changes

2009-09-16 Thread Thomas
Thanks. I haven't heard of Django Evolution. Just searched for it on Google; it sounds exactly like what I'm looking for. In the meantime, I've found 'python manage.py inspectdb ' which helps a lot. It seems to general model classes by inspecting the DB the app. is connected to in settings.py.

Re: How to organize django projects on a productive server?

2009-09-16 Thread Mark (Nosrednakram)
Hello Orschiro, If you are the sole developer working in your home directory is OK but if you grow you'll have to grant access to your home directory to someone else. If you are building applications on a *nix type server I'd recommend storing your base project(S) in /opt/django. Any production

Re: db design: "Cross reference" a ManyToManyField?

2009-09-16 Thread Walter Scheper
Hey Troy, First, let me make sure I understand your setup correctly. You want to each Course to be available in many Semesters, but each BFUClass is only available in one Semester and for one Course. Assuming that's correct, then what I would do is use the through option in the ManyToManyField

Re: django ommit non-set field on insert

2009-09-16 Thread Karen Tracey
On Wed, Sep 16, 2009 at 9:30 AM, Maksymus007 wrote: > > Is there any way to make Django ORM NOT assign every possible column a > value? I just want it to insert values i defined or have set > default=Something, but don't touch other s columns leaving database > default? > > Currently django fills

How to define a "has-a" relationship in dJango models

2009-09-16 Thread PlanetUnknown
For example - User HAS "Contacts"; User HAS "Preferences" Usually (I'm from an Oracle/Java background) the Contacts table would have a "user-id" foreign key. However Django models refer Foreign Key relations as "Many-to-one", but that is not true in my case. There is only one Contact table for a U

Re: How to define a "has-a" relationship in dJango models

2009-09-16 Thread Craig McClanahan
On Wed, Sep 16, 2009 at 7:15 AM, PlanetUnknown wrote: > > For example - User HAS "Contacts"; User HAS "Preferences" > Usually (I'm from an Oracle/Java background) the Contacts table would > have a "user-id" foreign key. > However Django models refer Foreign Key relations as "Many-to-one", > but t

Re: How to define a "has-a" relationship in dJango models

2009-09-16 Thread PlanetUnknown
The OneToOne relationship seems to be more of an inheritance type of relationship, hence that cannot be used. On Sep 16, 10:28 am, Craig McClanahan wrote: > On Wed, Sep 16, 2009 at 7:15 AM, PlanetUnknown > > wrote: > > > For example - User HAS "Contacts"; User HAS "Preferences" > > Usually (I'm

get the logged in user in my models custom save

2009-09-16 Thread andreas schmid
hi, can i get the actual logged in user in a custom save in my model? like: def save(self, force_insert=False, force_update=False): self.author = request.user self.slug = self.title.lower().replace(' ','-') super(Project, self).save(force_insert, force_update) tha

Re: How to define a "has-a" relationship in dJango models

2009-09-16 Thread Karen Tracey
On Wed, Sep 16, 2009 at 10:15 AM, PlanetUnknown wrote: > > For example - User HAS "Contacts"; User HAS "Preferences" > Usually (I'm from an Oracle/Java background) the Contacts table would > have a "user-id" foreign key. > However Django models refer Foreign Key relations as "Many-to-one", > but t

Re: db design: "Cross reference" a ManyToManyField?

2009-09-16 Thread troyhitch
Thanks so much for the help, Walter. I had actually read a good deal from the links you sent, but am still getting my grounding with Models. I employed what you suggested, but discovered that multiple instances of the same semester are created in the ManyToManyField each time a BFUClass is create

GenericForeignKey and GenericRelation problems

2009-09-16 Thread Dennis Schmidt
Hi there, I've got a very strange problem and I hope somebody can help me somehow. I think I can reduce the problem to basically these aspects: I've got an abstract base class called Account. It has got several (nonabstract) subclasses, eg MailAccount. Then I have a class called Contract. Each C

Re: Django ORM - Table Changes

2009-09-16 Thread Daniel Roseman
On Sep 16, 2:56 pm, Thomas wrote: > Thanks.  I haven't heard of Django Evolution.  Just searched for it on > Google; it sounds exactly like what I'm looking for.  In the meantime, > I've found 'python manage.py inspectdb ' which helps a > lot.  It seems to general model classes by inspecting the

Re: db design: "Cross reference" a ManyToManyField?

2009-09-16 Thread Walter Scheper
You can solve Spring 2008 showing up multiple times via distinct(), but not in a template tag. This is why I gather up all of my data in my view and pass the template only what it needs for display. Check out the QuerySet API documentation, and you should find all the methods you need. You're p

Re: HELP ME

2009-09-16 Thread alivad
I will explain it another way: I'm taking as reference the following code http://docs.djangoproject.com/en/dev/ref/forms/validation/ # cleaning- and-validating-fields-that-depend-on-each-other so my code is as follows: . formamig = forms.ModelChoiceField(label = "Tipo de visa", query

Variable variables

2009-09-16 Thread rvidal
Hi, I have the following situation: I have a dictionary with dictionaries nested, like so: cutsites = {'rfc10': {'EcoRI':[20, 112], 'XbaI':[5, 12, 45], 'SpeI': [45, 129, 245]}, 'rfc21': {'EcoRI':[2, 22], 'XbaI':[15, 42, 66], 'SpeI':[55, 69, 95]} } And I also

Re: db design: "Cross reference" a ManyToManyField?

2009-09-16 Thread troyhitch
Excellent. I will explore the QuerySet more thoroughly on your suggestion. In the meantime, and for the record, I made it work in the template like this: {% for semester in course.semesters.all.distinct %} {{ semester }} {% for BFUClass in classes_list %} {% ifequal BFUClass.semes

Return code after deleting an object

2009-09-16 Thread datakid
Hi, I'm debugging a script which causes errors when trying to delete objects. Concerned code is: Event.objects.filter(created_on__lte=date).delete() I have the following result: updating resource 36 with state : 4 Sometimes it works and returns a code: 3 I've checked on http://docs.djangopro

Re: Return code after deleting an object

2009-09-16 Thread Karen Tracey
On Wed, Sep 16, 2009 at 12:28 PM, datakid wrote: > > Hi, > I'm debugging a script which causes errors when trying to delete > objects. > Concerned code is: > > Event.objects.filter(created_on__lte=date).delete() > > I have the following result: > > updating resource 36 with state : 4 > > Since yo

Re: Variable variables

2009-09-16 Thread James Punteney
Hi Ricardo, On Wed, Sep 16, 2009 at 12:18 PM, rvidal wrote: > I can see that I'm using too much logic in my template but was hoping > it would be possible without having to go into making custom tags. > > If there is too much logic in the template in general there are two options. 1. Create a te

Multiple implementations of django's authentication/authorization system

2009-09-16 Thread Dan06
Hi, Is there a way to have multiple implementations of django's authentication/authorization system? In my practice blog-type site, I've implemented django's auth/auth system as is. I'd like to use the default implementation solely for administrators of the site. For users of the site, on the oth

View with "stages"

2009-09-16 Thread Haroldo Stenger
In my django programming, very often I find myself writing a view that has "stages", that is, the view manages several distinct situations that are identified by checking if a given dictionary key is present or not (that is, if a given button was pressed or was another one). The list of buttons th

UnicodeEncodeError in models

2009-09-16 Thread Gabriel .
Hello, I have this method defined in a model: def __repr__(self): return ugettext_lazy("%(file)s (Component: %(component)s - Release: %(release)s)") % { 'file': self.filename, 'component': self.component.name, 'release': self.release.name,} (I tri

Re: Variable variables

2009-09-16 Thread rvidal
Thank you James, I'm in the process of breaking this down in the view. Should have thought about that earlier. Thanks again! R On Sep 16, 6:22 pm, James Punteney wrote: > Hi Ricardo, > > On Wed, Sep 16, 2009 at 12:18 PM, rvidal wrote: > > I can see that I'm using too much logic in my templat

Re: Multiple implementations of django's authentication/authorization system

2009-09-16 Thread Chris Babcock
On Wed, 16 Sep 2009 10:26:15 -0700 (PDT) Dan06 wrote: > Is there a way to have multiple implementations of django's > authentication/authorization system? In my practice blog-type site, > I've implemented django's auth/auth system as is. I'd like to use the > default implementation solely for adm

Re: How to define a "has-a" relationship in dJango models

2009-09-16 Thread PlanetUnknown
Thanks Karen. Let me explain it a bit more. e.g. All CONTACT details are present in one table - email, home address, work address, home phone, work phone etc. Forget about the statement about growing for now. Since each user "has-a" contact it is a pure one-to-one relationship and not a one-to-man

Re: UnicodeEncodeError in models

2009-09-16 Thread Daniel Roseman
On Sep 16, 6:50 pm, "Gabriel ." wrote: > Hello, > > I have this method defined in a model: > >     def __repr__(self): >         return ugettext_lazy("%(file)s (Component: %(component)s - > Release: %(release)s)") % { >             'file': self.filename, >             'component': self.component.

Re: UnicodeEncodeError in models

2009-09-16 Thread Gabriel .
On Wed, Sep 16, 2009 at 3:02 PM, Daniel Roseman wrote: >> >>     def __repr__(self): >>         return ugettext_lazy("%(file)s (Component: %(component)s - >> Release: %(release)s)") % { >>             'file': self.filename, >>             'component': self.component.name, >>             'release'

Re: UnicodeEncodeError in models

2009-09-16 Thread Karen Tracey
On Wed, Sep 16, 2009 at 1:50 PM, Gabriel . wrote: > > Hello, > > I have this method defined in a model: > >def __repr__(self): >return ugettext_lazy("%(file)s (Component: %(component)s - > Release: %(release)s)") % { >'file': self.filename, >'component': self.c

Re: View with "stages"

2009-09-16 Thread Haroldo Stenger
2009/9/16 Haroldo Stenger > I imagine mayself a special callable, a custom class f.i., that holds the > abstract structure of the whole dinamic management of buttons to show, and > stages to manage. The class would avoid some repeating code, namely, the > names of the buttons, and the tree (or gr

Re: UnicodeEncodeError in models

2009-09-16 Thread Gabriel .
On Wed, Sep 16, 2009 at 3:32 PM, Karen Tracey wrote: > repr needs to return a string, you are returning unicode.  The automatic > unicode-to-string conversion done by Python will use the ascii codec, which > has no way of representing 'ã'. You should probably be returning the repr of > the unicod

Re: How to define a "has-a" relationship in dJango models

2009-09-16 Thread Karen Tracey
On Wed, Sep 16, 2009 at 2:01 PM, PlanetUnknown wrote: > > Thanks Karen. > Let me explain it a bit more. > e.g. > All CONTACT details are present in one table - email, home address, > work address, home phone, work phone etc. > Forget about the statement about growing for now. > Since each user "ha

Check whether a model has a field with given name

2009-09-16 Thread Dmitry Risenberg
Hi, I am writing a custom form field that takes a Model object and a field name as arguments. I want to ensure in __init__ that the given Model has a field with this name. The code looks like this: def __init__(self, model, field_name, separator = ' ', *args, **kwargs): self.model = model

Call for proposals -- PyCon 2010

2009-09-16 Thread Alex_Gaynor
Call for proposals -- PyCon 2010 -- === Due date: October 1st, 2009 Want to showcase your skills as a Python Hacker? Want to have hundreds of people see your talk on the subject of your choice? Have some hot

Re: Multiple implementations of django's authentication/authorization system

2009-09-16 Thread Dan06
On Sep 16, 1:55 pm, Chris Babcock wrote: > Is there any particular reason to maintain two distinct authentication > databases? You could sub-class the Django auth models and deploy your > subclass in parallel, but that is not a trivial deployment task. It > would be easier to just authorize th

Validate ModelChoiceField

2009-09-16 Thread alivad
Hi: in the example this link http://docs.djangoproject.com/en/dev/ref/forms/validation/#cleaning-and-validating-fields-that-depend-on-each-other additional validation is performed cc_myself and subject fields, could give me an example to validate a field of type ModelChoiceField Thanks --~--~

Unit tests for form wizard

2009-09-16 Thread AndyH
Any tips on unit testing form wizards using the test client? Other than just faking the name/values for each POST in the wizard, which works, but is a little fiddly. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

benefits of {% url %} for breadcrumbs?

2009-09-16 Thread neri...@gmail.com
Is there any benefit to using {% url %} other than retrieving data from the same view? I was looking for a better way to make a breadcrumb menu than hard wiring the urls into every page and came across the {% url %} tag and this post: http://groups.google.com/group/django-users/browse_thread/thre

Re: Check whether a model has a field with given name

2009-09-16 Thread mrts
On Sep 16, 9:31 pm, Dmitry Risenberg wrote: > try: > field_attribute = getattr(self.model, self.field_name) > except AttributeError: try: self.model._meta.get_field_by_name(self.field_name) except models.FieldDoesNotExist: ... --~--~-~--~~-

Komodo 5 CIX - Code completion API catalog??

2009-09-16 Thread Markrowsoft
Has anyone created a CIX that supports code completion for Django? Thanks, Mark --~--~-~--~~~---~--~~ 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.c

Aggregate using extra() fields

2009-09-16 Thread Kathleen Benitez
I am attempting to evaluate some generalization schemes using Django. In particular, I'd like to create a new field (generalized race), and then find a total population using the values() function as follows: 1 r = Records.objects 2 r = r.extra(select={'generalized_race: "CASE race WHEN 'Black'

Re: benefits of {% url %} for breadcrumbs?

2009-09-16 Thread Maksymus007
On Wed, Sep 16, 2009 at 10:53 PM, neri...@gmail.com wrote: > > Is there any benefit to using {% url %} other than retrieving data > from the same view? I was looking for a better way to make a > breadcrumb menu than hard wiring the urls into every page and came > across the {% url %} tag and this

Re: benefits of {% url %} for breadcrumbs?

2009-09-16 Thread neridaj
the only point where DRY comes into play is when you're retrieving data from the same view, is there a better way to make breadcrumbs? On Sep 16, 2:40 pm, Maksymus007 wrote: > On Wed, Sep 16, 2009 at 10:53 PM, neri...@gmail.com wrote: > > > Is there any benefit to using {% url %} other than ret

Re: benefits of {% url %} for breadcrumbs?

2009-09-16 Thread neridaj
I guess I can just pass it with the context. On Sep 16, 2:55 pm, neridaj wrote: > the only point where DRY comes into play is when you're retrieving > data from the same view, is there a better way to make breadcrumbs? > > On Sep 16, 2:40 pm, Maksymus007 wrote: > > > On Wed, Sep 16, 2009 at 10:

Re: How to define a "has-a" relationship in dJango models

2009-09-16 Thread Javier Guerra
On Wed, Sep 16, 2009 at 1:01 PM, PlanetUnknown wrote: > > Thanks Karen. > Let me explain it a bit more. > e.g. > All CONTACT details are present in one table - email, home address, > work address, home phone, work phone etc. > Forget about the statement about growing for now. > Since each user "h

Re: How to define a "has-a" relationship in dJango models

2009-09-16 Thread Craig McClanahan
On Wed, Sep 16, 2009 at 3:15 PM, Javier Guerra wrote: > > On Wed, Sep 16, 2009 at 1:01 PM, PlanetUnknown > wrote: >> >> Thanks Karen. >> Let me explain it a bit more. >> e.g. >> All CONTACT details are present in one table - email, home address, >> work address, home phone, work phone etc. >> Fo

Re: benefits of {% url %} for breadcrumbs?

2009-09-16 Thread Nick Lo
You might find this useful: http://code.google.com/p/django-crumbs/ >> the only point where DRY comes into play is when you're retrieving >> data from the same view, is there a better way to make breadcrumbs? --~--~-~--~~~---~--~~ You received this message becau

Re: HELP ME

2009-09-16 Thread Rodrigo Cea
> but not working on my form validation, I think the validation does not > work because the field is formamig and example ModelChoiceField fields > are Charfield > You still haven't explained what it is that is not working. You will not get any useful answers until you do this. "Does not work" i

Re: HELP ME

2009-09-16 Thread matehat
I can see one mistake in your code.. when retrieving "formamig" from the cleaned_data dictionary, you get a "Formamig" model instance, not a string. So testing tipo_de_vista == "NEGOCIO" should never return True (unless you've defined a custom "__eq__" method on your Formamig model class". If, sa

return related objects from a queryset

2009-09-16 Thread Milan Andric
Hello, I'm not sure if the subject makes sense but i have two models: class Profile(models.Model): user = models.OneToOneField(User, primary_key=True) middle_name = models.CharField(max_length=50, blank=True) title = models.CharField(blank=True, max_length=128) about = models.Text

Re: return related objects from a queryset

2009-09-16 Thread Haroldo Stenger
in my humble opinion, don't care about messiness in the template, since messiness in the code is way worse. nontheless, you should be able to render the two querysets in the same template without additional hassle! Templates know nothing about models. The deal with lists when it comes to querysets

Re: HELP ME

2009-09-16 Thread Gabriel Gunderson
On Tue, Sep 15, 2009 at 2:48 PM, alivad wrote: > It does not work, someone can help me. It looks like you've gotten some help. That's great. Next time, choose a descriptive subject (that doesn't sound so demanding) and avoid all CAPS. You'll likely get more people willing to give some of thei

Re: Remote login via XML-RPC or SOAP?

2009-09-16 Thread ash
I recommend the following, every client must will be run XMLRPC server, which allow access for your with their database. You must developed skeleton this XMLRPC server with uniform set of public methods, every client himself realised this methods, because their databases may be different. Base XM

Re: Check whether a model has a field with given name

2009-09-16 Thread Dmitry Risenberg
Thanks, that worked! Is it by-design not to add fields to Model's __dict__? On Sep 16, 11:00 pm, mrts wrote: > On Sep 16, 9:31 pm, Dmitry Risenberg > wrote: > > >          try: > >              field_attribute = getattr(self.model, self.field_name) > >          except AttributeError: > > try: