Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
Serve ZIP created on-the-fly from thread results
I'm building a Django endpoint to serve a ZIP archive. The archive consists of several text files, each being serialized results of functions executions. I want to avoid creating the archive in memory before serving it to the client. Ideally I'd like to start streaming the zip once any of the functions completes. I researched the topic online and have the impression that what I'm trying to do may not be easy to accomplish. I played a bit with StreamingHttpResponse and BytesIO (this is one of the versions I got in the meantime): def fetch(self, archive): def get_write_func(file_name): def _wrapped(f): archive.writestr(file_name, f.result()) return _wrapped executor = concurrent.futures.ThreadPoolExecutor(max_workers=3) # just one task, but there could possibly be many of them executor.submit( do_sth ).add_done_callback(get_write_func('whatever.json')) // Django view def zip(self, request): file_like = BytesIO() archive = zipfile.ZipFile(file_like, 'w', zipfile.ZIP_BZIP2) self.fetch(archive) threat_uid = kwargs[self.lookup_url_kwarg] zip_name = 'myzip.zip' response = StreamingHttpResponse(file_like, content_type='application/zip') response['Content-Disposition'] = 'attachment; filename={}'.format(zip_name) return response However, it will download archive before it is filled with data. -
Unable to migrate the files on heroku ,tried all solutions
I have tried changing the max length but none of them worked ,,,stucked in this .....need help...Apart from that i have tried other solutions also on different branches but same error everywhere MY TRACEBACK :: Traceback (most recent call last): File "manage.py", line 22, in <module> execute_from_command_line(sys.argv) File "/app/.heroku/python/lib/python3.5/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line utility.execute() File "/app/.heroku/python/lib/python3.5/site-packages/django/core/management/__init__.py", line 359, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/app/.heroku/python/lib/python3.5/site-packages/django/core/management/base.py", line 294, in run_from_argv self.execute(*args, **cmd_options) File "/app/.heroku/python/lib/python3.5/site-packages/django/core/management/base.py", line 345, in execute output = self.handle(*args, **options) File "/app/.heroku/python/lib/python3.5/site-packages/django/core/management/commands/migrate.py", line 204, in handle fake_initial=fake_initial, File "/app/.heroku/python/lib/python3.5/site-packages/django/db/migrations/executor.py", line 115, in migrate state = self._migrate_all_forwards(state, plan, full_plan, fake=fake, fake_initial=fake_initial) File "/app/.heroku/python/lib/python3.5/site-packages/django/db/migrations/executor.py", line 145, in _migrate_all_forwards state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial) File "/app/.heroku/python/lib/python3.5/site-packages/django/db/migrations/executor.py", line 244, in apply_migration state = migration.apply(state, schema_editor) File "/app/.heroku/python/lib/python3.5/site-packages/django/db/migrations/migration.py", line 129, in apply operation.database_forwards(self.app_label, schema_editor, old_state, project_state) File "/app/.heroku/python/lib/python3.5/site-packages/django/db/migrations/operations/fields.py", line 84, in database_forwards field, File "/app/.heroku/python/lib/python3.5/site-packages/django/db/backends/postgresql/schema.py", line 21, in add_field super(DatabaseSchemaEditor, self).add_field(model, field) File "/app/.heroku/python/lib/python3.5/site-packages/django/db/backends/base/schema.py", line 409, in add_field self.execute(sql, params) File "/app/.heroku/python/lib/python3.5/site-packages/django/db/backends/base/schema.py", line 112, in execute cursor.execute(sql, params) File "/app/.heroku/python/lib/python3.5/site-packages/django/db/backends/utils.py", line 79, in execute return super(CursorDebugWrapper, self).execute(sql, params) File "/app/.heroku/python/lib/python3.5/site-packages/django/db/backends/utils.py", line 64, in execute return self.cursor.execute(sql, params) File "/app/.heroku/python/lib/python3.5/site-packages/django/db/utils.py", line 94, in __exit__ six.reraise(dj_exc_type, dj_exc_value, traceback) File "/app/.heroku/python/lib/python3.5/site-packages/django/utils/six.py", line 685, in reraise raise value.with_traceback(tb) File … -
How to use links to local server as href in Django?
I want to have links that are clickable . That link is a path in a server. Example: file:///I:/IT/Install/Winrar/ SO far I have my view code: def installables_available(request): install_path = r'I:/IT/Install/' list_setup = os.listdir(install_path) full_path = [os.path.join(install_path, item) for item in list_setup] return render(request, 'generic/installables.html', {'full_path': full_path}) And the html looks like: <html lang="en"> <head> <title>All Installables</title> </head> <body> <h1>Below are all setups available</h1> {% for name in full_path %} <ul> <li><a href={{name}}> {{name}}</a></li> </ul> {% endfor %} <hr> <p>Thanks for visiting my site.</p> </body> </html> I do get the page showing links but , If I click them, they don't do anything. But hovering on them shows the correct path i.e e.g file:///I:/IT/Install/Winrar/. -
Service call to export to excel
I'm making a service call so I can export user.email and sub_organization to excel using django-excel library, but I'm failing to understand how to filter this from my model. First I was trying to export only user.email but I have and error invalid literal for int() with base 10: 'user.email', second, how can I add sub_organization here, because every user have one. This file will have two rows one with email second will have sub_organization, so can someone explain to me how to make this work? model: class ClientContact(models.Model): user = models.OneToOneField(User) sub_organization = models.ForeignKey(ClientSubOrganization, related_name='contacts') form: from django.http import HttpResponseBadRequest from django.http import HttpResponseForbidden from django.views.generic import FormView from django import forms import django_excel as excel from clients.models import ClientContact class UploadFileForm(forms.Form): pass class ExportXls(FormView): template_name = 'clients/export_email/export_xls.html' form_class = UploadFileForm def get(self, request, *args, **kwargs): form_class = self.get_form_class() form = self.get_form(form_class) if request.user.is_staff: return self.render_to_response( self.get_context_data(form=form, can_submit=True,)) else: return HttpResponseForbidden() def post(self, request, *args, **kwargs): form_class = self.get_form_class() form = self.get_form(form_class) if request.user.is_staff: if form.is_valid(): query_sets = ClientContact.objects.filter(user='user.email') column_name = ['contact_email', 'sub_organization'] return excel.make_response_from_query_sets(query_sets, column_name, "xls", file_name="export_client_mail") else: return HttpResponseBadRequest() else: return HttpResponseForbidden() -
Update Field With Another Field Value Dynamically in Django
I have two models ModelA and ModelB class ModelA(models.Model): amount_per_product=models.PositiveIntegerField(default='', help_text="e.g 10000") class ModelB(models.Model): no_of_product_needed=models.PositiveIntegerField() amount_to_pay=models.PositiveIntegerField() modela=models.ForeignKey(ModelA) Now, whenever a user put a number e.g 2 in the no_of_product_needed field, Django should show the total amount the user will pay in the amount_to_pay field before saving. So the user can see the total amount and if he/she wants to buy, the user will click buy and Django will save the total amount in the amount_to_pay field. I wrote a pre_save hook but it's not working. Whenever I insert a number in the no_of_product_needed field, it won't show the total amount in the amount_to_pay field. The Hook class ModelB(models.Model): no_of_product_needed=models.PositiveIntegerField() amount_to_pay=models.PositiveIntegerField() modela=models.ForeignKey(ModelA) def __init__(self, *args, **kwargs): super(ModelB, self).__init__(*args, **kwargs) pre_save.connect(self.before_buying, sender=ModelB) def before_buying(self, sender, instance, *args, **kwargs): initial= self.modela.amount_per_product amt_needed= self.no_of_product_needed final_amt=int(initial) * int(amt_needed) self.amount_to_pay= self.final_amt What am I missing? Could this be done in JS? -
Mongoengine, how to get embeeded document list with field name
I am using django 1.10, python 2.7.6 and mongoengine 0.11. I have following classes in models.py class embed(EmbeddedDocument): fruits = ListField(required = True) chocolates = ListField(required = True) class test_coll(Document): id = StringField(primary_key = True) test1 = ListField(EmbeddedDocumentField(embed)) test2 = ListField(EmbeddedDocumentField(embed) write now my views.py contains, def test(): for details in test_coll.objects: pass for d1 in details.test1: print ("**test_coll.test1.fruits",d1.fruits) my mongodb collection is as- { "_id": "xyz", "test1": [{ 'fruits' = ['mango', 'orange'], 'c' = ['kitkat', 'eclairs'] }] "test2": [], } Is there any way to get/display embeeded document list with it's name. As currently I have to iterate over Collection object. Thanks in advance. -
Best front end framework for a Django project
I wish to shift a Django application from using simple html and css to a front end framework.The framework needs to be easy to pick up, easy to follow, well-structured and light. I will also be providing alternate actions whenever javascript is disabled. What would be the best choice?Is Angular 2 a good choice? -
Django celery and notify.js
Is it possible to use notify.js with Celery in Django? What I want to achieve is that when certain task is finished I want to have small pop up notification on any page on the site that task has finished or failed. Or any other solution for this? -
NameError: name 'BookAdmin' is not defined - Django
I'm using Django and Python 3.6 I had this Error: NameError: name 'BookAdmin' is not defined and this my code (models.py) in 'store' app. from django.db import models from django.utils import timezone class Book(models.Model): title = models.CharField(max_length=200) author = models.CharField(max_length=200) description = models.TextField() publish_date = models.DateField(default=timezone.now) and in admin.py from django.contrib import admin from .models import Book class BookAdmin(admin.ModelAdmin): list_display = ('title', 'author') admin.site.register(Book, BookAdmin) And the Error is File "C:\venv\lib\site-packages\django\__init__.py", line 27, in setup apps.populate(settings.INSTALLED_APPS) File "C:\venv\lib\site-packages\django\apps\registry.py", line 115, in populate app_config.ready() File "C:\venv\lib\site-packages\django\contrib\admin\apps.py", line 23, in ready self.module.autodiscover() File "C:\venv\lib\site-packages\django\contrib\admin\__init__.py", line 26, in autodiscover autodiscover_modules('admin', register_to=site) File "C:\venv\lib\site-packages\django\utils\module_loading.py", line 50, in autodiscover_modules import_module('%s.%s' % (app_config.name, module_to_search)) File "C:\venv\lib\importlib\__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 978, in _gcd_import File "<frozen importlib._bootstrap>", line 961, in _find_and_load File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 655, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 678, in exec_module File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed File "C:\venv\bookstore\store\admin.py", line 5, in <module> class BookAdmin(admin.ModelAdmin): File "C:\venv\bookstore\store\admin.py", line 8, in BookAdmin admin.site.register(Book, BookAdmin) NameError: name 'BookAdmin' is not defined -
Django log the requests using apache kafka
I want to log the every request coming to Django and save to mongo db like this sample http://engineering.hackerearth.com/2015/02/26/logging-millions-requests-what-it-takes/ want to call something like this. # this creates a thread which collects required data and forwards # it to the transporter cluster run_async(log_request_async, request) How can I do this inside django request.? any samples to call runasync ? -
How to run custom django-admin manage.py command
I would like to run my custom command with more than one city's id. How to I do that? I didn't find anythind in the documentation. This is source code of my command: from django.core.management.base import BaseCommand, CommandError from reservation.models import City class Command(BaseCommand): help = 'Closes the specified poll for voting' def add_arguments(self, parser): parser.add_argument('city_id', nargs='+', type=int) def handle(self, *args, **options): for city_id in options['city_id']: try: city = City.objects.get(pk=city_id) except City.DoesNotExist: raise CommandError('City "%s" does not exist' % city_id) print city This command works pretty well for python manage.py command_name 1 -It print city with id=1. But I would like to print city with id 1,2.. without executing the same command multiple times. It is python manage.py command_name 1, 2 or python manage.py command_name [1,2,3] - something like this dosen't work. -
Django daemon Observer using MeteorClient asynchronous functions
I am using MeteorDDPClient asynchronous functions which detects changes in Mongo database to update my MySQL database using Django 1.9.I have to use this functions as daemons so new data won't be lost, any suggestions ? -
Parent id in save_formset - django
Hi I have problem with function def save_formset(self, request, form, formset, change): instances = formset.save(commit=False) How to get pk of parent in this function? -
How do I direct to a page in a different django folder from my views
I have two django folders, Accounts & Products. I have the login html page in accounts and the productlist html page in products. What I would like to do is if the login credentials are correct which is checked in the views file in Accounts, then it should be redirected to the productlist html in the Products folder. How would I do this? -
Python + Django debug startup on WSGI
I'm facing a crash launching with GUNICORN my App on MacOsX Sierra. Is there any way to better understand the error message? Like to know which dependency is missing or something like that? I searched online for more log-level info but, right now, the error is not easy to understand. I report the error if somebody has any clue or any tool to drill down the exception and find it out! Thanks in advance gunicorn direttoo.wsgi:application --workers 1 --bind 127.0.0.1:8001 --log-level Info [2017-03-24 12:30:51 +0100] [3304] [INFO] Starting gunicorn 19.6.0 [2017-03-24 12:30:51 +0100] [3304] [INFO] Listening at: http://127.0.0.1:8001 (3304) [2017-03-24 12:30:51 +0100] [3304] [INFO] Using worker: sync [2017-03-24 12:30:51 +0100] [3307] [INFO] Booting worker with pid: 3307 [2017-03-24 11:30:51 +0000] [3307] [ERROR] Exception in worker process Traceback (most recent call last): File "/Users/diegobanovaz/Projects/direttoo/env/lib/python2.7/site-packages/gunicorn/arbiter.py", line 557, in spawn_worker worker.init_process() File "/Users/diegobanovaz/Projects/direttoo/env/lib/python2.7/site-packages/gunicorn/workers/base.py", line 126, in init_process self.load_wsgi() File "/Users/diegobanovaz/Projects/direttoo/env/lib/python2.7/site-packages/gunicorn/workers/base.py", line 136, in load_wsgi self.wsgi = self.app.wsgi() File "/Users/diegobanovaz/Projects/direttoo/env/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi self.callable = self.load() File "/Users/diegobanovaz/Projects/direttoo/env/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load return self.load_wsgiapp() File "/Users/diegobanovaz/Projects/direttoo/env/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp return util.import_app(self.app_uri) File "/Users/diegobanovaz/Projects/direttoo/env/lib/python2.7/site-packages/gunicorn/util.py", line 357, in import_app __import__(module) File "/Users/diegobanovaz/Projects/direttoo/direttoo/wsgi.py", line 36, in <module> application = get_wsgi_application() File "/Users/diegobanovaz/Projects/direttoo/env/lib/python2.7/site-packages/django/core/wsgi.py", line 13, in … -
Double Entry Accounting System, report generation issue. DO we need summation of all journal entries always?
I am working on an accounting solution, where the db has these relevant columns: 1. Account (The chart-of-account column) 2. Journal (This is one row for each journal entry) 3. Journal Line Item (Now, one journal entry can have more than 2 entries, hence this 3rd table, with a FK to 2nd table). This table has an FK to Table 1 as well Now, let's say we need to generate Trail Balance in the month of January (assuming an accounting year is from 1st Apr to 31st Mar). As of now, I'm having to do a complete summation of all the journal entries, account wise to come up with a report. This holds true for all other reports. Is there a better DB design/way to do it? P.S.: One way is to maintain the Account balance as on date in Table 1. However, let's say the user needs the Trial Balance of previous month/quarter? This results in the solution being in soup again. Note: We are using Django, Postgresql. -
Using session key of django session as foreign key
I have used session in django and this resulted in creation of table 'django_session' in mysql.I want to use the session_key of this table as foreign key in other mysql tables..How can i do this?? -
Django bulk update setting each to different values?
Is it possible to update multiple objects with on db call, but setting each selected item to a different value? I know it can be done with the same value my_articles = models.Article.objects.filter(...) for article in my_articles: article.name = 'foo' article.save() # is equivalent to models.Article.objects.filter(...).update(name='foo') But what if I want to do something like this? my_articles = models.Article.objects.filter(...) for article in my_articles: article.name = get_new_name_for_this_one_article(article) article.save() # is equivalent to ??? Im using the mysql backend if that matters at all -
Adding social authentication to site
Django==1.10.5. i have isntalled - pip install python-social-auth==0.2.12. Then addes social.apps.djang_app.default to the INSTALLED_APP settings. After wanted to sync python-social-auth model with Database python projectname\manage.py migrate But i got an error: AppRegistryNotReady:Apps aren't loaded yet -
Permission denied: '/opt/bitnami/.tmp/simplejson-2.0.9-py2.7-linux-x86_64.egg-tmp/simplejson/tmp2Iwkg7
I am trying to upload my django project live...and i am getting this error continously pkg_resources.ExtractionError: Can't extract file(s) to egg cache The following error occurred while trying to extract file(s) to the Python egg cache: [Errno 13] Permission denied: '/opt/bitnami/.tmp/simplejson-2.0.9-py2.7- linux-x86_64.egg-tmp' The Python egg cache directory is currently set to: /opt/bitnami/.tmp Perhaps your account does not have write access to this directory? You can change the cache directory by setting the PYTHON_EGG_CACHE environment variable to point to an accessible directory. -
Django - Grouping with multiple values works on first item
When I want to make a query with multiple fields in "values()" and only one field in "annotate()", the grouping is applied only on the FIRST item on "values()". Here my code: class filterManager(): ''' Gestion global des filtre pour le requeting ''' def __init__(self): self._datas = {} def setFilter(self,key,value): ''' Mise en place d'un champs de filtre ''' self._datas[key] = value return 1 def getItem(self,key): ''' Récupération d'un unique champs du filtre ''' return self._datas[key] def getFilter(self): ''' Récupération du filtre entier ''' return self._datas myFilter = filterManager() myFilter.setFilter("rcad_date__range", ['2017-03-12','2017-03-19']) myFilter.setFilter("rcad_type__in", [0]) myFilter.setFilter("rcad_status__in", [1,2]) for item in reportingCentreonAlarmsDaily.objects\ .values("rcad_date","rcad_type","rcad_status")\ .annotate(total = Sum('rcad_count') )\ .filter(**myFilter.getFilter()): print item It gives : {'rcad_date': datetime.date(2017, 3, 12), 'rcad_status': 1, 'total': 5610, 'rcad_type': 0} {'rcad_date': datetime.date(2017, 3, 13), 'rcad_status': 1, 'total': 6354, 'rcad_type': 0} {'rcad_date': datetime.date(2017, 3, 14), 'rcad_status': 1, 'total': 4774, 'rcad_type': 0} {'rcad_date': datetime.date(2017, 3, 15), 'rcad_status': 1, 'total': 4943, 'rcad_type': 0} {'rcad_date': datetime.date(2017, 3, 16), 'rcad_status': 1, 'total': 4896, 'rcad_type': 0} {'rcad_date': datetime.date(2017, 3, 17), 'rcad_status': 1, 'total': 4759, 'rcad_type': 0} {'rcad_date': datetime.date(2017, 3, 18), 'rcad_status': 1, 'total': 3718, 'rcad_type': 0} {'rcad_date': datetime.date(2017, 3, 19), 'rcad_status': 1, 'total': 3788, 'rcad_type': 0} As you could guess.. it's not OK :( What I … -
Pass custom conext to django model
I'm using django-rest-framework. All models in my app contain User field and I want to write to this field link to current user. How can I pass user object to model? I've tired to write User link in SerializerClass, but I think it's not the best solution. -
Why choice field displays keys instead of values in django queryset?
I have a Choice Field in my models.py models.py STATUS = ( ('closed_issue', 'Closed Issue'), ('open_ssue', 'Open Issue'), ('pending', 'Pending'), ) class Issue(models.Model): name = models.CharField(max_length=45) status = models.CharField(max_length=50, choices=STATUS) views.py def Issues(resuest): issues = Issue.objects.all() template {% for issue in issues %} {{ issue.status }} {% endfor %} output closed_issue open_issue It displays the keys of the choice field instead of values I want the values to be displayed in the template. Is there a way to get the values instead of keys? Thanks for any help. -
How to data fetch by using has many through in django?
I am learning django. I have a simple model named customer. Here is my model: class Year(models.Model): year = models.CharField(max_length=255) created_at = models.DateTimeField(auto_now=False, auto_now_add=True) updated_at = models.DateTimeField(auto_now=True, auto_now_add=False) def __unicode__(self): return self.year def __str__(self): return self.year class Customer(models.Model): name = models.CharField(max_length=255) created_at = models.DateTimeField(auto_now=False, auto_now_add=True) updated_at = models.DateTimeField(auto_now=True, auto_now_add=False) def __unicode__(self): return self.name def __str__(self): return self.name class Product(models.Model): customer_name = models.ForeignKey(Customer, on_delete=models.CASCADE) quantity = models.CharField(max_length=255) year = models.ForeignKey(Year, on_delete=models.CASCADE) created_at = models.DateTimeField(auto_now=False, auto_now_add=True) updated_at = models.DateTimeField(auto_now=True, auto_now_add=False) def __unicode__(self): return self.score def __str__(self): return self.score here is my view of customer: from django.shortcuts import render, get_object_or_404, redirect from .models import Customer, Product, Year # Create your views here. def home(request): customer = Customer.objects.all product = Product.objects.all year = Year.objects.all().prefetch_related('product_set') context = {'customers': customer, 'years': year, 'products': product } return render(request, 'customer.html', context) Here is my customer.html {% extends 'base.html' %} {% block customer %} <div class="container"> <h2>Players Table</h2> <p>Customer with Product</p> <table class="table"> <thead> <tr> <th>Year/Product</th> {% for customer in cutomers %} <th>{{ customer.name }}</th> {% endfor %} </tr> </thead> <tbody> {# <tr>#} {# <th>2011</th>#} {# <th>633</th>#} {# <th>424</th>#} {# </tr>#} {# <tr>#} {# <th>2012</th>#} {# <th>353</th>#} {# <th>746</th>#} {# </tr>#} </tbody> </table> </div> {% endblock customer %} Now … -
hello i wanna mkae populate, it is not working
hello, i am trying to make populate. plz look my code this is my model so in model, i used abstrab style class.. class MyUserManager(BaseUserManager): def create_user(self, email,username,Nationality,Mother_language,Wish_language,Profile_image,status_message,password=None): if not email: raise ValueError('Users must have an email address') if email.startswith("2"): raise ValueError('Users must have an email address') user = self.model( email=self.normalize_email(email), username=username, Profile_image=Profile_image, Nationality=Nationality, Mother_language=Mother_language, Wish_language=Wish_language, status_message=status_message, ) user.set_password(password) user.save(using=self._db) return user def create_superuser(self, email, username,Nationality,Mother_language,Wish_language,password,status_message,Profile_image): user = self.create_user(email, password=password, username=username, Profile_image=Profile_image, Nationality=Nationality, Mother_language=Mother_language, Wish_language=Wish_language, status_message=status_message, ) user.is_admin = True user.save(using=self._db) return user class MyUser(AbstractBaseUser): email = models.EmailField( verbose_name='Email', max_length=255, unique=True,null = False ) username = models.CharField(max_length = 30, null = False) Nationality =models.CharField(max_length = 30,choices= Country_choice,null = False ) Mother_language = models.CharField(max_length = 30,choices= Language_list,null = False) Wish_language =models.CharField(max_length = 30,choices= Language_list,null = False) is_active = models.BooleanField(default=True) is_admin = models.BooleanField(default=False) Profile_image = models.ImageField(upload_to='profile_images',blank=True, default= 'profile_images/deafult-profile-image.png') status_message=models.CharField(max_length = 500,null = True) objects = MyUserManager() USERNAME_FIELD = 'email' REQUIRED_FIELDS = ['username','Nationality','Mother_language','Wish_language','Profile_image','status_message'] this is my popukate seetings in wadproject i think my populate is fine i have no idea of what i ma wrong ... plz help me... import os os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'wadproject.settings') import django django.setup() from LanguageExchange.models import MyUser def populate(): MyUser = [{ "email": "11111@student.gla.ac.uk", "username": "Daivid", "password":"123456789", "Nationalityty": "Albania", "Mother_language": …