Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
Token login Authentication Django REST
I want to be able to login a user using Token Authentication. For some reason my code is not working. I appreciate your help. Here is my code: Serializers.py: #Login class UserLoginSerializer(serializers.ModelSerializer): password = serializers.CharField(style= {'input_type':'password'}, label= ("Password")) def validate(self, attrs): email = attrs.get("email") password = attrs.get("password") if(email and password): user = authenticate(request= self.context.get("request") ,email= email, password= password) if(not user): raise serializers.ValidationError("Unable To Login With Provided Credentials!", code= "Authorization") else: raise serializers.ValidationError("Email and/or Password Fields are Invalid!", code= "Authorization") attrs["user"] = user return attrs class Meta: model = UserModel fields= ('email', 'password',) views.py class UserLoginView(ObtainAuthToken): parser_classes = [JSONParser, MultiPartParser, FormParser,] serializer_class = UserLoginSerializer def post(self, request): serializer = UserLoginSerializer(data= request.data) if(serializer.is_valid()): user = serializer.validated_data['user'] token, created = Token.objects.get_or_create(user= user) content = {"token": token.key,} return Response(content) return Response(serializer.errors, status= status.HTTP_400_BAD_REQUEST) Thanks. -
How to add my own python code in django in views.py index function
I have a code of python in different files: st.py and mydefinations.py, yahoo.py. And These codes are working fine but whenever I integrate this code in django. It shows my error. This is my code of views.py in django. def index(request): latest_stocks_list = Stock.objects.all() template = loader.get_template('stocks/index.html') context = { 'latest_stocks_list': latest_stocks_list, } return HttpResponse(template.render(context, request)) And i want to add following code in the index function from mydefinations import * from yahoo import * headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.0; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0'} tickerslist = ["AAPL"] prntvar = {'prntnum': 0} mydef = mydefinations() for ticker in tickerslist: try: testdic = {'Var1': 0, 'Var2': 0} Ticker_stats = {} Ticker_summary = {} yahoo = my_yahoo(headers, ticker) Ticker_stats = yahoo.yahoo_stats() print(Ticker_stats) except Exception as e: pass Wen I add code in the index and import line in the start and error shows that mydefinations module is not found What should i do. -
Video play on hover in django template
I am displaying the list of videos in Django template by iterating the queryset object. I want to play a specific video on mouse enter. Django Template: {% for video in videos %} <div class="card bg-light pl-3" style="width:310px;height:300px;border:none"> <a href="{% url 'core:videoview' video.id %}"><video class="videocard" src="{{video.video_file.url}}" poster="{{video.thumbnail.url}}" alt="not found" style="height:185px" preload></a> <div class="card-body"> <div class="row" style=""> <div class="fst pt-2 pl-3"> <img src="{{video.video_owner.channel_owner.profile_pic.url}}" class="rounded-circle" style="height:45px" alt=""> </div> <div class="sec pt-2 pl-3"> <tr> <p class="font-weight-bold""><a href="{% url 'core:videoview' video.id %}" style="text-decoration:none;color:black">{{video.video_title|truncatechars:"25"}}</a> <br> <a href="#" style="text-decoration:none;color:black"><span class="font-weight-normal">{{video.video_owner}}</span></a> </p> </tr> </div> </div> </div> </div> {% endfor %} JavaScript: $(".videocard").on('mousenter', function(){ $('.videocard').get(0).play(); $('.videocard').get(0).currentTime = 0; }); $(".videocard").on('mouseout', function(){ $('.videocard').get(0).pause(); $('.videocard').get(0).currentTime = 0; }); but due to get(0), its only working for the first video in the video list. How to make it work for every displayed video? -
Restrict access to a function based view depending on a django variable
I have a Django variable which becomes true after a few conditions. I don't want the user to access the page if the variable is true. The page is a function based view: def complete(request): return render(request, 'users/complete.html') The variable is : complete_task = forms.BooleanField() Is it possible to do this with a function based view just like a custom mixin? -
Django 3.1: Access objects in template of ModelChoiceField
Using Django 3.1 and I'm struggling with a basic tasks. I've got a form with a field like this: forms.ModelChoiceField(queryset=StorageSpace.objects.filter(visible=True), widget=forms.RadioSelect) I would like to do this in my view: {% for space in form.available_spaces %} <input value="{{ space.id }}" data-storage-price={{ space.price }}>{{ space.title }} {% endfor %} But this doesn't work. How can I access the attributes of my objects for each choice? Can't be that difficult, can it? I really need to set the data attribute, otherwise I would just use{{space}}. -
error : Fix your URL conf, or set the `.lookup_field` attribute on the view correctly
I defined this class in views.py: class EditOrderStudents(generics.RetrieveUpdateDestroyAPIView): #permission_classes = (permissions.AllowAny,) authentication_classes = (TokenAuthentication , ) serializer_class =newOrdersStudentSerializidGet def get_queryset(self): id = self.request.query_params.get('id') queryset = newOrdersStudent.objects.filter(Groupid=(id)) return queryset and I use the RetrieveUpdateDestroyAPIView generic to put , delete and get methode but I got this error and I dont know what is the problem? AssertionError: Expected view EditOrderStudents to be called with a URL keyword argument named "pk". Fix your URL conf, or set the `.lookup_field` attribute on the view correctly. -
Django Elastic Beanstalk Cron job
I am trying to create a simple cron to send email. I searched and tried different answers but none of them seem to be working. This is my django.config It is one of the answer i found on net. container_commands: 01_migrate: command: "source /opt/python/run/venv/bin/activate && python manage.py migrate --noinput" leader_only: true 02_cronjb: command: "cat .ebextensions/cronjobs.cron > /etc/cron.d/djangocrons && chmod 644 /etc/cron.d/djangocrons" leader_only: true 03_createsu: command: "source /opt/python/run/venv/bin/activate && python manage.py createsu" leader_only: true 04_collectstatic: command: "source /opt/python/run/venv/bin/activate && python manage.py collectstatic --noinput" option_settings: aws:elasticbeanstalk:application:environment: DJANGO_SETTINGS_MODULE: github.settings PYTHONPATH: $PYTHONPATH aws:elasticbeanstalk:container:python: WSGIPath: github.wsgi:application aws:elasticbeanstalk:container:python:staticfiles: /static/: www/static/ packages: yum: postgresql95-devel: [] This is cronjobs.cron * * * * * root source /opt/python/run/venv/bin/activate && /opt/python/run/venv/bin/python /opt/python/current/github/manage.py cronjb >> /var/log/cronjobs.log This is my cronjb.py from django.core.management.base import BaseCommand from django.core.mail import send_mail class Command(BaseCommand): def handle(self, *args, **options): subject = 'Hello' message = 'World' email_from = "abc@gmail.come" recipient_list = ['abc@gmail.com'] send_mail(subject, message, email_from, recipient_list) It all gets deployed without any error but the i am not receiving any emails. Is there something wrong? -
How connect polymer 3 application front-end to Django back-end build with djangorestframework?
I have a polymer 3 application folder and a django app folder. I can run the front-end polymer app on it's the root folder like this:- polymer serve And the back-end Django app providing the rest service like this:- python manage.py runserver These are two in separate folders but I want to connect these two so that in the front-end polymer Js app I can access the Django app API rest service and populate all the relevant data in the front-end. Note I want to deploy the app to heroku too. How do I go about this to make them work as a single app? -
Django Model - Modeling on Django ORM (Postgres-12 Database View)
I'm having a hard time figuring out how to model Postgres database view (I'm using Postgres 12) to Django ORM (Django 3.1 and Python 3.8.5). I tried this answered here in stackoverflow but still I got the same error. To visualized my database schema Database Objects Tables: |_items |_uom |_location | Views: |_vItems the vItems contains the SQL command joining the three tables items, uom, location, when running the SQL command below to the pgAdmin 4. I can fetch all the items data without getting any errors. SELECT * FROM vItems Here is my Django models.py code: class Items(models.Model): id = models.AutoField(primary_key = True) item_code = models.CharField(max_length = 100) sku = models.CharField(max_length = 100) name = models.CharField(max_length = 100) description = models.CharField(max_length = 100) uom_id = models.IntegerField() location_id = models.IntegerField() created_date= models.DateTimeField(default=timezone.now) created_by = models.IntegerField() updated_date= models.DateTimeField(auto_now = True) updated_by = models.IntegerField() class Meta: db_table = "items" def __str__(self): return self.name def get_absolute_url(self): return reverse('item_detail', kwargs = {'pk': self.id}) class UOM(models.Model): id = models.AutoField(primary_key = True) uom = models.CharField(max_length = 50) created_date= models.DateTimeField(default=timezone.now) created_by = models.IntegerField() updated_date= models.DateTimeField(auto_now = True) updated_by = models.IntegerField() class Meta: db_table = "uom" def __str__(self): return self.uom class Location(models.Model): id = models.AutoField(primary_key = True) location … -
Django templates' for loop simply does not show html code
I am trying to create a page that shows all the winnings the user has. The URL is running a function that renders a template. In the template there's a FOR loop that has an empty condition. The HTML doesn't show the empty condition nor the FOR loop itself... Check out the image at the end. Here are the models used: class CreateListing(models.Model): owner = models.CharField(max_length=64) title = models.CharField(max_length=64) description = models.CharField(max_length=64) category = models.CharField(max_length=64) price = models.CharField(max_length=64) link = models.CharField(max_length=64, blank=True, null=True, default=None) time = models.CharField(max_length=64) class Watchlist(models.Model): user = models.CharField(max_length=64) listingid = models.IntegerField() class Closedbid(models.Model): owner = models.CharField(max_length=64) winner = models.CharField(max_length=64) listingid = models.IntegerField() winprice = models.IntegerField() The URL: from django.urls import path from . import views urlpatterns = [ path("mywinnings/<str:username>", views.mywinnings, name="mywinnings") ] My function: def mywinnings(request, username): if request.user.username: items = [] wonitems = Closedbid.objects.filter(winner=username).all() for w in wonitems: items.append(CreateListing.objects.filter(id=w.listingid).all()) try: w = Watchlist.objects.filter(user=request.user.username) wcount = len(w) except: wcount = None return render(request, 'auctions/mywinnings.html', { "items": items, "wcount": wcount, "wonitems": wonitems }) else: return HttpResponseRedirect(reverse('index')) My HTML template: {% extends "auctions/layout.html" %} {% block body %} <div class="container"> <h2>Your Winnings</h2> </div> <div class="container" id="listings"> {% for item in items %} {% for i in item %} … -
Django Local module import is not working
I have the following directory structure: . ├── LMS │ ├── __init__.py │ ├── __pycache__ │ ├── asgi.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py ├── VENV │ ├── bin │ ├── include │ ├── lib │ └── pyvenv.cfg ├── assets │ ├── css │ ├── images │ └── js ├── courses │ ├── __init__.py │ ├── __pycache__ │ ├── admin.py │ ├── apps.py │ ├── fields.py │ ├── fixtures │ ├── forms.py │ ├── migrations │ ├── models.py │ ├── templates │ ├── templatetags │ ├── tests.py │ ├── urls.py │ └── views.py ├── db.sqlite3 ├── manage.py ├── media │ ├── course_images │ ├── files │ └── images ├── templates │ └── base.html └── users ├── __init__.py ├── __pycache__ ├── admin.py ├── apps.py ├── forms.py ├── migrations ├── models.py ├── templates ├── tests.py ├── urls.py └── views.py Now I'm trying to import courses.models.Course in my users.models in the following way: from courses.models import Course but its giving an error as: from courses.models import Course ImportError: cannot import name 'Course' from 'courses.models' (/Users/abdul/PycharmProjects/LMS/courses/models.py) -
Passing a form into django's detail view
Im new to django and im trying to pass a form into detail view(which ive done)but i get an error on submitting the form Here's the code below class student_listview(DetailView): model = Post template_name='promise/detail.html' def get_context_data(self, *args, **kwargs): form = Comment_form stud_list = Categories.objects.all() context = super(student_listview, self).get_context_data(*args, **kwargs) context["stud_list"] = stud_list context["form"] = form return context It gives a page does not exist error when i try to submit the form -
How to change the id of any tag wiht javascript?
Html Code:- {% for post in posts %} <article class="media content-section"> <div class="media-body"> <h2><a id="post_title" class="article-title" href="{% url 'post-detail' post.slug %}">{{ post.title }}</a></h2> <div class="article-metadata"> <a class="mr-2" href="{% url 'blog-profile' name=post.author %}">{{ post.author }}</a> <div class="float-right"> <small class="text-muted">Category</small> <small class="text-muted">{{ post.date_posted }}</small> </div> <div style="float:right;"> <img style="height:19px; width:18px;" src="{% static "blog/viewicon.png" %}"> <p style="float: right; display: inline !important;" id="ViewCount"> </p> </img> </div> </div> <p class="article-content">{{ post.content|truncatechars:200|safe }}</p> </div> <script> function changeid () { var e = document.getElementById('post_title'); e.id = 'post_title_1'; var e = document.getElementById('ViewCount'); e.id = 'ViewCount_1'; } </script> </article> {% endfor %} I am trying to change the id of those two tags but, this script doesn't seem to work, or it's been not exected. I want to change that id because I want to insert some data to them from the server. Since we can't have the same id the data which I am trying to embed is embedded by defaut to only the first run of the loop. -
Django Faker, populating a users model
Using this link as a reference(https://medium.com/@sharma.ashish.1996/populating-database-with-faker-library-794ec0976a99) and an online django course, I made a population script to create fake users for the website on django 1.11. It generally works just that the first and last names are exactly the same (e.g. Sprinkle Sprinkle) and it only populates one user at a time, is there something wrong with the populating script? Thanks! Best regards import os os.environ.setdefault('DJANGO_SETTINGS_MODULE','ProTwo.settings') import django django.setup() from AppTwo.models import User from faker import Faker fakegen= Faker() def populate(N=5): for entry in range(N): fake_name= fakegen.name().split() fake_first_name = fake_name[0] fake_last_name = fake_name[1] fake_email= fakegen.email() #new entry user = User.objects.get_or_create(first_name = fake_last_name,last_name= fake_last_name,email = fake_email)[0] if __name__ == '__main__': print('populating databases') populate(20) print('populated') -
How serializers and reponse data pls Django-rest
I am doing a small project in Django with the rest framework and I reached a point where I don't really know how to continue. In the application, my order model like this class Order(models.Model): drink = models.TextField(blank=True, null=True) total = models.IntegerField(null=True, blank=True) ordered_at = models.DateField(default=timezone.now) i want custom reponse like this . I think will use distinct(), and group_by but i don't how do it apply to serializer . If i use views.APIViews i think i can do it . But i want use serializer and use pagination of django for that api . [ { "id": 1, "ordered_at": "2020-09-19", "orders": [ { "id": 64, "drink": "", "total": 200000, "ordered_at": "2020-09-19" }, { "id": 65, "drink": "", "total": 200000, "ordered_at": "2020-09-19" } ] }, { "id": 2, "ordered_at": "2020-09-18", "orders": [ { "id": 63, "drink": "", "total": 200000, "ordered_at": "2020-09-18" } ] } ] -
Update model object using modelformset_factory in a CBV
I am running into a problem when trying to update an object using the CBV (class based view) - UpdateView. I am aiming to use this single CBV (AssetDetail) to both display and update a given, pre-existing model object (Asset) - in a form. Currently - Assets are collected from the DB and laid out on a table. Each Asset item in the table has a Details button which opens a modal window on the same page. In this modal page is the model form in question - where it displays the Name/Price/etc. of the clicked Asset.The form is accompanied with a basic submit button that I was hoping would POST any update made to these fields back to the CBV for validation and save. However - Im hitting an ManagementForm data is missing or has been tampered with error when this update button is clicked. forms.py class AddAssetForm(forms.ModelForm): class Meta: model = Asset fields = ['user','name', 'slug', 'price'] widgets = { 'user': forms.Select(attrs={'id':'add_asset_user', 'class': 'form-control', 'required':'true', 'hidden':'true', }), 'name': forms.TextInput(attrs= {'class': 'form-control ', 'placeholder':' Asset name', 'data-toggle': 'tooltip', 'title': 'The main name of your asset', 'oninput':"add_asset_input_name(event)", 'required':'true'}), 'slug':forms.TextInput(attrs= {'class': 'form-control', 'id':'add_asset_slug', 'data-toggle': 'tooltip', 'title': 'This will auto-fill based on … -
How come I'm getting a CSS loading error in Django with just a minor difference in path name?
Just to give a brief background on the issue, I set up a simple ticketing system. Version I used for Django is 3.0.7, whereas Python is 3.7. I used both bootstrap as my header and crispy forms to design the forms. I placed the static configuration within my settings.py to make sure Django finds it within the directory: STATIC_URL = '/static/' STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')] STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') STATICFILES_FINDERS = [ "django.contrib.staticfiles.finders.FileSystemFinder", "django.contrib.staticfiles.finders.AppDirectoriesFinder", ] Then loaded the following within my templates: {% extends '_base.html' %} {% load crispy_forms_tags %} This would load the pages properly. I didn't come across any issues. Now this is where I found an interesting situations. When I used this path for editing forms in urls.py: path('edit/ticket/<int:pk>', ticketEditView, name='edit_ticket'), The page loaded with all the details but the CSS did not load properly. An error of '"GET /edit/static/css/_base.css HTTP/1.1" 404 3229"' popped up. When I replaced the path with the one below, everything seemed to work properly. path('edit/<int:pk>', ticketEditView, name='edit_ticket'), I want to know the difference of the path in urls.py. Why it reacted the way it reacted. -
how can i update foreign key child attribute in Django forms?
i have two forms. i want to update the book title and lesson name which is belong from a book too. i am getting this error 'Lesson' object has no attribute 'all' when i click on update url of a book. would you like to tell me how can i solve this issue? here is the trackback of error. Traceback(most recent call last): File "/home/project/NLS/env/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner response = get_response(request) File "/home/project/NLS/env/lib/python3.8/site-packages/django/core/handlers/base.py", line 179, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/home/project/NLS/src/report/views.py", line 42, in book_update_form lesson.pk), instance=lesson) for lesson in book.lesson.all()] Exception Type: AttributeError at / report/genrate/3 / Exception Value: 'Lesson' object has no attribute 'all' models.py class Lesson(models.Model): name = models.CharField(max_length=10) created = models.DateTimeField(auto_now_add=True) def __str__(self): return self.name class Book(models.Model): title = models.CharField(max_length=10) created = models.DateTimeField(auto_now_add=True) lesson = models.ForeignKey(Lesson, on_delete=models.CASCADE) def __str__(self): return self.title forms.py class BookForm(forms.ModelForm): class Meta: model = Book fields = ['title', 'lesson'] class LessonForm(forms.ModelForm): name = forms.CharField(max_length=10) class Meta: model = Lesson fields = ['name'] views.py def book_update_form(request, pk): book = get_object_or_404(Book, pk=pk) b_form = BookForm(request.POST, instance=book) l_form = [LessonForm(request.POST, prefix=str( lesson.pk), instance=lesson) for lesson in book.lesson.all()] if b_form.is_valid() and all([lf.is_valid() for lf in v_form]): book_update = b_form.save(commit=False) book_update.save() for lf … -
django httpResponseRedirect with a response
How to send a response with a httpresponseredirect in django? Things i have tried: response = HttpResponseRedirect("Authentication failed! Try again!") response['Location'] = '/permissionDenied' return response I could send the response in the header like response['error']:"Authentication failed! Try again!" But i need to send it in the response for ui to handle it. -
How can I avoid repetition of code within a function-based view in Django?
I have been researching how can I avoid using snippet of code over and over. The answer probably will involve using (generic) Class-based functions. However, I am a beginner in Django and this seems confusing. Here is my view in views.py: @login_required(login_url='/login') def view_list(request, listing_id): bid = Bid.objects.all().filter(listing=listing_id).order_by('-id') b_u = bid[0].user listing = Listing.objects.get(pk=listing_id) if request.method == "GET": return render(request, "auctions/view_list.html", { "form": BidForm(), "total_bids": bid.count(), "bid": None if bid == 0 else bid[0].bid, "listing": listing, "bid_user": "Your bid is the current bid." if request.user == b_u else None }) else: form = BidForm(request.POST) if form.is_valid(): value = form.cleaned_data if value['bid'] <= bid[0].bid: error_check = True return render(request, "auctions/view_list.html", { "error_check": error_check, "alert": f"Your bid is lower than the current bid $({bid[0].bid})! Try placing a higher one.", "form": BidForm(), "total_bids": bid.count(), "bid": None if bid == 0 else bid[0].bid, "listing": listing, "bid_user": "Your bid is the current bid." if request.user == b_u else None }) else: error_check = False new_bid = form.save(commit=False) new_bid.user_id = request.user.id new_bid.listing_id = listing.id new_bid.save() return render(request, "auctions/view_list.html", { "error_check": error_check, "alert": "Your bid was successfully placed!", "form": BidForm(), "total_bids": bid.count(), "bid": None if bid == 0 else bid[0].bid, "listing": listing, "bid_user": "Your bid is the … -
is there a huge difference between django 1.11 and django 3.8?
I Recently Joined in a course Which is quite nice and I like it but it's Explaining on Django 1.11 And Currently am using Django 3.8 SO is there a huge difference between these two Or They are similar ?? -
how to use JWTTokenUserAuthentication backend experimental feature in djangorestframework-simplejwt
I am planning to create microservices architecture in Django and Django rest framework. My intent is to have a separate Django project that handles authentication. This project has djangorestframework-simplejwt package which mentions an SSO feature here. How do I implement this? Should I update the DEFAULT_AUTHENTICATION_CLASSES in both the django projects? -
How to render Django-filters form with buttons as widget?
So, I'm using Django-filters to easily filter pictures on my website, but I need to render it with buttons as widgets. My code: class PicsFilter(django_filters.FilterSet): GAMES = Pics.GAMES ARTS = Pics.ARTS game = django_filters.ChoiceFilter(choices=GAMES) artType = django_filters.ChoiceFilter(choices=ARTS) def __init__(self, *args, **kwargs): super(ArtFilter, self).__init__(*args, **kwargs) if self.data == {}: self.queryset = self.queryset.none() class Meta: model = Pics fields = ['game', 'artType', ] I need game (which shows various game's titles) to be rendered with buttons and artType with dropdown menu, where the last is not a problem because it's the default way it renders. How do I achieve buttons as widgets though? I tried using django-crispy-forms, but I guess I did it wrong, because I tried from crispy_forms.layout import Button ... game = django_filters.ChoiceFilter(choices=GAMES, widget=Button) But it didn't work as intended, as it needs to be called with 2 values and even with those it throws an error 'Button' object has no attribute 'value_from_datadict' So I get it, it's not supposed to work this way, but I'm stuck how else can I achieve this. -
Django Choice Field Set as Default button
I am trying to make a set as default button for my field and this is what I am trying to do and doesn't seem to work can someone help me out. forms.py class VForm(forms.Form): Hours = forms.ChoiceField(choices=[(i,i) for i in HOURS_CHOICES], initial = Defaults.HoursDefault ,widget=forms.Select(attrs={ 'class':"form-control selectpicker", 'data-dropup-auto':"false", 'data-live-search':"true", })) Minutes = forms.ChoiceField(choices=[(i,i) for i in MINUTES_CHOICES], initial = Defaults.MinutesDefault ,widget=forms.Select(attrs={ 'class':"form-control selectpicker", 'data-dropup-auto':"false", 'data-live-search':"true", })) views.py def dashboard_view(request): if request.method=="POST": form = VForm(request.POST) if form.is_valid(): v = form.cleaned_data userInput = dict( hours=v["Hours"], minutes=v["Minutes"], ) request.session['userInput'] = userInput request.session['v'] = vsl print(userInput) form = VForm() content = {} content['form'] = form return render(request,"app/dashboard.html",content) html function Default() { {{ Defaults.VSLMinutesDefault }}=document.getElementById("VSLForm.Minutes"); } -
how to list APIs of multiple Django projects using microservices architecture on a single domain
So I have multiple Django projects(DRF) that acts as microservices. Let's suppose Project1 has Project1 APIs and Project2 has Project2 APIs, how do I list both Project1 and Project2 APIs in the same domain as api.example.com? Is there a feature in the Django Sites framework to achieve this or should I look into Django Rest Framework Routers? FYI, I am planning to deploy these applications on AWS EC2 using Elasticbeanstalk and Docker.