Re: Two Things: (1)-ModelChoiceField with a searchbox and (2)-Related Dropboxes

2015-07-15 Thread François Schiettecatte
Another option would be JQuery Autocomplete:

https://github.com/devbridge/jQuery-Autocomplete

I have used both, JQuery Autocomplete is simpler to get going but Select2 is 
more flexible.

François

> On Jul 15, 2015, at 7:27 PM, Dan Tagg  wrote:
> 
> Select2 can do this https://select2.github.io. Other alternatives are 
> available too.
> 
> Dan
> 
> On 13 Jul 2015 4:27 pm, "Miguel Pereira Legal"  wrote:
> I have this two questions:
> 
> I am trying to write a small stock management system, and I am finding 
> problems in the Form.
> See, when an item goes out I have a dropbox (ChoiceField) to choose the item 
> that is going out, but this dropbox gets too long when you have so many 
> elements in the data base to choose from.
> 
> There is a way to implement a ChoiceField with a integrated search box to 
> make this search and selection more flexible?
> 
> If anyone have another idea, I will listen.
> 
> In the other hand, about the related dropboxes.
> What about if I have a Form where I need to chose a Manufacturer and THEN a 
> Model (i.e Samsung and then S6).
> 
> I need that after the selection of "Samsung" the next dropbox filter the 
> options for that manufacturer. I need that functionality because if the user 
> can choose freely the Manufacturer and then de model, it could be wrong (i.e. 
> the user could choose Samsung and then 6S, and 6S is not a cellphone model of 
> Samsung).
> 
> Thanks for your patience.
> 
> -- 
> 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/742c2210-5cce-42cb-9997-c9258fd602db%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/CAPZHCY4FFYe8XMwwrFLjnHnVhCNMJJGpnq6mimfm2x9Lujpp3g%40mail.gmail.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/13C57846-57C5-4827-B23E-86F8F3687604%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Two Things: (1)-ModelChoiceField with a searchbox and (2)-Related Dropboxes

2015-07-15 Thread Dan Tagg
Select2 can do this https://select2.github.io. Other alternatives are
available too.

Dan
On 13 Jul 2015 4:27 pm, "Miguel Pereira Legal" 
wrote:

> I have this two questions:
>
> I am trying to write a small stock management system, and I am finding
> problems in the Form.
> See, when an item goes out I have a dropbox (ChoiceField) to choose the
> item that is going out, but this dropbox gets too long when you have so
> many elements in the data base to choose from.
>
> There is a way to implement a ChoiceField with a integrated search box to
> make this search and selection more flexible?
>
> If anyone have another idea, I will listen.
>
> In the other hand, about the related dropboxes.
> What about if I have a Form where I need to chose a Manufacturer and THEN
> a Model (i.e Samsung and then S6).
>
> I need that after the selection of "Samsung" the next dropbox filter the
> options for that manufacturer. I need that functionality because if the
> user can choose freely the Manufacturer and then de model, it could be
> wrong (i.e. the user could choose Samsung and then 6S, and 6S is not a
> cellphone model of Samsung).
>
> Thanks for your patience.
>
> --
> 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/742c2210-5cce-42cb-9997-c9258fd602db%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/CAPZHCY4FFYe8XMwwrFLjnHnVhCNMJJGpnq6mimfm2x9Lujpp3g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Two Things: (1)-ModelChoiceField with a searchbox and (2)-Related Dropboxes

2015-07-15 Thread felix

El 13/07/15 10:09, Miguel Pereira Legal escribió:

I have this two questions:

I am trying to write a small stock management system, and I am finding 
problems in the Form.
See, when an item goes out I have a dropbox (ChoiceField) to choose 
the item that is going out, but this dropbox gets too long when you 
have so many elements in the data base to choose from.


There is a way to implement a ChoiceField with a integrated search box 
to make this search and selection more flexible?


If anyone have another idea, I will listen.

In the other hand, about the related dropboxes.
What about if I have a Form where I need to chose a Manufacturer and 
THEN a Model (i.e Samsung and then S6).


I need that after the selection of "Samsung" the next dropbox filter 
the options for that manufacturer. I need that functionality because 
if the user can choose freely the Manufacturer and then de model, it 
could be wrong (i.e. the user could choose Samsung and then 6S, and 6S 
is not a cellphone model of Samsung).
I'm a newbie and I guess that you need to use AJAX to accomplish these 
tasks.

A javascript library, or framework like AngularJS could be useful here.

Cheers,
Felix.

--
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/55A6D11A.9070204%40epepm.cupet.cu.
For more options, visit https://groups.google.com/d/optout.


Two Things: (1)-ModelChoiceField with a searchbox and (2)-Related Dropboxes

2015-07-13 Thread Miguel Pereira Legal
I have this two questions:

I am trying to write a small stock management system, and I am finding 
problems in the Form.
See, when an item goes out I have a dropbox (ChoiceField) to choose the 
item that is going out, but this dropbox gets too long when you have so 
many elements in the data base to choose from.

There is a way to implement a ChoiceField with a integrated search box to 
make this search and selection more flexible?

If anyone have another idea, I will listen.

In the other hand, about the related dropboxes.
What about if I have a Form where I need to chose a Manufacturer and THEN a 
Model (i.e Samsung and then S6).

I need that after the selection of "Samsung" the next dropbox filter the 
options for that manufacturer. I need that functionality because if the 
user can choose freely the Manufacturer and then de model, it could be 
wrong (i.e. the user could choose Samsung and then 6S, and 6S is not a 
cellphone model of Samsung).

Thanks for your patience.

-- 
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/742c2210-5cce-42cb-9997-c9258fd602db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Internationalize: Get two things to happen when you select a language: set the language and redirected to a different part of the site

2014-06-20 Thread visionary800

>
> Resolved.  The solution was staring right at me (0^0) the whole time n the 
> template language.  I figured it out upon reading further down on the 
> documents.
>

https://docs.djangoproject.com/en/1.6/topics/i18n/translation/#miscellaneous
 

-- 
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/38a740dc-eaf6-4265-8323-4500ba1fb97e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Internationalize: Get two things to happen when you select a language: set the language and redirected to a different part of the site

2014-06-19 Thread visionary800
I am stumped.  I am not sure how to approach this.  I think its best if I 
describe what I would like to happen then I would greatly appreciate some 
recommendations.

*Imagine this...*
You go to www.mysite.com and you are presented solely with two buttons(and 
nothing else): [Enter in English] | [Enter in Spanish].  You can press 
either button and what happens next is you enter the site to a different 
page that says "Welcome" or "hola" (which ever you chose) and language is 
session is set.  I am trying to get two things to happen with one button: 
1. set the language and 2. go to a new page(all in one process).

*Background: *
Internationalization works excellent on my site once you are in the site 
and you change to another language.  I have no problems with my site when 
you are in and you change the language setting - all is good there. 
 Internationalization works but I can't combine it with an other step.

*This is a general idea of what I thought might work - Any suggestions?*
urlpatterns = patterns('',
url(
regex=r'^english/',
view = UserEnterInEnglish.asView(),
name = 'enter_english'
),
url(
regex=r'^spanish/',
view = UserEnterInSpanish.asView(),
name = 'enter_spanish'
),...

class UserEnterInEnglish(TemplateView):
'''User selects english''
'
get(self, request, *args, **kwargs):
#Step 1. Set the language
#Post to language which I do not know how to do
#Post to' name="language" value="es" action="/i18n/setlang/"
   #Step 2 Go Enter the Site
return HttpResponseRedirect('/about')

class UserEnterInSpanish(TemplateView):
'''User selects spanish''
'
get(self, request, *args, **kwargs):
#Step 1. Set the language
#Post to language which I do not know how to do
#Post to' name="language" value="es" action="/i18n/setlang/"
   #Step 2 Go Enter the Site
return HttpResponseRedirect('/about')

-- 
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/6d24dbe5-ea73-4024-9b9d-f63f63b62f7d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Two Things

2007-08-09 Thread [EMAIL PROTECTED]

Thanks Mike.

-LJ

On Aug 10, 12:23 am, "[EMAIL PROTECTED]"
<[EMAIL PROTECTED]> wrote:
> New to the group, so I thought I'd post my favorite
>
> Django video:http://video.google.com/videoplay?docid=-70449010942275062
> Django 
> book:http://www.amazon.com/Pro-Django-Development-Done-Right/dp/1590597257...
>
> Cheers,
>
> Mike


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Two Things

2007-08-09 Thread [EMAIL PROTECTED]

New to the group, so I thought I'd post my favorite

Django video: http://video.google.com/videoplay?docid=-70449010942275062
Django book:
http://www.amazon.com/Pro-Django-Development-Done-Right/dp/1590597257/ref=pd_bbs_sr_1/104-7275500-7139960?ie=UTF8=books=1186719760=8-1

Cheers,

Mike


--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---