Re: Right way to modify contrib auth package?

2013-05-02 Thread Anton Baklanov
Hi.

I think that subclassing PasswordChangeForm and doing password length check
in child's clean method is more "correct" way to do this.

Note that contrib.auth's views accept form class as parameter (
https://github.com/django/django/password_resetblob/master/django/contrib/auth/views.py#L242<https://github.com/django/django/blob/master/django/contrib/auth/views.py#L242>),
so you can pass your custom form class to view at urls.py, like that:

url(r'^/url/$', view, {'password_change_form': CustomPasswordResetForm})

On Thu, May 2, 2013 at 5:45 AM, <testbackupa...@gmail.com> wrote:

> Hi,
>
> I'm fairly new to Django, and would like to enforce a minimum password
> length for my site's users. I'm using James Bennett's registration package
> and have made the needed changes to forms.py. It works great.
>
> Now I'd like to apply the same password requirements when a user changes
> or resets their password. This functionality is handled by the contrib.auth
> package, and at first blush it looks like all I need to do is edit the
> forms.py there.
>
> But I'm wondering if that's the "correct" way to fold changes into a core
> package like auth. Is there a better way to do this?
>
> Thanks in advance,
>
> Spork
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Regards,
Anton Baklanov

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: django 1.6.0: admin pages not using unicode methods declared in my model

2012-11-27 Thread Anton Baklanov
Hi Héctor.

check this out
https://docs.djangoproject.com/en/dev//topics/python3/#str-and-unicode-methods

--
Regards,
Anton Baklanov

-- 
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.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django 1.6.0: admin pages not using unicode methods declared in my model

2012-11-26 Thread Anton Baklanov
Hi. I've just checked - it uses __unicode__() to display object names.

Please show us your full admin.py and models.py

-- 
Regards,
Anton Baklanov

-- 
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.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django 1.6.0: admin pages not using unicode methods declared in my model

2012-11-26 Thread Anton Baklanov
__str__ method works fine with python 3.

i will continue searching the truth here and will create ticket (if it will
be required after finding truth)

thanks

On Mon, Nov 26, 2012 at 6:56 PM, ajendrex  wrote:

> Yes, I'm using python 3. I think there is no ticket for this yet, but I
> would prefer someone with better english and more time using django posted
> it.
>
>

-- 
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.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django 1.6.0: admin pages not using unicode methods declared in my model

2012-11-26 Thread Anton Baklanov
No need for that. I've reproduced your problem. With python 3 __unicode__
method is ignored.

We should search for corresponding ticket on trac, or create new one.

On Mon, Nov 26, 2012 at 6:31 PM, Anton Baklanov <antonbakla...@gmail.com>wrote:

> Hi. I've just checked - it uses __unicode__() to display object names.
>
> Please show us your full admin.py and models.py
>
> --
> Regards,
> Anton Baklanov
>
>


-- 
Regards,
Anton Baklanov

-- 
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.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: How to implement a form to update the quantity?

2012-10-01 Thread Anton Baklanov
it *is good idea* to submit...

missed some words, lol

On Mon, Oct 1, 2012 at 9:52 PM, Anton Baklanov <antonbakla...@gmail.com>wrote:

> it to submit forms with ajax, to not reload entire page every time.
>



-- 
Regards,
Anton Baklanov

-- 
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.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: How to implement a form to update the quantity?

2012-10-01 Thread Anton Baklanov
Hi!

You can use something like:

{% for item in garage.garagecar_set.all %}
Car:  {{item.car.name}}
Price:{{item.car.price}}
Quantity: {{item.quantity}}
ID:   {{item.car.id}}

  {{form.q}}
  

 {% endfor %}

and view like

def update_q(request, garagecar_id):
# get garagecar by id here, create form from request, set new value, save()


it to submit forms with ajax, to not reload entire page every time.


P.S.

it looks you are implementing Many-to-Many-Through relation. Django
has support for it out of the box
https://docs.djangoproject.com/en/dev/topics/db/models/#extra-fields-on-many-to-many-relationships



-- 
Regards,
Anton Baklanov

-- 
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.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django development running on 127.0.0.1:8000 not accessible from same machine

2012-08-27 Thread Anton Baklanov
oh, i misunderstood your question.

try to type url with schema into browser's address bar. i mean, use '
http://localhost:8000/' instead of 'localhost:8000'.
also it's possible that some browser extension does this, try disabling
them all.

On Mon, Aug 27, 2012 at 10:53 AM, nav <navanitach...@gmail.com> wrote:

> Dear Folks,
>
> I am running my django development server on 127.0.0.1:8000 and accessing
> this address from my web browser on the same machine. In the past few days
> I have found thet the web browsers keep prepending the address with "www."
> when using the above address. 127.0.0.1 without the prot number works fine
> but the django development server requires a port number.
>
> I have not encountered this problem before and am puzzled by what is
> happening. I am working on a Kubuntu 12.04 linux box and my /etc/hosts/
> file is below if that helps:
>
> 
> 127.0.0.1   localhost
> 127.0.1.1   
>
> # The following lines are desirable for IPv6 capable hosts
> ::1 ip6-localhost ip6-loopback
> fe00::0 ip6-localnet
> ff00::0 ip6-mcastprefix
> ff02::1 ip6-allnodes
> ff02::2 ip6-allrouters
> 
>
> TIA
> Cheers,
> nav
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/EZzlz6iQOGoJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Regards,
Anton Baklanov

-- 
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.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Django development running on 127.0.0.1:8000 not accessible from same machine

2012-08-27 Thread Anton Baklanov
try running dev server with command like "./manage.py runserver 0.0.0.0:8000"
- 0.0.0.0 means that socket will listen for connections on all interfaces.
other people in your network will be able to connect your box using your ip.

if this does not help - show us output of 'sudo iptables-save' and 'sudo
ifconfig'

On Mon, Aug 27, 2012 at 10:53 AM, nav <navanitach...@gmail.com> wrote:

> Dear Folks,
>
> I am running my django development server on 127.0.0.1:8000 and accessing
> this address from my web browser on the same machine. In the past few days
> I have found thet the web browsers keep prepending the address with "www."
> when using the above address. 127.0.0.1 without the prot number works fine
> but the django development server requires a port number.
>
> I have not encountered this problem before and am puzzled by what is
> happening. I am working on a Kubuntu 12.04 linux box and my /etc/hosts/
> file is below if that helps:
>
> 
> 127.0.0.1   localhost
> 127.0.1.1   
>
> # The following lines are desirable for IPv6 capable hosts
> ::1 ip6-localhost ip6-loopback
> fe00::0 ip6-localnet
> ff00::0 ip6-mcastprefix
> ff02::1 ip6-allnodes
> ff02::2 ip6-allrouters
> 
>
> TIA
> Cheers,
> nav
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/EZzlz6iQOGoJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Regards,
Anton Baklanov

-- 
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.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: skip fixtures loading on 'manage.py test myapp'

2012-08-22 Thread Anton Baklanov
exactly

On Wed, Aug 22, 2012 at 2:24 AM, Karen Tracey <kmtra...@gmail.com> wrote:

> That link doesn't really explain why south would be loading fixtures that
> Django itself wouldn't ordinarily load. Unless...do you have migrations
> that are loading fixtures?
>



-- 
Regards,
Anton Baklanov

-- 
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.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: skip fixtures loading on 'manage.py test myapp'

2012-08-20 Thread Anton Baklanov
and, if anyone is interested, here is the answer -
http://south.readthedocs.org/en/latest/settings.html#south-tests-migrate

On Mon, Aug 20, 2012 at 7:36 PM, Anton Baklanov <antonbakla...@gmail.com>wrote:

> Hi Melvyn!
>
> Just tested it on dummy project, and you are right - django itself does
> not do anything like that.
> Problem is in South - when i remove it from INSTALLED_APPS 'manage.py test
> myapp' does not load any fixtures except 'initial_data'.
>
> So, i'm going to south sources now.
>
> Thanks!
>
>
> On Mon, Aug 20, 2012 at 12:01 PM, Melvyn Sopacua <m.r.sopa...@gmail.com>wrote:
>
>> On 19-8-2012 19:05, Anton Baklanov wrote:
>>
>> > When I'm running 'manage.py test myapp' it loads all fixtures that are
>> in
>> > 'myapp/fixtures' directory.
>>
>> Are you sure about that? I think it only loads what is loaded also with
>> syncdb, so initial_data.*.
>>
>> > And what I want is to find a way to tell django skip this fixtures and
>> > instead load some other ones or maybe no fixtures at all for certain
>> tests.
>> > Is it possible?
>>
>> Set the fixtures class attribute on your test class.
>>
>>
>> --
>> Melvyn Sopacua
>>
>> --
>> 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.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>
>
> --
> Regards,
> Anton Baklanov
>
>


-- 
Regards,
Anton Baklanov

-- 
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.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: skip fixtures loading on 'manage.py test myapp'

2012-08-20 Thread Anton Baklanov
Hi Melvyn!

Just tested it on dummy project, and you are right - django itself does not
do anything like that.
Problem is in South - when i remove it from INSTALLED_APPS 'manage.py test
myapp' does not load any fixtures except 'initial_data'.

So, i'm going to south sources now.

Thanks!

On Mon, Aug 20, 2012 at 12:01 PM, Melvyn Sopacua <m.r.sopa...@gmail.com>wrote:

> On 19-8-2012 19:05, Anton Baklanov wrote:
>
> > When I'm running 'manage.py test myapp' it loads all fixtures that are in
> > 'myapp/fixtures' directory.
>
> Are you sure about that? I think it only loads what is loaded also with
> syncdb, so initial_data.*.
>
> > And what I want is to find a way to tell django skip this fixtures and
> > instead load some other ones or maybe no fixtures at all for certain
> tests.
> > Is it possible?
>
> Set the fixtures class attribute on your test class.
>
>
> --
> Melvyn Sopacua
>
> --
> 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.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Regards,
Anton Baklanov

-- 
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.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



skip fixtures loading on 'manage.py test myapp'

2012-08-19 Thread Anton Baklanov
Hi!

When I'm running 'manage.py test myapp' it loads all fixtures that are in
'myapp/fixtures' directory.
And what I want is to find a way to tell django skip this fixtures and
instead load some other ones or maybe no fixtures at all for certain tests.
Is it possible?

-- 
Regards,
Anton Baklanov

-- 
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.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: login or login_decorator issue

2012-08-08 Thread Anton Baklanov
1) i can't see in your code where you are creating some kind of session and
set some cookies to save auth state between requests.
2) is it login_required from django.contrib.auth? if yes - use login from
django.conrib.auth or create your own decorator to check user auth.

anyway - django provides ready for use user auth mechanism and maybe it's
better to use it https://docs.djangoproject.com/en/dev/topics/auth/

On Wed, Aug 8, 2012 at 1:37 PM, Jian Chang <changjia...@gmail.com> wrote:

> what's your  '@login_required(login_url='/login/')'?
> seems like the decorator leads to the redirection.
>
> 2012/8/8 mapapage <mapap...@gmail.com>
>
>>  for the login I do (username must be the id field(pk) of an 'owners'
>> table and password is a  field of the same table):
>>
>> def login_user(request):
>> c = {}
>> c.update(csrf(request))
>> state = ""
>>
>> if request.POST:
>> password = request.POST.get('password')
>> id = request.POST.get('id')
>> try:
>> user = Owners.objects.get(id = id)
>> if user:
>> if user.simple_check_password(password):
>> url = reverse('main', kwargs={ 'user_id': user.id })
>> return HttpResponseRedirect(url)
>> else:
>> state = 'Incorrect username or password'
>> else:
>> state = 'Incorrect username or password'
>> except Exception as e:
>> state = 'Incorrect username or password'
>> print state
>>  return render_to_response('index.html', locals(), context_instance=
>> RequestContext(request))
>>
>> and I also define:
>>
>> def set_password(self, raw_password):
>> self.password = make_password(raw_password)
>>
>> def check_password(self, raw_password):
>> """
>> Returns a boolean of whether the raw_password was correct. Handles
>> hashing formats behind the scenes.
>> """
>> def setter(raw_password):
>> self.set_password(raw_password)
>> self.save()
>> return check_password(raw_password, self.password, setter=None)
>>
>> def simple_check_password(self,raw_password):
>>
>> return raw_password == self.password
>>
>> and at least it seems to me that it works, I mean the user logs in to the
>> main.html page.
>>
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/django-users/-/oPmX_2NBchQJ.
>>
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>  --
> 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.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Regards,
Anton Baklanov

-- 
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.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: login or login_decorator issue

2012-08-08 Thread Anton Baklanov
On Wed, Aug 8, 2012 at 11:15 AM, mapapage <mapap...@gmail.com> wrote:

> I wrote a somehow custom login that works when the user inserts his
> credentials.


can give us more details on how did you implement login?



> He is simply redirected to a page with url:
>
> url(r'^(?P\d+)/$', 'auth.views.main', name='main'),
>
> Now that I try to add @login_decorators but I'm facing problems.
> For example, I have the view def main(request,user_id): where the
> redirected template after the login listens.
> When I add @login_required(login_url='/login/') to that main, when the
> user tries to login nothing happens, I remain to the login page and in the
> terminal I get:
>  "GET /1000/ HTTP/1.1" 302 0
>  "GET /login/?next=/1000/ HTTP/1.1" 200 6201
>
> What happens?
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/T4a3yrBm140J.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Regards,
Anton Baklanov

-- 
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.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Working with a Custom, Dynamic Form (using BaseForm)

2012-08-04 Thread Anton Baklanov
>
>
>
> I am hoping to add an additional field, "Photographers" (from the
> 'Photographer' model) to AForm so that users can select a Photographer to
> become part of an instance of the 'A' model.
>
> Does that make sense?
>

yes, you need to add field and I'm guessing that ModelChoiceField will work
for you.
https://docs.djangoproject.com/en/dev/ref/forms/fields/#modelchoic
efield<https://docs.djangoproject.com/en/dev/ref/forms/fields/#modelchoicefield>

looks like you are using some additional layer before django.forms and
don't just create fields directly, so you may need to extend it too.


>
>
> Thank you very much for any ideas!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/JMg7nHwI44sJ.
>
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Regards,
Anton Baklanov

-- 
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.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: combobox prepopulated to only related objects to "self"

2012-08-01 Thread Anton Baklanov
you can try something like that:

group = ...
choices = [(product.pk, product.name) for product in
group.product_set.all()]
form.fields["myfield"].choices = choices

On Wed, Aug 1, 2012 at 1:17 AM, Ignacio Soto <is...@ingehost.cl> wrote:

> Hi everyone
>
> i have this model
>
> GROUP and Product
>
>
> product has a group field thath is foreignkey to GROUP.
>
>
> and Group has foreignKey to Product to select primary product.
>
> so i want to have a group with many products and one is the "primary
> product".
>
>
> so...i could do this by select inline products with "trough" and search an
> intermediary Model (boolean field).
>
> but it let me select  more than one promary,
>
>
> the solution is the model this way:.
>
> product has a group field thath is foreignkey to GROUP.
>
>
> and Group has foreignKey to Product to select primary product.
>
> so i want to have a group with many products and one is the "primary
> product".
>
> but the primaryproduct field in group will be prepopulated with only the
> related products to this group.
>
>
> how i prepopulate the select(combobox) with the reverse query ?
>
>
>
>
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/d3UpfhONEWwJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Regards,
Anton Baklanov

-- 
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.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Working with a Custom, Dynamic Form (using BaseForm)

2012-07-31 Thread Anton Baklanov
what is going on here:
self.base_fields = fields_for_a(self.instance) ?



On Tue, Jul 31, 2012 at 8:14 PM, Nick_B <nickbew...@gmail.com> wrote:

> Hi,
>
> Have hit a huge roadblock trying to implement a custom, dynamic form into
> my django project. Although I am more familiar with using ModelForms, I
> need to use BaseForm to work with the structure I already have in place.
>
> I have a dictionary of objects inside of my Model 'Photographer' that I am
> trying to pass into my form. The objects from 'Photographer' will be a drop
> down option for the user to select from, then will become part of an
> instance of another model 'A' after the user submits the form. I cannot
> figure out how to include the objects from 'Photographer' into my form,
> given the following form structure:
>
> class AForm(BaseForm):
> def __init__(self, data=None, files=None, instance=None,
> auto_id='id_%s',
>  prefix=None, initial=None, error_class=ErrorList,
>  label_suffix=':', empty_permitted=False):
>
> if not instance:
> raise NotImplementedError("Instance must be provided")
>
> self.instance = instance
> object_data = self.instance.fields_dict()
> self.declared_fields = SortedDict()
> self.base_fields = fields_for_a(self.instance)
>
> # if initial was provided, it should override the values from
> instance
> if initial is not None:
> object_data.update(initial)
>
> BaseForm.__init__(self, data, files, auto_id, prefix,
> object_data,
>   error_class, label_suffix, empty_permitted)
>
> cleaned_data = self.cleaned_data
>
> # save fieldvalues for self.instance
> fields = field_list(self.instance)
>
> for field in fields:
> if field.enable_wysiwyg:
> value = unicode(strip(cleaned_data[field.name]))
> else:
> value = unicode(cleaned_data[field.name])
>
> return self.instance
>
> For a more full representation of the problem in general, including all of
> the models and a lot of the view code, please see my stack overflow
> question:
> http://stackoverflow.com/questions/11548992/adding-values-to-complex-django-view
> .
>
> I cannot thank you enough for any advice given. I have been struggling
> with this issue for over a month, sadly. I appreciate any commentary.
>
>
> Thank you!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/GkiNhsL225kJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Regards,
Anton Baklanov

-- 
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.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.