Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
angular 6 heroku django ng build produces source code behind current source
I am using django heroku and angular. My current source code has many changes to it. When I run ng serve I see the changes. But when I run ng build add the code to my django project and push to heroku, I get the source code behind my current. I have pushed my current to my repo. This just started happening, the build not reflecting the current source. I have no idea why. I am actively researching this and will add to this question as I have more info. -
SQL/Python (Django) - Join each row to entire table
I'm currently creating an application which maps peoples skills against various technologies. I have 3 tables; Employees Name Department Skill Skill name Results Name (FK) Skill (FK) Skill level I wish to be able to see every single employee with each skill listed in a table. I believe the correct procedure to retrieve this information would be to perform some sort of for loop and select the info from the 3 tables? The alternative is adding rows to the results table each time an employee or skill is added (although this doesn't seem like correct logic to me). -
database design in django for 2-rows multiple colums
I am trying to create a model for the following data in django. I have around 20 columns and they can increase with time but I will only have one row for the values of each column which will update with time. What would be the best way of creating a model for such a data? I cannot transpose the rows into columns because the data is coming from another source which needs the database in the above format. -
Cross-Origin Read Blocking (CORB) issue when making img request
I am currently trying to implement this solution here. The solution seems pretty simple and possible since I am the owner of both of the hosts. On mysite1.com I have added the following img tag. <img src="//mysite1.com.com/cookie_set/" style="display:none;"> On my site2.com (django), I have a view like so: def cookie_set(request): response = HttpResponse() response.set_cookie('my_cookie', value='awesome') return response When I release this code live. I get the following error: Cross-Origin Read Blocking (CORB) blocked cross-origin response https://www.mysite2.com/cookie_set/ with MIME type text/html. See https://www.chromestatus.com/feature/121212121221 for more details. I thought that maybe if I just added "Access-Control-Allow-Origin" in my view this might fix things, but according the docs here: https://www.chromium.org/Home/chromium-security/corb-for-developers, there's one more consideration: For example, it will block a cross-origin text/html response requested from a or tag, replacing it with an empty response instead. Are my assumptions correct? After adding the correct headers should I just change the content-type to something other than text/html? Ultimately, my final goal is I would like to set a cookie for a different domain that I have control of (ideally without a redirect). -
Django static files getting 404
Hello and thanks for your help in advance. I realize this question has been asked and answered in other placed but none of those answers are working for me. I am new to python and django and have inherited a small webapp. I have a dev environment working on my computer with mostly unchanged code, the only changes being to the database name and password to point to my local mySQL server. However, when I run the app, everything works except for the static files. I'm getting 404s in the console when trying to retrieve static files and js methods in static are coming up undefined. The BASE_PATH, STATIC_URL, STATIC_ROOT, STATICFILES_DIR, STATICFILES_FINDERS are all unchanged from the currently working production code, and as far as my beginner eyes can tell are configured correctly according to the documentation and the multiple answers to this question. Is there something that could be different about what I have installed on my computer that would be causing this? Why else would it be different between production and my local copy? Is there something I have to run to get this working? Some settings in settings.py: BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) INSTALLED_APPS = [ 'biogen.apps.BiogenConfig', 'msm.apps.MsmConfig', 'tracker.apps.TrackerConfig', … -
Model manager method works on dev server, but does not on production
I have this model manager: class ProductManager(models.Manager): def search(self, text): import logging logging.info(222222222222, text) vector = pg_search.SearchVector('brand__brand_name', weight='A') +\ pg_search.SearchVector('title', weight='A')+\ pg_search.SearchVector('description', weight='C') query = pg_search.SearchQuery(text) rank = pg_search.SearchRank(vector, query) logging.info(111111, text) return self.get_queryset().annotate(rank=rank).filter(search_vector=query).annotate(document=vector).order_by('-rank') It is used in my model: class Product(TimeStampedModel): '''some fields''' objects = ProductManager() Next in my views.py I have: logging.info(search) products_list = Product.objects.search(search).select_related('some fields') logging.info(products_list) And this works on my local development server, but does not on production. I see logs entered my view, but does not see logs entered search method of my Manager. Why that can happen? -
django - post data query dict is empty
i use postman app and set content-type : application/json and using post method in the body i select "raw" and "JSON(application/json)" and after all of this i enter a simple json : {"token":"ghdfhldfigpd","text":"test Expense" ,"amount":10000} but when i debug my django app : query dict is empty see this picture but when i enter my data in form-data section my app works and post query dict is not empty what the problem should be ? EDIT : i see that the data goes to body but not to post query dict: this picture -
Django and uwsgi shows 502 on production only for specific URLs
I recently upgraded django to 1.8 and celery to 4.1.1. After the upgrade, I am getting 502 error on server for only one url. I am using uwsgi.Here is some of the code.The url I am getting problem with is judging/ urlpatterns = patterns('lbb.views', url(r'^judging/', include('judging.urls')), ) urls.py in judging app urlpatterns = patterns('judging.views', url(r'^$', AppView.as_view(), name='judge_home') ) the view is class AppView(TemplateView): template_name = 'judging/app.html' def get(self, request, *args, **kwargs): """ method get of class JudgeLoginView """ if not request.user.is_authenticated(): url="%s?next=%s" % (reverse("judge_login"), '/judging/#/judge_home') return redirect(url) return super(AppView, self).get(self, request, *args, **kwargs) It use to run normally. But after the upgrade I getting this problem. The nginx file is upstream application { server lbb-app:8000; } server { listen 80 default_server; charset utf-8; client_max_body_size 4G; # adjust to taste server_tokens off; add_header X-Content-Type-Options nosniff; add_header X-XSS-Protection "1; mode=block"; add_header Cache-Control "no-store"; add_header Pragma "no-cache"; add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;"; location /work { include uwsgi_params; uwsgi_pass application; } location / { include uwsgi_params; uwsgi_pass application; } } The uwsgu.ini is [uwsgi] env=DJANGO_SETTINGS_MODULE=lbb.settings.common chdir=/opt/webapp module=lbb.wsgi:application reload-mercy=10 master=1 no-orphans=1 workers=4 enable-threads=1 single-interpreter=1 socket=:8000 harakiri=20 max-requests=5000 vacuum=1 buffer-size = 65535 I made some changes in nginx config and deployed couple of times. But changed back … -
Django test: how to test views, models and forms?
i have this views in my django project: I have problems understanding how the unit tests should be designed for django. From my understanding testing the whole view and the rest seems impossible. I red the documentations but i don't know how to work. Looking at the documentation the examples are too simplified and only focused on the model. def search(request): form = SearchForm(request.POST) if form.is_valid(): citta = request.POST.get("citta", "") num_persone = request.POST.get("postiLetto", '') checkin = request.POST.get("checkIn", "") checkout = request.POST.get("checkOut", "") data = Date() data.data_checkin = checkin data.data_checkout = checkout data.id = '2' data.save() camerePrenotabili=[] for camera in Camera.objects.all(): flag = False if camera.posti_letto < int(num_persone) or camera.id_hotel.citta != citta: continue else: for prenotazione in Prenotazione.objects.all(): if prenotazione.camera == camera: flag = True if flag is False: camerePrenotabili.append(camera) if len(camerePrenotabili) == 0: messaggio = {'notAvailble': True} else: servizi = [] for camera in camerePrenotabili: servizi.append(camera.servizi.split("-")) messaggio = { 'listaCamere': camerePrenotabili, 'listaServizi': servizi, 'checkin': checkin, 'checkout': checkout } return render(request, 'search.html', messaggio) else: return render(request, 'search.html', {'isSearching': True}) def register(request): if request.method == 'POST': form = UserCreationForm(request.POST) if form.is_valid(): username = form.cleaned_data['username'] password = form.cleaned_data['password1'] user = authenticate(username=username, password=password) form.save() login(request, user) return render(request, 'search.html') else: form = UserCreationForm() context … -
Overriding Django 3rd party library template tag to fix UnicodeEncodeError
I'm using the lean third party Django google analytics library in a Django project of mine. This enables server side tracking via utilising the loading of a pixel image on each page request. In this particular project, there exist some url patterns that may contain special (non-ascii) characters. E.g. example.com/user/яαχєя The said library fails with the following error when the aforementioned uri (actualy iri) is encountered: 'ascii' codec can't encode characters in position 6-10: ordinal not in range(128) I peeked at the third party library's relevant code - it's essentially a template tag included in my project like so: {% load google_analytics_tags %} <img src="{% google_analytics %}" width="1" height="1"/> In the code, the library's template tag does the following (excerpt): from six.moves.urllib.parse import urlparse @register.simple_tag(takes_context=True) def google_analytics(context, tracking_code=None, debug=False): request = context.get('request', None) path = request.path parsed_url = urlparse(path) """ Some more processing comes here """ return url parsed_url = urlparse(path) is essentially where the problem occurs. I feel the quick fix/monkey patch here is to simply edit parsed_url = urlparse(path.encode('utf-8')). However, how do I override the 3rd party library's template tag in my code (in order to achieve the aforementioned)? Apologies in case it's a simple question - I … -
unable to use the item.count in django template
I am creating a community based website and when i created the profile model i had the owner as a foreignkey to the user but in the views i did args['user'] = user = request.user args['profile'] = UserCommunityProfile.objects.filter(owner = user) in the template if i do {{ profile.count }} i get nothing why is that ? and this is my models .py class UserCommunityProfile(models.Model): class Meta(): db_table = "user_profile" verbose_name = "User Community Profile" verbose_name_plural = "Users Community Profiles" owner = models.ForeignKey( User, related_name="user_profile_user_key", verbose_name="owner of the profile", blank=False, null=False, on_delete = models.CASCADE, ) DOB = models.DateField ( auto_now=False, auto_now_add=False, ) user_description = models.TextField ( blank=False, null=False, ) profile_picture = models.ImageField( upload_to='community-profile-pictures', default='default.png' ) profile_creation = models.DateTimeField( auto_now_add=True ) def __str__(self): return self.owner.username -
How to get source picture from thumnail picture in django using ImageKit?
I am working on a project which contains a Model with product, owner picture and picture_thumbnail. Where second one is ImageField and thumbnail one is ImageSpecField. So my Model is given below as ProductImage. class ProductImage(models.Model): product = models.ForeignKey(Product, on_delete=models.CASCADE) owner = models.ForeignKey(User, on_delete=models.CASCADE) picture = models.ImageField(upload_to=get_uploaded_file_name, blank=True, null=True) picture_thumbnail = ImageSpecField(source='picture', processors=[ResizeToFill(200, 150)], format='JPEG', options={'quality': 60}) Now I can easily get the thumbnail in Django template like - {{ object.picture_thumbnail.url }} What do I want to know is - how to get picture object corresponding to picture_thumbnail. Actually I want to show all thumbnail list, related to the Product and by clicking on the thumbnail, I want to get the original picture which is the source of that thumbnail. Is there any way to get it? May be directly or indirectly(like by creating similar name, I don't know how)? Thanks in advance -
What is the Technical difference between Node.js , Angular.js , React.js?
I started learning java script few days earlie and now am an intermediate javascript programmer.I want to learn one framework and take my skill to further level but now i am confused regarding choosing one framework to learn. I heard about Node,React,Angular and Django . Can some one point out the main difference among all above framework and what is the thoughness of learning ? I am just trying to grab all and i know it is not possible , i have to start with one,so please answer briefly pointing the difference.. Thanks in advance. -
How to safely bind a foreign key field with a Django ModelForm
I have a list of Foo objects which I want to render in view. Each Foo object has a one to one relationship with a Bar object. My models.py: Class Foo(models.Model): name = models.CharField(max_length=100) Class Bar(models.Model): foo = models.OneToOneField(Foo, related_name="bar", on_delete=models.CASCADE) name = models.CharField(max_length=100) num = models.PositiveInteger(default=0) When I render the Foo objects, I want to pass a BarForm object for each in order to be able to add or edit the Bar object related to the Foo object. My forms.py: class BarForm(forms.ModelForm): class Meta: model = Bar fields = ('name', 'num') my foo_list.html: {% for foo, bar_form in foo_barform_pairs %} <p>{{foo.name}}</p> {% include 'bar_form.html' with form=bar_form %} {% endfor %} The difficulty that I have now is that I don't know how should I include the foo foreign key in the BarForm (the user should not be able to see, add or change this value) so later when I call form.save() the Bar object is saved correctly. My bar_form.html: <form method="post" action="{% url 'submit_bar' %}"> {{ form.as_p }} </form> My views.py: def index(request): foos = Foo.objects.all() foo_barform_pairs = [] for foo in foos: foo_barform_pairs.append((foo, BarForm(initial={'name': foo.bar.name, 'num': foo.bar.num}))) return render(request, 'foo_list.html', {"foo_barform_pairs": foo_barform_pairs} -
python - how to concatenate two index from a list
I have a list as listvalue = ['charity','hospital','carrefour'] I tried to concat two index from a list.But i am getting output as twoconcat = [listvalue[i:i + 2] for i in range(len(listvalue))] output i am getting is [['charity', 'hospital'], ['hospital', 'carrefour'], ['carrefour']] I want output to be [['charity','hospital'],['charity','carrefour'],['hospital','charity'],['hospital','carrefour'],['carrefour','charity'],['carrefour','hospital']] Please suggest me the solution -
The requested URL /accounts/registration/ was not found on this server
What's wrong with my code? I have the next structure of my projects. /project/apps/accounts in /project/project/urls.py I have url(r'^accounts/', include('apps.accounts.urls')), and in /project/apps/accounts/urls.py I have url(r'^registration/', include('registration.backends.hmac.urls')), but when I try http://localhost:8000/accounts/registration/ I have next error The requested URL /accounts/registration/ was not found on this server. Please help me. -
Advantages and disadvantages of using ORM with a NoSQL database
Context: I am working on a django application that uses DynamoDB, PostgreSQL and django-rest-framework. Django ORM fits nicely with PostgreSQL and django-rest-framework. I am looking for a similar solution for DynamoDB. I want to know if it is the right approach and about any limitations that I might encounter in the future. -
Django Rest Framework Get a JSON object in the request and parse in ListCreateAPIView
I'm working on a project with Django Rest Framework in which I need to make a post request in which I need to pass a JSON object against a TextField along with the other fields, How can I pass a JSON object like this: { "no_of_svc": 3, "svc1": { "name": "details", "imagePullPolicy": "IfNotPresent", "versions": { "v1": { "name": "details-v1", "image": "example-details-v1" } }, "port": { "port": 9080, "name": "http" } }, "svc2": { "name": "ratings", "versions": { "v1": { "name": "ratings-v1", "image": "example-ratings-v1" }, "v2": { "name": "ratings-v2", "image": "example-ratings-v2" }, "port": { "port": 9080, "name": "http" } } }, "svc3": { "name": "reviews", "versions": { "v1": { "name": "reviews-v1", "image": "example-reviews-v1", "containerPort": 9080 }, "v2": { "name": "reviews-v2", "image": "example-reviews-v2" }, "port": { "port": 9080, "name": "http" } } } } and later parse it in the create method of generics.ListCreateAPIView ? Here's my model: services = ( ('Single', 'Single'), ('Multiple', 'Multiple'), ) class DeploymentOnUserModel(models.Model): deployment_name = models.CharField(max_length=256, ) credentials = models.TextField(blank=False) project_name = models.CharField(max_length=150, blank=False) project_id = models.CharField(max_length=150, blank=True) cluster_name = models.CharField(max_length=256, blank=False) zone_region = models.CharField(max_length=150, blank=False) services = models.CharField(max_length=150, choices=services) configuration = models.TextField() routing = models.TextField() def save(self, **kwargs): if not self.id and self.services == 'Multiple' and … -
Django Rest Framework create object additional data
I have two models post and group, in post there is a ForeignKey poiting to group. I have a detail view of a group at '/group/name_of_group' where I can create an instance of a post. So basically, When we create the post the field group of it should be automatically set as the page's group (let's say group X, so we're at '/group/X') How to do that? Here's my code: My models: class Post(models.Model): user = models.ForeignKey(settings.AUTH_USER_MODEL, default=1, on_delete=models.CASCADE)#the owner when we delete him, all his posts are deleted group = models.ForeignKey(Group, default=1, on_delete=models.CASCADE) class Group(models.Model): name = models.CharField(max_length=50, default='', unique=True) My form: class PostModelForm(forms.ModelForm): class Meta: model = Post fields = [ "content", "group" ] My API View to create the post: class PostCreateAPIView(generics.CreateAPIView): #/api/group/create serializer_class = PostModelSerializer permission_classes = [permissions.IsAuthenticated] the ajax call when I submit the form event.preventDefault(); $.ajax({ method : "POST", url : '/api/group/create', data : formData,//data contains our new post success : function(data){ this_.find("input[type=text], textarea").val("");//a display function for html attachPost(data, prepend = true);//a display function for html }, error : function(data){ console.log("ERROR:CH0x2 while fetching after creation form submit"); console.log("data :",data.status, data.statusText); } }); N.B an example is to set the owner of the post we … -
Django - how can I do this query in the ORM
Hello everybody I'm trying to make this query: SELECT * FROM dashboard_informe inf INNER JOIN dashboard_servicio serv ON inf.servicio_id = serv.id WHERE serv.nombre LIKE 'Inventario' AND inf.nombre LIKE 'Inventario%' and I don't know how to make it, I tried this: b = Servicio.objects.all().values_list('id') r = Informe.objects.filter(servicio_id=b) And it gives me an error: 'The QuerySet value for an exact lookup must be limited to ' ValueError: The QuerySet value for an exact lookup must be limited to one result using slicing. There are someway to do that? or maybe is better create a Store Procedure with that query? Forward thanks! -
Django Test - Multiple Databases not being created?
I'm trying to test out multiple database routing in django but I'm running into some errors. In my settings.py I have: if TESTING: DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'test', 'USER': 'test', 'PASSWORD': 'testpassword', ... }, 'primary': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', 'NAME': 'test', 'USER': 'test', 'PASSWORD': 'testpassword', .... } } and a view that requires changes to be done on the 'primary' database: @transaction.atomic('primary') def my_view(request): ... do stuff on primary db table this works fine with my configuration in production (i have a db router that routes all write requests to the primary and a replica for reading) but when I run my test suite this view fails with django.db.utils.ConnectionDoesNotExist: The connection primary doesn't exist how can i get django to create this db in testing? or do i need to do some additional aliasing / routing in my test settings? thanks! -
Django development on Windows IDE but deployment on Ubuntu
I'm looking to start development on Django for the first time and I'm looking to deploy the site on a Ubuntu server when production ready. I have never coded with anything other than Windows but I understand that Python references file structure differently on Windows compared to Linux. I would prefer to develop code that can be deployed easily after development. Hence I'm looking for a Windows IDE that syncs files with the deployment machine when saved so that I can run the tests over on the remote machine immediately. I would like to utilise venvs. Thanks! -
Annotate one part of a range to a new field
So we've been using a DateTimeRangeField in a booking model to denote start and end. The rationale for this might not have been great —separate start and end fields might have been better in hindsight— but we're over a year into this now and there's no going back. It's generally been fine except I need to annotate just the end datetime onto a related model's query. And I can't work out the syntax. Here's a little toy example where I want a list of Employees with end of their last booking annotated on. class Booking(models.Model): timeframe = DateTimeRangeField() employee = models.ForeignKey('Employee') sq = Booking.objects.filter(employee=OuterRef('pk')).values('timeframe') Employee.objects.annotate(last_on_site=Subquery(sq, output_field=DateTimeField())) That doesn't work because the annotated value is the range, not the single value. I've tried a heap of modifiers (egs __1 .1 but nothing works). Is there a way to get just the one value? I guess you could simulate this without the complication of the subquery just doing a simple values lookup. Booking.objects.values('timeframe__start') (or whatever). That's essentially what I'm trying to do here. -
my custom login is totally safe?
i has create my custom login, dont use the login's django. this is my models: class TipeUser(models.Model): tipe = models.CharField(max_length=30) detail = models.CharField(max_length=50, blank=True, null=True) class User(models.Model): user = models.CharField(max_length=20) password = models.CharField(max_length=50) state = models.CharField(max_length=1) id_tipe_user = models.ForeignKey(TipeUser, on_delete=models.CASCADE) my views.py : def login(request): context={} return render(request, 'login.html', context) def validate(request): if request.method=='POST': nameUser = request.POST.get('nameUser') passwordUser = request.POST.get('passwordUser') password = md5.new(passwordUser).hexdigest() try: userAdmin = User.objects.get(user=nameUser, password=password, id_tipe_user=1, state=1) request.session['nameUser'] = userAdmin.user return redirect('home') except User.DoesNotExist: message= "User/Password wrong !!" context = { 'message': message, } return render(request, 'login.html', context) def home(request): if 'nameUser' not in request.session: return render(request, 'login.html', {}) else: return render(request, 'myMenu.html', context) def logout(request): if 'nameUser' in request.session: #delete session del request.session['nameUser'] #redirect to login return redirect('login') else: return redirect('login') I would like to know your opinions, it is totally safe my method, it is a good practice this .. some link or tutorial thanks ?? -
Django : my modelForm doesn't get all fields values when printing cleaned data
My cleaned data doesn't get nom and prenom and adress I have the modelForm bellow class associe(forms.ModelForm): #Associé Marocain. date_naissance=forms.DateField(initial=datetime.date.today,widget=forms.TextInput(attrs= { 'type':'date' }),required = False) associe_gerant= forms.CharField(label='',widget=forms.RadioSelect(choices=ASSOCIE_GERANT,attrs={'oninput':'this.className = ""'}),required = False) tassocie=forms.ChoiceField(choices = TYPE_ASSOCIE,widget=forms.Select(attrs={'onchange':'TypeAssocie(this)'}),required = False) nassocie=forms.ChoiceField(choices = NATIONALITE,widget=forms.Select(attrs={'onchange':'NationaliteAssocie(this)'}),required = False) tapport= forms.CharField(label="type d'apport",widget=forms.RadioSelect(choices=APPORT,attrs={'onchange':'TypeApport(this)'}),required = False) montant_apport= forms.FloatField(required = False) type_apport= forms.CharField(max_length=100,required = False) valeur_estimatif= forms.FloatField(required = False) #Associé Etranger. class Meta: model=PerP fields=('nom','prenom','civilite','nassocie','tassocie','cin','date_naissance','lieu_naissance','adresse','passeport','num_sejour','date_delivrance','lien_delivrance','denomination','siege','forme_juridique','capital','ville','num_rc','civilite_gerant_asso','representant_legal','date_naissance_gerant_asso','pass_cin','nationalite_gerant_asso','adresse_gerant_asso') my model : class PerP(models.Model): nom=models.CharField(max_length=20,blank=True) prenom=models.CharField(max_length=20,blank=True) civilite=models.CharField(max_length=10,default="Monsieur",blank=True) cin=models.CharField(max_length=15,blank=True) date_naissance=models.DateField() lieu_naissance=models.CharField(max_length=25,blank=True) adresse=models.CharField(max_length=250,blank=True) tel=models.CharField(max_length=15,blank=True) num_sejour=models.CharField(max_length=20,null=True,blank=True) passeport=models.CharField(max_length=15,null=True,blank=True) date_delivrance=models.DateField(null=True,blank=True) lien_delivrance=models.CharField(max_length=15,null=True,blank=True) nassocie=models.CharField(max_length=15,null=True,blank=True) tassocie=models.CharField(max_length=15,null=True,blank=True) #PerMoral denomination=models.CharField(max_length=200,default=" ",blank=True) siege=models.CharField(max_length=500,default=" ",blank=True) forme_juridique=models.CharField(max_length=20,default=" ",blank=True) rc=models.CharField(max_length=20,default=" ",blank=True) capital=models.FloatField(max_length=20,default=0,blank=True) ville=models.CharField(max_length=20,default=" ",blank=True) num_rc=models.CharField(max_length=20,default=" ",blank=True) #Info representant civilite_gerant_asso=models.CharField(max_length=20, default="Monsieur",blank=True) representant_legal=models.CharField(max_length=20,default="representant",blank=True) date_naissance_gerant_asso=models.DateField(max_length=20,default="1990-01-01",blank=True) pass_cin=models.CharField(max_length=20,default=" ",blank=True) nationalite_gerant_asso=models.CharField(max_length=20,default="Marocaine",blank=True) adresse_gerant_asso=models.CharField(max_length=20,default="adresse",blank=True) when I print cleaned_data this is what I get : [{'nom': '', 'prenom': '', 'civilite': 'Monsieur', 'nassocie': 'hsrh', 'tassocie': 'hsrhs', 'cin': 'verv', 'date_naissance': None, 'lieu_naissance': '', 'adresse': '' ..........}] I dont know why I cant get the nom prenom civilite but I get on my cleaned data cin civilite values... any help please ? Thank you in advance