Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
Save polygon or line to database django/mapbox
I would like to save the drawn polygon in the code below to the postgis database : Assume that mapbox is set correctly and that the polygon drawing and download works (i haven't put everything in the code to focus on the problem at hand) <script type="text/javascript"> map.addControl(draw); map.on('draw.create', updateArea); map.on('draw.delete', updateArea); map.on('draw.update', updateArea); function updateArea(e) { var data = draw.getAll(); var answer = document.getElementById('calculated-area'); if (data.features.length > 0) { var area = turf.area(data); // restrict to area to 2 decimal points var rounded_area = Math.round(area*100)/100; answer.innerHTML = '<p><strong>' + rounded_area + '</strong></p><p>square meters</p>'; var convertedData = 'text/json;charset=utf-8,' + encodeURIComponent(JSON.stringify(data)); document.getElementById('export').setAttribute('href', 'data:' + convertedData); document.getElementById('export').setAttribute('download','data.geojson'); } else { answer.innerHTML = ''; if (e.type !== 'draw.delete') alert("Use the draw tools to draw a polygon!"); } } -
django + celery: disable prefetch for one worker, Is there a bug?
I have a Django project with celery Due to RAM limitations I can only run two worker processes. I have a mix of 'slow' and 'fast' tasks. Fast tasks shall be executed ASAP. There can be many fast tasks in a short time frame (0.1s - 3s), so ideally both CPUs should handle them. Slow tasks might run for a few minutes but the result can be delayed. Slow tasks occur less often, but it can happen that 2 or 3 are queued up at the same time. My idea was to have one: 1 celery worker W1 with concurrency 1, that handles only fast tasks 1 celery worker W2 with concurrency 1 that can handle fast and slow tasks. celery has by default a task prefetch multiplier ( https://docs.celeryproject.org/en/latest/userguide/configuration.html#worker-prefetch-multiplier ) of 4, which means that 4 fast tasks could be queued behind a slow task and could be delayed by several minutes. Thus I'd like to disable prefetch for worker W2. The doc states: To disable prefetching, set worker_prefetch_multiplier to 1. Changing that setting to 0 will allow the worker to keep consuming as many messages as it wants. However what I observe is, that with a prefetch_multiplier of … -
Change Sort Grouping For Null Values
When using the sorting feature in the Django Rest Framework, you are given the ability to sort by a particular field, ascending and descending. This sorting groups null values first and then alphanumeric values secondly. (and understandably so because None is less than "a") But is there any way that we can reverse this order to where all of our alphanumeric values are sorted and then grouped after that are all of the null values? Currently when sorting, this is the order of the queryset. First Names: None None Abby Ben But the desired behavior is as follows. First Names: Abby Ben None None Note: I'm not sure if the solution would be in DRF, Django, or simply in the Python language itself. Any would do. -
How do I take input as String and save as Binary in Django using Django REST Framework?
Here is my model: class Example(models.Model): file = S3PrivateFileField() text = models.TextField(null=True, blank=True) binary = models.BinaryField(null=True, blank=True) and here is the serializer: class ExampleSerializer(ModelSerializer): class Meta: model = Example fields = ['file', 'text', 'binary'] First of all, in the Browsable API, I can see the file and text fields but not the binary fields. How do I see that field? Secondly, the input data type for the binary field is string and I would like to save it as binary data in the database. How can I get it to work? -
How do I add an external Javascript library to Django?
I would like to add a Javascript library to be used by my template files in Django (which is snap.svg). Where should I include the library in the project structure, and how do I make it usable in my template HTML file? Regards, -
I got the permission error at admin login
i am new at django.. .I try to create superuser in django . i did all step and they show me in terminal as i created superuser successfully. but when i go to server its show permission error . i re install django without cache. but still same problem coming. first they show template not find then i created one file loging.html. but again they show permission error.. this code from admin.py from django.contrib import admin from .models import Destinations admin.site.register(Destinations) PermissionError: [Errno 13] Permission denied: 'C:\Users\abc\projects\amar\templates\admin\login.html' -
Django + postgreSQL set up
This is my first time deploying a django project. I am following this (https://jee-appy.blogspot.com/2017/01/deply-django-with-nginx.html) as an outline. Everything is good up section 5. where I configure the database. This is what I have currently. DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'django_db', 'USER': 'db_user', 'PASSWORD': '******', 'HOST': 'localhost', 'PORT': '', } } But this is an existing project and I also have the below in my settings.py and I think they are conflicting since I am not seeing any content populating in my project. What am I doing wrong? STATIC_URL = '/static/' MEDIA_ROOT = os.path.join(BASE_DIR, 'media') MEDIA_URL = '/media/' CRISPY_TEMPLATE_PACK = 'bootstrap4' LOGIN_REDIRECT_URL = 'login' LOGIN_REDIRECT_URL = 'music:index' LOGIN_URL = 'login' -
I am having problem in setting primary key for a list view
I am getting the error:- Reverse for 'grievant_complaint_list' with keyword arguments '{'pk': ''}' not found. 1 pattern(s) tried: ['grievant_complaint_list/(?P[0-9]+)/$'] I am trying to provide a list of complaints posted by a particular user, based on the user logged in but having a problem in providing the primarykey views.py @method_decorator([login_required, grievant_required], name='dispatch') class GrievantComplaintListView(ListView): login_url = '/login/' model = Complaint def get_queryset(self): grievant = Grievant.objects.get(student=self.request.user) return Complaint.objects.filter(grievant=grievant) @method_decorator([login_required, grievant_required], name='dispatch') class CreateComplaintView(CreateView): login_url = '/login/' redirect_field_name = 'complaint_detail.html' form_class = ComplaintForm model = Complaint def set_grievant(self): form.save(commit=False) person = Grievant.objects.get(Registeration=self.request.user) Complaint.grievant = person form.save() class ComplaintDetailView(LoginRequiredMixin,DetailView): login_url = '/login/' model = Complaint models.py class Grievant(models.Model): student = models.OneToOneField(User,on_delete=models.CASCADE,primary_key=True) Registeration = models.IntegerField(default=0000) Room = models.CharField(max_length=50) Hostel = models.CharField(max_length=100) def __str__(self): return self.Registeration` class Complaint(models.Model): grievant = models.ForeignKey('grievance_app.Grievant',on_delete=models.CASCADE,related_name='complaintee',primary_key=True) department = models.ForeignKey('grievance_app.Department',on_delete=models.CASCADE) text = models.TextField() heading = models.CharField(max_length=200,blank=False,null=False,default='Problem') media = models.ImageField(upload_to='media') created_date = models.DateTimeField(default=timezone.now()) status_choices = [('D','Done'),('P','Pending'),('N','Not Accepted')] status = models.CharField(choices=status_choices,max_length=1,default='N') class Meta(): verbose_name_plural = 'Complaints' def change_status(self,choice): self.status = choice self.save() def __str__(self): return self.heading def get_absolute_url(self): return reverse("complaint_detail",kwargs={'pk':self.pk}) forms.py class ComplaintForm(forms.ModelForm): class Meta(): model = Complaint fields = ('department','heading','text','media') urls.py path('student_view/',views.StudentView.as_view(),name='student_view'), path('grievant_complaint_list/<int:pk>/',views.GrievantComplaintListView.as_view(),name='grievant_complaint_list'), path('complaint/new/',views.CreateComplaintView.as_view(),name='create_complaint'), path('complaint_detail/<int:pk>/',views.ComplaintDetailView.as_view(),name='complaint_detail') student_view.html {% extends 'base.html' %} {% block title %} StudentView {% endblock %} {% block body_block %} <h1>You … -
Django, form not rendering in the template
Form not rendering in template. There is NO model for this view, and i know that, this is a quick tool to hash a serial number. As a result, I am using form.Forms, not ModelForms. So instead of going through the rigmerole of creating a form from scratch, and as I'm adding this to my current site, using a form made sense, but I can't get it to render, it's real simple with two fields and a submit button. For some reason the form fields are not displaying, but the submit button is. Form class VoiceSearchForm(forms.Form): hw_number = forms.CharField(max_length=6) ca_serial = forms.CharField(max_length=16) view def voice_search_view(request): form = VoiceSearchForm(request.POST) if request.method == 'POST': form = VoiceSearchForm() if form.is_valid(): hw_number = form.cleaned_data['hw_number'] ca_serial = form.cleaned_data['ca_serial'] # Do stuff with the data collected. return render(request, 'voice_search.html', {}) template <!DOCTYPE html> <html lang="en" dir="ltr"> <head> <meta charset="utf-8"> <title>Voice Search</title> </head> <body> <h1>Hashing tool</h1> <form action="." class="voice_search"method="POST"> {{ form.as_p }} {% csrf_token %} <input type="submit" class="btn" value="Submit"> </form> </body> </html> I have followed the docs to get this far, but I must have copied something wrong and can't find anything on google for this, so I suspect on this incredibly rare occasion, this is the … -
Which orm for a python application
I have a python cli application that runs periodically and collects data from api. Data should be stored on database, then processed and results stored again on database. In a furhter step, data will be used to provide web-api (consumed by webpage or mobile app). To make web-api, I think I use Django. To make cli, I think to don't use any fullstack framework, but I need just an orm framework. I search about python orm, and I found two possible solutions, django-orm and sqlalchemy. Based on my research, I read that django-orm is not the best solution for complex query and scenario. So I'm thinking the sqlalchemy could be the best approach. Usually I'm developing with c# and I use repository pattern. Sqlalchemy provides Session (that for my understood is a similar approach). Could be Sqlalchemy the best choice? If yes, I have to use sqlalchemy core and orm? What can I use for web-api? Is it possible to use easly sqlalchemy with django? Please may you help me to clarify the right approach about which orm is better to use? Thanks a lot Cheers -
How do i initialize a django admin entity form
I am trying to make a meetingnote application where some points of the previous note are re-used in the current note. I am using the admin module of django to fill in the new note and i want the points of the previous note to be the standard value of the fields of the new note. They need to be retrieved from the database. The question is: how do i do this? This is what i've tried so far: class ActionListPointInline(admin.TabularInline): model = ActionListPoint extra = 1 def get_changeform_initial_data(self, request): return {'what' : 'test'} I tried using the get_changeform_initial_data to set the ' what' field to the value 'test' when opening a new add form, but it doesn't work. Can anyone tell me how i can achieve what i want? Thank you -
Django Unit tests fail over domain socket
I have Django configured to use the database with peer authentication over the local Unix Domain socket, instead of user/password authentication. Here's the settings.DATABASES: {'default': {'ENGINE': 'django.db.backends.postgresql', 'NAME': 'mcps', 'PORT': 5433, 'TEST': {'ENGINE': 'django.db.backends.postgresql', 'NAME': 'mytestdb', 'PORT': 5433, 'USER': 'mcp'}, 'USER': 'mcp'} } The port is correctly configured, the application itself has no problem working correctly. Yet, when I try to run pytest, with the environment variable DJANGO_SETTINGS_MODULE set to the above settings, a database is created - with the correct owner 'mcp' - but before tables are created I get an error: django.db.utils.OperationalError: FATAL: Peer authentication failed for user "mcp" What are unit tests doing differently anmd how can I fix this please? -
Multistep file validation, using dropzone and django (with ajax call?)
I have a Django site where I am using dropzone.js. What I am trying to do is pass the filename to a python function to validate it, and send back the responses to the browser to be displayed to the user. When Attempting to use an ajax call within a function that happens on dropzone addedFile event (within the dropzone init function, I get an error saying SCRIPT438: Object doesn't support property or method 'ajax'. Am I going about doing this wrong? does anybody have any tips on other ways to accomplish filename validations before uploading? $.ajax({ url: '/validateFile/', type: 'POST', data: filename, dataType: 'text', success: function(data, status, xhr) { console.log(data) }, error: function(xhr, status, err) { console.log(err) } }) Any help would be greatly appreciated! -
How do I pass an object image linked by foreign-key into a template?
I'm having trouble getting urls for the images attached to Car model objects in my Django project. The goal is to fetch a single image from the uploaded set (perhaps by a pk, or the first one to be uploaded) to use as a thumbnail in the list view. I've uploaded the images through the admin, but I can't fetch a single one from the template. I've tried using the <img src="{{ car.image.url }}"> (which is what worked when my image field was part of the Car model). When looking at this in the rendered template, it's just the alt-text. Looking through developer tools shows src(unknown) models.py class Car(models.Model): manufacturer = models.ForeignKey('Manufacturer', on_delete=models.SET_NULL, null=True) car_model = models.CharField('Model', max_length=50, null=True) description = models.TextField(max_length=4000) vin = models.CharField('VIN', max_length=17, help_text='Enter the 17 character VIN number.', blank=True, null=True) mileage = models.IntegerField(verbose_name='Mileage') date_added = models.DateTimeField(auto_now_add=True) engine_displacement = models.CharField(default=2.0, max_length=3, help_text="Engine displacement in Liters (E.g. 2.0, 4.2, 6.3)") price = models.IntegerField(default=0) seller = models.ForeignKey(User, on_delete=models.SET_NULL, null=True, blank=True) id = models.UUIDField(primary_key=True, default=uuid.uuid4, help_text="Unique ID for this car") ... class Image(models.Model): car = models.ForeignKey(Car, on_delete=models.SET_NULL, null=True) image = models.ImageField(upload_to=image_directory_path) Template render {% for car in most_recently_uploaded %} <div class="col-xs-3 product-item" style="width:400px"> <figure class="figure"></figure> <a href="{{ car.get_absolute_url }}"><img src="{{ … -
How to select only questions not yet answered by a user in Django
I am creating a quiz and would like to appear to the user only questions that were not answered by the user. How do I do that? models.py class Questao(models.Model): idQuestao = models.CharField(max_length=7,primary_key=True,null=False,verbose_name="ID da questão") class Resposta(models.Model): idQuestao = models.ForeignKey(Questao,on_delete=models.CASCADE,verbose_name="ID da questão") usuario = models.ForeignKey(User,on_delete=models.CASCADE,verbose_name="Usuário") views.py questao=Questao.objects.filter(tipoQuestao=1,resposta__usuario=request.user).exclude(idQuestao=Resposta.objects.filter()).order_by("?").first() -
How/ what is wrong in my first view Django
please, tell me what is wrong in my first view Django because not working https://github.com/Fgregorio1/ftgtraderexample.git -
Relate Foreign Key id fields without Migrations
I'm currently trying to figure out how to relate two id fields of two different models from an existing database without migration scripts. I've pored over many, many different solutions; models.ForeignKey fields, models.ManyToOneRel fields, hyperlinked fields in the serializer, PrimaryKeyRelatedField in the serializer, every one seems to match a model to another model or another session and not match between two specific id fields in two different models. This is the code I'm currently working with; its using rsinger86 drf-flex-fields to allow designed expandable fields. class Cats(models.Model): id = models.UUIDField(primary_key=True, default=uuid.uuid3, editable=False) hatId = models.UUIDField(primary_key=False, default=uuid.uuid3, editable=False) name = models.TextField() class Hats(models.Model): id = models.UUIDField(primary_key=True, default=uuid.uuid3, editable=False) name = models.TextField() class CatsSerializer(FlexFieldsModelSerializer): hat = serializers.PrimaryKeyRelatedField(read_only=True) class Meta: model = Cats fields = [ 'id', 'hatId', 'name' ] expandable_fields = { 'hat': (HatsSerializer, {'source': 'hat', 'fields': ['name']}) } class HatsSerializer(FlexFieldsModelSerializer): class Meta: model = Hats fields = [ 'id', 'name' ] My hope is that I can eventually query a cat and use the expandable fields expand param to include that cats corresponding hat in the response.s -
Is there a way to list a model inside another in Django admin?
Having these models: class Country(models.Model): name = models.CharField(max_length=200) class Company(models.Model): country = models.ForeignKey(Country, on_delete=models.CASCADE) name = models.CharField(max_length=200) class Category(models.Model): company = models.ForeignKey(Company, on_delete=models.CASCADE) name = models.CharField(max_length=200) How to list the companies inside country and add/edit in another page? And the same with Company and Category. -
Concurrency management in django?
not knowing the competition in databases someone told me to be careful not to have a corrupted database I searched a little bit everywhere for information about competition in Django, but I didn't find a favorable answer. Should I be careful about competition when updating the database with a celery task? I have a person who is connected to two different places and uses the same view in Django to change his first name, for example, there is a risk of crashing the database? What are the best ways to manage competition in Django? What should we be aware of? Do you have any documentation a little more precise for in which case we should use it? I take the example I have a task that updates a data in a user's row it contains his first name and a number of users, the user changes his name and the task changes his name or simply the view of Django, now I have an appendix task that will update the number of users that has it. The tasks will it queue up in the database or they'll try to modify the line at the same time. Thank you in advance -
How to reduce the amount of code written when all 'meta' for each view is the same (structure)?
Recently I started refacturing/rewriting my code. I noticed that some parts of my code show alot of similarity, and I'm wondering if I could reduce the amount of code required to get the same functionality. I would like to generate views based on model names I have and give them the same meta attributes where the only difference is the model naming. Currently I have: from finfor import (models, serializers) class clientOrganizationsListCreate(generics.ListCreateAPIView): class meta: queryset = models.clientOrganizations.objects.all() serializer = serializers.clientOrganizationsSerializer class financialSystemsListCreate(generics.ListCreateAPIView): class meta: queryset = models.financialSystems.objects.all() serializer = serializers.financialSystemsSerializer As you can see, the only difference between the two is clientOrganizations <> financialSystems. I have tried the following: from finfor import (models, serializers) from django.apps import apps for model in apps.get_app_config('finfor').models.values(): class f'{model}ListCreate'(generics.ListCreateAPIView): queryset = model.objects.all() serializer_class = serializers[f'{model}Serializer'] and: from finfor import (models, serializers) from django.apps import apps for model in apps.get_app_config('finfor').models.values(): type(f'{model}Serializer', (generics.ListCreateAPIView, ), type('meta', (object, ), { 'queryset': model.objects.all(), 'serializer_class': serializers[f'{model}Serializer'] }) ) I think I'm not using type() properly. Is there a way to generate the classes by iterating a list ['financialSystems', 'clientOrganizations'] or something similiar? -
Use a JWT token auth mechanism from restframework-jwt to access django-admin
i have the following setup: I have Django and vueJS app in a frontend. When user logs in a frontend he gets a jwt and next requests have token in a headers and everything is fine here. But when I point to app which has an admin interface /admin/filer/ It appears that I'm not logined, and i need to login using default login mechanism. Here is my config Even if i send request with signed with jwt - still not works REST_FRAMEWORK = { 'DEFAULT_AUTHENTICATION_CLASSES': [ 'rest_framework_jwt.authentication.JSONWebTokenAuthentication', # 'rest_framework.authentication.SessionAuthentication', ], 'DEFAULT_PERMISSION_CLASSES': [ 'rest_framework.permissions.IsAuthenticatedOrReadOnly', ], 'DEFAULT_FILTER_BACKENDS': [ 'django_filters.rest_framework.DjangoFilterBackend' ], 'ORDERING_PARAM': 'sort', } MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'reversion.middleware.RevisionMiddleware', ] JWT_AUTH = { 'JWT_EXPIRATION_DELTA': timedelta(days=7), 'JWT_VERIFY_EXPIRATION':False, 'JWT_REFRESH_EXPIRATION_DELTA': timedelta(days=7), 'JWT_RESPONSE_PAYLOAD_HANDLER': 'apps.auth_module.utils.jwt_response_payload_handler', } -
How to raise error in django model's save instance before storing in database?
I have registered this model into my admin site. What I want to do is that before pressing the save button, I want to validate the email and phone numbers via the 2 validation functions which uses PyPI packages. However, when I enter a invalid email that is non-existent, and then save, the data is still saved in the database. I want to be able to raise an error such that the user will know that he/she entered invalid fields. This is an image of how I am adding data currently: adding data on admin site Here is my code: /* models.py */ import re import phonenumbers from django.db import models from phonenumbers import carrier from validate_email import validate_email from django.core.exceptions import ValidationError class Please(models.Model): emailplus = models.EmailField() country = models.CharField(max_length=2) phone_number = models.CharField(max_length=100) def clean_email(self): email = self.cleaned_data.get("emailplus") if not validate_email(email, check_mx=True, verify=True): raise ValidationError("Invalid email") return email def clean_phone_number(self): phone_number = self.cleaned_data.get("phone_number") clean_number = re.sub("[^0-9&^+]", "", phone_number) alpha_2 = self.cleaned_data.get("country") z = phonenumbers.parse(clean_number, "%s" % (alpha_2)) if len(clean_number) > 15 or len(clean_number) < 3: raise ValidationError( "Number cannot be more than 15 or less than 3") if not phonenumbers.is_valid_number(z): raise ValidationError( "Number not correct format or non-existent") if … -
How can I paginate sql query result in html page?
I need to paginate sql query results from my database in html page. views.py: def test(request): db = MySQLdb.connect(host="localhost", # your host, usually localhost user="pc", # your username passwd="12345678", # your password db="mc") cur = db.cursor() cur.execute('''SELECT * FROM hello left join hell on hello.Id=hell.Id ''') row = cur.fetchone() name = row[1] sur = row[2] id = row[0] context = {"name": name, "sur": sur, "id": id} return render(request, 'test.html', context) test.html: <div class="row"> <div class="col-md-3"> <span style="color:white;font-size:14px">{{ name }}</span> </div> <div class="col-md-3"> <span style="color:white;font-size:14px">{{ sur }}</span> </div> <div class="col-md-3"> <span style="color:white;font-size:14px">{{ id }}</span> </div> <div class="col-md-3"> <span style="color:white;font-size:14px">{{ name }}</span> </div> </div> Per now yes, it just prints out first values from sql query, I'm working on looping through result. I stucked in pagination of this. Because results will be more than 1000 and it's good to display 50 per page. -
How to import a model in a script?
I am new to Django, and I'm trying to import one of my models in a script as we do it in views.py. I'm getting an error: Traceback (most recent call last): File "CallCenter\make_call.py", line 3, in from .models import Campaign ModuleNotFoundError: No module named 'main.models'; 'main' is not a package My file structure is like: MyApp\CallCenter\ CallCenter contains init.py, make_call.py, models.py, views.py and MyApp has manage.py from twilio.rest import Client from twilio.twiml.voice_response import VoiceResponse, Say, Dial, Number, VoiceResponse from .models import Campaign def create_xml(): # Creates XML response = VoiceResponse() campaign = Campaign.objects.get(pk=1) response.say(campaign.campaign_text) return response xml = create_xml() print(xml) -
Deploying a Mezzanine site on DigitalOcean with Fabric - Deploy_tool error
Very relevant question to this one, which sadly has no answers: Deploying mezzanine site on DigitalOcean with Fabric [1xx.xx.xxx.xxx] out: Using base prefix '/usr' [1xx.xx.xxx.xxx] out: New python executable in /home/adm1/.virtualenvs/project/bin/python3 [1xx.xx.xxx.xxx] out: Also creating executable in /home/adm1/.virtualenvs/project/bin/python [1xx.xx.xxx.xxx] out: Installing setuptools, pip, wheel... [1xx.xx.xxx.xxx] out: done. [1xx.xx.xxx.xxx] out: [1xx.xx.xxx.xxx] rsync_project: rsync --exclude "*.pyc" --exclude "*.pyo" --exclude "*.db" --exclude ".DS_Store" --exclude ".coverage" --exclude "local_settings.py" --exclude "/static" --exclude "/.git" --exclude "/.hg" -pthrvz --rsh='ssh -p 22 ' C:\Users\User\Desktop\blog\project\ adm1@1xx.xx.xxx.xxx:/home/adm1/mezzanine/project [localhost] local: rsync --exclude "*.pyc" --exclude "*.pyo" --exclude "*.db" --exclude ".DS_Store" --exclude ".coverage" --exclude "local_settings.py" --exclude "/static" --exclude "/.git" --exclude "/.hg" -pthrvz --rsh='ssh -p 22 ' C:\Users\User\Desktop\blog\project\ adm1@1xx.xx.xx.xxx:/home/adm1/mezzanine/project rsync is not recognized as an internal or external command, executable program or batch file. Fatal error: local() encountered an error (return code 1) while executing 'rsync --exclude "*.pyc" --exclude "*.pyo" --exclude "*.db" --exclude ".DS_Store" --exclude ".coverage" --exclude "local_settings.py" --exclude "/static" --exclude "/.git" --exclude "/.hg" -pthrvz --rsh='ssh -p 22 ' C:\Users\User\Desktop\blog\project\ adm1@1xx.xx.xxx.xxx:/home/adm1/mezzanine/project' Aborting. Disconnecting from 1xx.xx.xxx.xxx... done. This is the above error I get after running "fab create". There seems to be an issue with rsync, and sadly I can't find any information on how to set up Git as the Deploy_tool. All other steps …