Re: Architectural suggestions for (Django + API)

2015-08-17 Thread julio . lacerda
Hi Carl, > I don't quite understand why the situation you describe requires > duplicating models files. Is the canonical data storage now in Project B > instead of Project A, and Project A gets the data via Project B's REST > API? In that case, why does Project A need those models anymore?

Re: Architectural suggestions for (Django + API)

2015-08-17 Thread julio . lacerda
Hi James, I'm going to build a separated instance to provide only REST services to be consumed by Project A. It's ok to use the same views to provide a REST interface in API but in this case I need to remove models from project A, right? Thank you very much! Em domingo, 16 de agosto de 2015 2

Architectural suggestions for (Django + API)

2015-08-16 Thread julio . lacerda
Hey guys, I have a question about an architectural issue and I would like to hear some suggestions about it. I created a project using Django (let's call this Project A) and now I decided to start a new one but this time it is an API using Django REST. So, for now I have to refactor Project A

Re: Keep selected option after form submission

2015-06-10 Thread julio . lacerda
OK, I will check this out. Thank you very much! Em quarta-feira, 10 de junho de 2015 14:31:17 UTC-3, Vijay Khemlani escreveu: > > Subclassing the django.forms.widgets.Select class and setting it as a > widget for the form field. > > On Wed, Jun 10, 2015 at 2:13 PM, > > wrote: > >> I decided to

Re: Keep selected option after form submission

2015-06-10 Thread julio . lacerda
I decided to use {{ form.activity }} instead of that code above, but it is a bit strange, it should work in that way. Now, I'm using django-widget-tweaks (https://github.com/kmike/django-widget-tweaks) to add some attributes to selected tag and it's working. The reason why I wasn't this to ren

Keep selected option after form submission

2015-06-09 Thread julio . lacerda
Hi, I have the same problem of this guy (http://stackoverflow.com/questions/21884631/keeping-option-selected-after-form-is-submitted-in-django), but I do not want to render a field like Daniel Roseman said in the answer. Here is the code:

Re: How to use unlocalize in views

2015-05-25 Thread julio . lacerda
Thank You Luis, but it will be for the entire project, right? I just want to apply this to a single variable. For example, (float) variable_x = 15.123 # Thousand separator from my L10N variable_y = unlocalize(variable_x) print variable_y # 15123 Do you know how can I do that without using a

How to use unlocalize in views

2015-05-25 Thread julio . lacerda
Hello guys! Is there a way to use unlocalize in views? I know that I can use this in template (https://docs.djangoproject.com/en/1.8/topics/i18n/formatting/#localize) -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this gr