-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
difficult to use it with other forms #7
Comments
True, Widgets would have been better, or even a field using that widgets and joins all input. But I guess this repo is dead. I might fork it an continue working on it, but I would need @mthornhill to change the license. I prefer MIT over BSD. |
Hi CodingJoe, |
Ok, lets talks about this a little more, shall we? There are different approaches to solve this issue. First would be the usage of a single Second would be to have an abstract postal super class that includes all required fields and you can just add fields. That would allow each entity to a distinct postal address. I would go with a different approach, that doesn't even require too much change to the existing code. I would create a base model for addresses that the address form extends. Than I would create a field that would inherit What do you think? I'd be starting working on that tomorrow. |
codingjoe/django-postal@7f67de5 I wrote a base for future implementation right here. It doesn't really cover all the functionality but it's a start. |
I can't guess, how i can merge PostalAddressForm with MyProfileForm.
I think i have a usual task - add address field to my ProfileModel.
my profile form is
class ProfileForm(ModelForm):
class Meta(object):
model = Profile
so inheritance can't work.
I'd like to combine them:
{% csrf_token %} {{ address_form.as_p }} {{ profile_form.as_p }} {% monitor_country_change %} <script type="text/javascript"> $('form').monitor_country_change('#id_country'); </script>but monitor_country_change will overwrite the entire form.
The text was updated successfully, but these errors were encountered: