Re: Registration in 1.8

2014-05-10 Thread Kelvin Wong
Unless you want to hack on Django core, stick with the stable Django 
releases. You say that you are three days in. Maybe try Django 1.4 to start.

K


On Saturday, May 10, 2014 12:00:04 PM UTC-7, erip wrote:
>
> Jon,
>
> I found this. https://docs.djangoproject.com/en/dev/releases/1.8/
>
> I don't know exactly how I got 1.8, but here we are.
>
> From the documentation, there should be no reason why django 1.6 or 1.7 
> registration shouldn't work, but I can't seem to get any concrete examples 
> of user registration in django.
>
> erip
>
>>
>>  

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8d1054e8-c486-4ab2-bb54-194e8a2f5b41%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


help with modelformset_factory and createview

2014-05-10 Thread LaPerl
Hello,

I'm trying to send a form with modelformset_factory inside a CreateView. 
For the moment I only have this code inside the CreateView:

def get(self, request, *args, **kwargs):
self.object = None
local_pk = LiveTool.objects.get(pk=self.kwargs['pk']).pk
num_si = 
StandardItem.objects.filter(related_si_form_ss=local_pk).count()
form = ToolEntryForm2()
formdyn_set1 = modelformset_factory(ToolFieldValue, 
extra=num_si)
formdyn1 = 
formdyn_set1(queryset=ToolFieldValue.objects.none())
formdyn_set2 = modelformset_factory(ToolFieldValue, 
extra=num_si)
formdyn_value_tfv = 
formdyn_set2(queryset=ToolFieldValue.objects.none())
return 
self.render_to_response(self.get_context_data(form=form, formdyn=formdyn1, 
formdyn2=formdyn_value_tfv))

The form is displayed but only "form" and "formdyn" is displayed, what can 
I do to display "formdyn2" too.

Another thing is that if I change the name of "formdyn" to another name, 
then only "form" is displayed, someone knows why?

Is this another way (simple and optimal) to do this?

Thank you very much

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8e39a3d0-7d90-4d9f-a364-b67273e05b0a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Registration in 1.8

2014-05-10 Thread erip
Jon,

I found this. https://docs.djangoproject.com/en/dev/releases/1.8/

I don't know exactly how I got 1.8, but here we are.

>From the documentation, there should be no reason why django 1.6 or 1.7 
registration shouldn't work, but I can't seem to get any concrete examples 
of user registration in django.

erip

On Friday, May 9, 2014 2:42:03 PM UTC-4, jondbaker wrote:
>
> With the official Django release at 1.6.4, I wouldn't assume that third 
> party packages are 1.7.x compliant, much less 1.8.x. (actually, I haven't 
> even heard of 1.8 yet, and it's not on 
> https://github.com/django/django/releases). Getting the hang of the ins 
> and outs of 1.7.x is a great idea, but Django will always be ahead of the 
> third-party packages developed on top of it. Some third-party maintainers 
> wait for official releases, anyway.
>
> JDB
>
>
> On Fri, May 9, 2014 at 11:33 AM, erip  >wrote:
>
>> Hello all,
>>
>> I'm new to Django.
>>
>> Really new.
>>
>> Like... 3 days new.
>>
>> I already completed the Poll app, but I wanted to be a bit more 
>> adventurous with my Django-ing, so I tried to play around with the 
>> django-registration and django-authentication stuff. However, I'm having a 
>> hell of a time in 1.8 getting it to work properly.
>>
>> Does anyone have some resources? I can also send my current code if 
>> anyone cares enough to help.
>>
>> Thanks all,
>> erip
>>
>> -- 
>> 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...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com
>> .
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/2c8e1918-958f-4770-bdc1-bf223d605339%40googlegroups.com
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ec927a35-cef0-4425-9b2a-f0ebed771cf5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Ordering guarantees on BoolenFields?

2014-05-10 Thread Tim Chase
Does Django guarantee that, if an ordering is specified on a
BooleanField of a model, that it will order the same way across
supported databases?  E.g.

  class MyModel(Model):
active = BooleanField()
name = CharField(...)
class Meta:
ordering = [
"-active",
"name",
]
def __unicode__(self):
  s = self.name
  if not self.active:
s += " (inactive)"
  return s

Would this be sufficient to guarantee that my inactive items would be
sorted after my active items regardless of the (supported) database
I use?  Based on some cursory testing with sqlite, it worked but I
didn't see anything in the docs about sorting Booleans (or nullables
for that matter).

Thanks,

-tkc



-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/20140510132316.6fa24107%40bigbox.christie.dr.
For more options, visit https://groups.google.com/d/optout.


Re: New to Django

2014-05-10 Thread François Schiettecatte
I would start with the tutorial:

https://docs.djangoproject.com/en/1.6/intro/tutorial01/

And there is a wealth of documentation on the site itself:

https://www.djangoproject.com

François

On May 10, 2014, at 2:06 PM, ashish garg  wrote:

> Hey
> I am new to Django.I have heard a lot about the powerful features it has.I 
> want to learn Django.
> Any sort of help would be really appreciated.
> How can i get started?
> I am using Django 1.6 and python 2.7.
> How can i get used to it's concepts to gain in-depths in short span of time?
> 
> 
> 
> -- 
> 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.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/b7cdc4a9-7b86-48b7-871c-a6272d09d114%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



signature.asc
Description: Message signed with OpenPGP using GPGMail


address model + ajax state and city search

2014-05-10 Thread Mariano DAngelo
I google whith no success for an app to remplace django shop adress model, 
that could auto load  states when you select a country and city when 
select states...  preferentially world wide.

Does anyone know of any?

thanks, and sorry my english is a little bit rusty.

Mariano DAngelo

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ed246438-8134-44a3-a854-42f0c64f4b2c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


New to Django

2014-05-10 Thread ashish garg
Hey
I am new to Django.I have heard a lot about the powerful features it has.I 
want to learn Django.
Any sort of help would be really appreciated.
How can i get started?
I am using Django 1.6 and python 2.7.
How can i get used to it's concepts to gain in-depths in short span of time?


-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b7cdc4a9-7b86-48b7-871c-a6272d09d114%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How would you do this cleanly in Django (remembering the states of check boxes in multiple pages)

2014-05-10 Thread Tom Evans
On Thu, May 8, 2014 at 2:18 PM, Chi-Cheong Weng  wrote:
> Hi guys,
>
> I have been using Django for a little more than a year now, but I still
> cannot think of a clean way of achieving this:
>
> Let's say I have 1000 products in the db and I want to create a campaign to
> promote the products. I am displaying the products 100 items each time and
> each item has a check box. I want to be able to go back and forth between
> different pages to select products and then when I hit the submit button,
> the server will know what products I select.
>
> How would you do this? Will you use other technology stack such as ajax,
> jquery, etc?
>
> Thanks.
>

It has to be client side, unless you fiddle your "next" and "previous"
buttons to submit forms containing the selection from that page (I
wouldn't do that).

If you are targeting older and newer clients, store the ids in a comma
separated list in a cookie.

If you are only targeting newer clients, use HTML 5 local storage.

When the user finally does hit submit, transfer the list of ids from
the cookie/local storage in to a form field, and handle in the form.

Cheers

Tom

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFHbX1JuJi1iftDQHRTdNkRLt2sv1OeSLm0ZaeboTh02vqMnwg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.