How to read the json file of a dinamical way in relation to their size structure

2016-10-10 Thread Bernardo Garcia
I have the following JSON file named ProcessedMetrics.json which is necessary read for send their values to some template: { "paciente": { "id": 1234, "nombre": "Pablo Andrés Agudelo Marenco", "sesion": { "id": 12345, "juego": [ { "nombre": "bonzo",

WOrking with checkbox Multiple Select FIeld - Django Admin

2016-10-29 Thread Bernardo Garcia
HI, friends. Someone know how to work with a field that allow perform a multiple selection in a field?, like a checkbox. In django admin, Thanks :) -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiv

Accessing to objects of a dynamic way in django template

2016-12-04 Thread Bernardo Garcia
I have the following class based view in which I perform to queryset: class PatientDetail(LoginRequiredMixin, DetailView): model = PatientProfile template_name = 'patient_detail.html' context_object_name = 'patientdetail' def get_context_data(self, **kwargs): co

Binding data to one o many forms from one view - BadHeaderError at - Header values can't contain newlines ()

2017-04-08 Thread Bernardo Garcia
I have the following forms to each user profile class UserUpdateForm(forms.ModelForm): class Meta: widgets = {'gender':forms.RadioSelect,} fields = ("username", "email", "is_student", "is_professor", "is_executive",) model = get_user_mode

Django - Updating multiple models from a form - Data does not saved

2017-04-12 Thread Bernardo Garcia
I have a custom User model to manage some profiles user: is_student, is_professor and is_executive In this model, in addition, I have the get_student_profile(), get_professor_profile() andget_executive_profile() methods to get the user profiles data of each user from my different views. cla

Working with Django signals

2015-12-30 Thread Bernardo Garcia
I have a custom users schema in Django for work with roles or users type, creating an application named userprofile which will be or will setup my custom user model. In my settings.py I have the following configuration: INSTALLED_APPS = [ ... 'userprofile',]#Custom model Users AUT

Amazon + Django each 12 hours appears that [Errno 5] Input/output error

2016-01-06 Thread Bernardo Garcia
I recently setup and deploy an Amazon EC2 instance for deploy my django project. I was interacting with my application via browser when I get this error in the browser: errno 5 input/output error django This error did reference to some function of my application, but in my console the

Re: Working with Django signals

2016-01-06 Thread Bernardo Garcia
.9/topics/auth/default/#django.contrib.auth.forms.UserCreationForm >- > > https://docs.djangoproject.com/en/1.9/topics/auth/customizing/#extending-the-existing-user-model >- > > https://docs.djangoproject.com/en/1.9/ref/contrib/admin/#django.contrib.admin.ModelAdmin

Re: Amazon + Django each 12 hours appears that [Errno 5] Input/output error

2016-01-07 Thread Bernardo Garcia
rver, and today I have again the error. There is some problem with EC2 infraestructure with Django (I don't think so) or the problem is more for my application side? I don't think so that the function get_context_data() of my application be the problem ... On Wednesday, January 6, 20

Re: Amazon + Django each 12 hours appears that [Errno 5] Input/output error

2016-01-07 Thread Bernardo Garcia
or deploy > http://michal.karzynski.pl/blog/2013/06/09/django-nginx-gunicorn-virtualenv-supervisor/ > . > > > 2016-01-07 9:48 GMT-06:00 Bernardo Garcia > >: > >> This is my error, which again I get despite that yesterday was solved >> restarting my server >> >&g

API REST - Url's Serialized models don't work with the hostname of my production server - Django Rest Framework

2016-02-23 Thread Bernardo Garcia
Hi everyone Djangonauts :) Currently I am exposing a Django application (for the momento is just thier users schema) with Django Rest Framework and happen that each serialized model, in the url attribute, I have is the localhost machine address development and don't take the hostname of my prod

Re: API REST - Url's Serialized models don't work with the hostname of my production server - Django Rest Framework

2016-02-23 Thread Bernardo Garcia
manage.py runserver is used just in my local development machine On Tuesday, February 23, 2016 at 9:25:36 AM UTC-5, Avraham Serour wrote: > > are you running django using manage.py runserver? > > > On Tue, Feb 23, 2016 at 4:03 PM, Bernardo Garcia > wrote: > >&

Re: API REST - Url's Serialized models don't work with the hostname of my production server - Django Rest Framework

2016-02-23 Thread Bernardo Garcia
mple it tells to use: > > bind = '127.0.0.1:8001' > > are you binding to 127.0.0.1 ? > > On Tue, Feb 23, 2016 at 4:33 PM, Bernardo Garcia > wrote: > >> Hi Mr. Avraham Serour thanks for the attention >> >> In my amazon ec2 production server I am run

Re: API REST - Url's Serialized models don't work with the hostname of my production server - Django Rest Framework

2016-02-23 Thread Bernardo Garcia
{ > *proxy_pass http://127.0.0.1:8000 <http://127.0.0.1:8000>;* > proxy_set_header X-Forwarded-Host $server_name; > proxy_set_header X-Real-IP $remote_addr; > add_header P3P 'CP="ALL DSP COR PSAa PSDa OUR NOR ONL UNI COM &g

Re: API REST - Url's Serialized models don't work with the hostname of my production server - Django Rest Framework

2016-02-23 Thread Bernardo Garcia
-90-253-22.compute-1.amazonaws.com/ What is the order in which I should setup the headers? Thanks On Tuesday, February 23, 2016 at 4:51:16 PM UTC-5, James Schneider wrote: > > > > On Tue, Feb 23, 2016 at 6:03 AM, Bernardo Garcia > wrote: > >> Hi everyone Djangonauts >>

django-smart-selects: ChainedManyToManyField value not selected after saving data via django admin

2016-03-02 Thread Bernardo Garcia
I am working with django-smart-selects via django admin form. The idea that I have is try a model chaining or deployment of value fields accord to previous value in a previous separate field. Accord to the first option value selected in the f

Re: problem deploying two apps

2016-03-02 Thread Bernardo Garcia
Hi frocco May be this post can ve useful for you, althought instead of uwsgi use gunicorn http://michal.karzynski.pl/blog/2013/10/29/serving-multiple-django-applications-with-nginx-gunicorn-supervisor/ On Tuesday, March 1, 2016 at 11:56:57 AM UTC-5, frocco wrote: > > Hi, > > I followed this > h

Handling fields with values that depend on a value from previous file

2016-03-02 Thread Bernardo Garcia
I want handling fields' values which depend on a value from another field Currently I am working with django-smart-selects but I have this problems

Re: MultipleCharField

2016-03-08 Thread Bernardo Garcia
Hi RAfael. I am using this app for multi select fields https://github.com/goinnn/django-multiselectfield which perform a render the options like checkbox of multiple selection in the django admin forms You should install it of this way 1. Download the tar.gz file from https://pypi.python.org/

Deploy Django to Heroku - Push rejected

2016-03-20 Thread Bernardo Garcia
I am trying deploy my Django application to heroku and I get an error when I perform git push heroku master command Do you know the reason which I get this error? uleague) ➜ pickapp git:(master) ✗ git push heroku masterCounting objects: 195, done.Delta compression using up to 8 threads.Compres

Deploy Django to Heroku - Push rejected

2016-03-26 Thread Bernardo Garcia
I am trying deploy my Django application to heroku and I get an error when I perform git push heroku master command My structure directory is the following And the content of requirements/production.txt is: -r base.txt gunicorn==19.4.5 dj-database-url=

Deploy static assets to heroku from local machine - can't open file 'manage.py': [Errno 2] No such file or directory

2016-03-30 Thread Bernardo Garcia
I am trying deploy my assets files to heroku and I get this output in my command line interface: (nrb_dev) ➜ neurorehabilitation_projects git:(master) ✗ heroku run python manage.py collectstaticRunning python manage.py collectstatic on neurorehabilitation up, run.5168 python: can't open

Re: Django Admin actions with select optgroup

2016-03-30 Thread Bernardo Garcia
When you talk about of optgroup you mean the choicegroup? In affirmative case, this can be that you looking .. https://docs.djangoproject.com/en/1.9/ref/models/fields/#choices Also is possible that MultipleSelectField can be useful for you? In affirmative case, this thread can be useful... https