Hi all!
Please, help me undestand, how to solve next task.
I am show for user form with two fields: user name and text field,
where user input list of phones, separated by comma. User sholud enter
one or more phones separated by comma. If user enter not valid number
- we show error message like t
In my case, I have Users with equal phone numbers. And I need only
ManyToMany relationship.
I need create custom field for get information from CharFiels,
validate this data, clean and save to datastore in separate model. If
this phone already exists - we get ID of this phone. And, if this is a
ne
like your trying to make this way more difficult than it
> needs to be.
>
> Also it sounds to me like your trying to assign the same phone number to
> multiple people. (which is fine) But doesn't make a lot of sense to me in a
> practical application.
>
&
Also I need get list of all phones as with many-to-many relationship:
m = Message.objects.get(1)
for phone in m.phones:
ptint phone
On 21 сен, 20:15, Anton Danilchenko
wrote:
> I describe my task more reallistical.
>
> This is application for rent an apartment. User can create ne
t; Phone Numbers.
>
> This message is then checked to see if the phone numbers associated to it
> have been black listed...
> And then finally deliver the message?
>
> n
>
> On Tue, Sep 21, 2010 at 12:15 PM, Anton Danilchenko <
>
>
>
>
>
> anton.dani
/
>
> On Tue, Sep 21, 2010 at 1:50 PM, Anton Danilchenko <
>
>
>
>
>
> anton.danilche...@gmail.com> wrote:
> > Message - this is a rental proposition (rooms, floor, cost, area,
> > country, cirty and contact phones).
>
> > Visitors can create new mes
Now I have next solution (but still need your help).
1) I have added to my form custom field CharField for render field as
input
2) I have created Form method clean_phones() for check all values is
valid
3) in views.py I have get field contents, split it by comma and delete
all non-numbers. In
Ihave found solution.
I have changed only Form class:
1) added field for show text input field
phones = forms.CharField()
2) I have create in my Form instance method clear_phones() where I
check phones and save it all to database and get Phone model ids for
this phone numbers. And return thi
Hi!
I have created templatetag (used Django 1.2.3) in templatetags/
board.py file. I need import form class from application.
Structure of project is:
+ board/
+++ views.py
+++ forms.py
+++ templatetags/
+ board.py
+ ... some other project applications ...
How can I do import of form from th
In my case this work well:
from ..forms import MessageSearchForm
Maybe we have other solution for this?
On 23 сен, 16:46, Anton Danilchenko
wrote:
> Hi!
>
> I have created templatetag (used Django 1.2.3) in templatetags/
> board.py file. I need import form class from application.
&
Hello dev team!
I think that if some field set to *readonly_fields* than we should display
disabled field in *list_editable*.
Now I have set field "*price*" into *list_editable* and *readonly_fields*.
And I see this field not editable in "change view" in admin panel, but I
see it editable in "
11 matches
Mail list logo