Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
How to fix ModuleNotFounError in Django?
I'm following a tutorial to deploy Django on Heroku and I've run into an error where after I have uploaded project to github, I can't run manage.py runserver. It sends an error message trace and one of the messages is module not found. Venv is activated, debug is set to false. Below is the stack trace errors. This is the guide I'm following for anyone curious. I am on Re-test and save changes to Github section. -
Filter form for Manytomanyfield
I'm writing an inventory app. The idea is this: there's a parts list class and a vendor class, which are related to each other. class Part(models.Model): vendr = models.ManyToManyField('Vendor', blank=True) class Vendor(models.Model): parts = models.ManyToManyField(Part, blank=True) On the template to create new vendor i want to put a "Add parts" button. Now it will render as SelectMultiple widget. But when there are hundreds of parts it doesn't really work. So what i want is to be able to add parts one by one through a charfield which also works as a filter. But i can't figure out how to do it (i'm new to python/django). What would be the best approach for this. -
Django how to do admin.site.register
i have app written in django 1.8, doing admin.site.register(A, Admin) or admin.site.register(B) Also using admin.site.unregister(User). But none of these are working in Django 2.2, whenever I type admin.site. In help I don't get neither register or unregister functions.When I try to run in apache in crashes. Any help in django 2.2.7 and python 3.6.9 from django.contrib import admin -
How should I organise my code in project?
Good morning. I've been learning spring for some time and I knew two approaches to organise code in projects. First is to divide project into layers(repository, service etc.). Second one is to separate by modules(for instance products, customers, orders etc.). My question is how does it look like in Django? My second question is whether I should place model classes into separate files or everything in default model.py file? -
Make a resource to retrieve API Keys from the API using username and password
I am building an API with tastypie to use a mobile application on my website (built with django). From what I've seen, instead of storing the credentials on the phone, I should use an API key. I wanted to do as follow : whenever a new account is created, generate an api key (done with create_api_key) have a resource for the phone to grab the API key using username and password. I am stuck on the second step. How can I make such a resource ? I though about using custom filters to retrieve the credentials, though it seems really convoluted... I also tried to adapt code from this answer (https://www.semicolonworld.com/question/55071/how-can-i-login-to-django-using-tastypie), though I am not really comfortable with the whole tweaking of urls to include the login entry point. How can I achieve this in the most idiomatic way ? Also, is this a good way of implementing communication between the app and django ? -
Graphql: How to implement condition in my mutation in my project?
So I have been assigned with a project where already a developer worked and he left so I have no one to ask it to. It is with Django and Graphql and I am very new to Graphql. The business logic is, if there is a boolean field "ban" set to true, user will not be able to upvote the news and raise a validation error. What I have done so far: I have tried adding @property def ban(self): return self.user.generaluser.last().ban in my UserVoteNews model. In the mutation I tried to acces the value with user.ban but couldn't. Here is the model: class GeneralUser(models.Model): user = models.ForeignKey(User, on_delete=models.CASCADE) country = models.ForeignKey(Country, on_delete=models.CASCADE) image = models.CharField(max_length=2000) ban = models.BooleanField(default=False) class UserVoteNews(models.Model): user = models.ForeignKey(User, on_delete=models.CASCADE) news = models.ForeignKey(News, on_delete=models.CASCADE) vote = models.IntegerField(default=0) created_date = models.DateTimeField(auto_now=True, help_text="When user voted") class Meta: verbose_name = "User Vote News" verbose_name_plural = "User Vote News" And the mutation where I need to get the value of ban and raise the error: class UpdateUpvote(graphene.Mutation): class Arguments: id = graphene.ID() user_id = graphene.Int() news = graphene.Field(NewsType) def mutate(self, info, id, user_id): user = info.context.user if UserVoteNews.objects.filter(user_id=user.id, news_id=id).exists(): UserVoteNews.objects.filter( user_id=user.id, news_id=id).update(vote=1) news = News.objects.get(pk=id) news.upvote = news.upvote+1 news.downvote = … -
How to handle JavaScript event inside a inlineformset_factory with formset_media_js
I have an inlineformset_factory implemented with formset_media_js, these two by itself are working ok. What I need to implement is to be able to handle the enable and disable state of some checkboxes and input fields that are inside the inlineformset_factory. I have a javascript that works on the first group of formset created on page load, but when a new formset is added by the user the javascript is not working. How can I handle the new formsets input fields added by the user with javascript? If "is chapter" is checked then "is subchapter" and "quantity" are disabled, by default the inlineformset_fatory creates 1 formset on page load, on this formset the javascript works. But when the user adds another formset with button "Add another Budget Item" the javascript is no longer working. If for example, I configure the inlineformser_factory to create 3 formset on page load the javascript works on those 3 formset but not on the formsets added by the user. forms.py : at this forms.py i have the inlineformset_factory that is created every time the user adds a formset. from django import forms from django.forms import inlineformset_factory from djangoformsetjs.utils import formset_media_js from accounts.models import ProjectManager from … -
Calculate field based in two ajax requests
i am trying to develop a web app in django, and i have two ajax request in an html template that are working well, but when i try to calulate a field and put it on another field(#minherente), this calculate the field with the previously value, but not with the values got in two ajax. I'll apreciate your help. <script type="text/javascript"> $("#id_Falla").change(function () { var url = $("#MatrizForm").attr("data-fi-url"); var FallaId = $("#id_Falla").val(); var url1 = $("#MatrizForm").attr("data-ii-url"); $.ajax({ url: url, data: { 'Falla': FallaId }, success: function (data) { $("#finherente").val(data); } }); $.ajax({ url: url1, data: { 'Falla': FallaId }, success: function (data1) { $("#iinherente").val(data1); } }); var frecuencia = $('#finherente').val(); var impacto = $('#iinherente').val(); $('#minherente').val(frecuencia*impacto); }); Any help would be most appreciated thanks -
How to implement view and url patterns for Post and Category models in Django 3
I'm trying to learn Django by building a simple blog. I have three models: Post, Category, and Tag. class Post(models.Model): title = models.CharField(max_length=200, unique=True) slug = models.SlugField(max_length=200, unique=True, null=False) author = models.ForeignKey(User, on_delete=models.CASCADE, related_name='blog_posts') updated_on = models.DateTimeField(auto_now=True) created_on = models.DateTimeField(auto_now_add=True) status = models.IntegerField(choices=POST_STATUS, default=0) visibility = models.IntegerField(choices=POST_VISIBILITY, default=0) content = models.TextField() excerpt = models.TextField() category = models.ForeignKey('blog.Category', on_delete=models.CASCADE) tags = models.ManyToManyField('blog.Tag') image = models.ImageField(upload_to="images/", default=0) class Meta: ordering = ['-created_on', 'title'] verbose_name = 'Post' verbose_name_plural = 'Posts' unique_together = ('title', 'slug') def __str__(self): return self.title class Category(models.Model): title = models.CharField(max_length=200, unique=True) slug = models.SlugField(max_length=200, unique=True, null=False) description = models.TextField() class Meta: ordering = ['title'] verbose_name = 'Category' verbose_name_plural = 'Categories' unique_together = ('title', 'slug') def __str__(self): return self.title class Tag(models.Model): title = models.CharField(max_length=200, unique=True) slug = models.SlugField(max_length=200, unique=True, null=False) description = models.TextField() class Meta: ordering = ['title'] verbose_name = 'Tag' verbose_name_plural = 'Tags' def __str__(self): return self.title I have two views - posts_index shows all the posts, and single should show a single post. from django.shortcuts import render from .models import Post, Category, Tag def posts_index(request): all_posts = Post.objects.all() return render(request, 'index.html', {'posts': all_posts}) def single(request, slug, category): single_post = Post.objects.get(slug=slug) return render(request, 'single.html', {'single': single_post, 'category_slug': single_post.slug}) In mu … -
Python is inserting newline characters into requests header
Some background. This code takes a data from a data collection script and then posts it to a secured REST API in Django. I have an api key generated and it is the only line in the file api.key. I also have the url to post to in the file post.url (it looks like http://example.com/api/ and then I concatenate the proper api node name on the end). The code is below for my solar data api node (posts data collected from solar panels) import gather_solar as gs import requests import json import os def post_solar(): print("DEBUG: start solar") data = gs.gather_solar() api_key = None url = None try: here = os.path.dirname(os.path.abspath(__file__)) filename = os.path.join(here, 'api.key') file = open(filename, "r") api_key = file.readline() api_key.replace('\n', '') except Exception as e: print("ERROR: " + str(e)) try: here = os.path.dirname(os.path.abspath(__file__)) filename = os.path.join(here, 'post.url') #server will use different url file = open(filename, "r") url = file.readline() url.replace('\n', '') except Exception as e: print("ERROR: " + str(e)) if api_key is not None and url is not None: authorization = "Token " + api_key authorization.replace('\n', '') headers = { 'Content-Type': 'application/json; charset=UTF-8', 'Authorization': authorization } json_data = json.dumps(data) url += "solar/" url.replace('\n', '') print(url) req = … -
How to dynamically add sequence numbers to labels in django forms
I'm using Modelformset to dynamically add/remove rows in my form. I wonder if there is a way to dynamically add sequence numbers to labels in django forms? Currently my code is as below. I want dynamically add sequence numbers to Building type # everytime the user adds new field. BuildingFormset = modelformset_factory( Building, fields=('building_type', 'building_length', 'building_width', ), labels={'building_type':'Building type #'}, extra=1, ) I tried to use <label for="{{ form.field.id_for_label }}"></label> and auto_id but it didn't work for some reason (could it be because I'm using bootstrap?). -
Populate list in Django using view
I have the following function to read news headlines into a Python list: import requests def us_news_articles(): url = 'https://newsapi.org/v2/top-headlines?country=us&apiKey=### source = requests.get(url) data = source.json() us_news_articles_list = [] for article in data['articles']: us_news_articles_list.append(article) return us_news_articles_list This function works, and I've verified it. Now I want to be able to use this to populate HTML li items I have the following views built: def viz(request): return render(request, 'resume/viz.html') class USNewsArticles(TemplateView): template_name = 'viz' def get_context_data(self, *args, **kwargs): context = { 'articles': us_news_articles(), } return context My URL looks like this path('viz/', views.viz, name='viz') And in my HTML file, I have the following: <ul> {% for article in articles %} <li>{{ article.title }}</li> <ul> <li>{{ article.description }}</li> </ul> {% endfor %} </ul> However, when I deploy the website, I get no list. I believe it's an issue with the view, but I am not well-versed enough in understand views and functions to understand why it will not populate the li items -
serve multiple base64 images to download
My django application has a model with base64 encoded images. I would like to add the option to my ListView to download all the displayed images to the location of the user's choice. Should I create an AJAX view, or can jQuery take care of it? I googled around and I saw some examples of serving a single file to download. But how do I serve all the images at the same time? -
Why does django-dynamic-formset 'add another' button duplicate foreign key field?
I went through the instructions to set up django-dynamic-formset to my project and my specific inline formsets. All of the formsets seem to work except one that includes a foreign key. When I 'add another' it duplicates that field right under it. Before pressing 'add another': After pressing 'add another': The formset: <h3>Services</h3> <div class="row"> {{ services_formset.management_form }} {% for formserve in services_formset %} {{ formserve.non_field_errors }} <div class="container" id="services_formset"> <div class="row" name="service_form"> {% for hidden in formserve.hidden_fields %} {{ hidden }} {% endfor %} {% for field in formserve %} {% if field.name != 'index' and field.name != 'invoice'%} <div class="col-sm"> {{ field.errors }} {{ field|as_crispy_field }} {% if field.help_text %} <p class="help">{{ field.help_text|safe }}</p> {% endif %} </div> {% endif %} {% endfor %} </div> </div> The javascript: <script type="text/javascript"> $(function() { $('#services_formset').formset({ prefix: '{{ formserve.prefix }}' }); }) </script> -
Django Many to Many Field add() got an unexpected keyword argument 'id'
I want to add items from Available classic to Chosen classic how can i do that as in image below i can get Chosen classic by Profile.objects.get(user=request.user).classic.add(id=2) but i can't add iems from Available classic to Chosen classic any one can help this problem fast please Thanks for all Models.py from django.db import models # Create your models here. from django.utils import timezone from django.contrib.auth.models import User from django.db.models.signals import post_save from django.dispatch import receiver class Language(models.Model): language = models.CharField( max_length=2, choices=[ ('AR', 'Arabic'), ('EN', 'English'), ], default='AR' ) def __str__(self): return self.language class Classic(models.Model): name = models.CharField(max_length=50, blank=False, null=False) music = models.FileField(upload_to='', max_length=100, blank=True, null=True) lang = models.ForeignKey(Language, on_delete=models.CASCADE) def __str__(self): return self.name class Profile(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE) classic = models.ManyToManyField(Classic, blank=True, null=True) workOut = models.ManyToManyField(WorkOut, blank=True, null=True) chillOut = models.ManyToManyField(ChillOut, blank=True, null=True) romantic = models.ManyToManyField(Romantic, blank=True, null=True) happy = models.ManyToManyField(Happy, blank=True, null=True) sad = models.ManyToManyField(Sad, blank=True, null=True) lang = models.ManyToManyField(Language, blank=True, null=True) def __str__(self): return str(self.user) def update_user_profile(sender, **kwargs): if kwargs['created']: user = Profile.objects.create(user=kwargs['instance']) post_save.connect(update_user_profile,sender=User) Admin.py from django.contrib import admin # Register your models here. from . import models class ClassicAdmin(admin.TabularInline): model = models.Classic class PlayLists(admin.ModelAdmin): inlines = [ClassicAdmin] class Favo(admin.ModelAdmin): filter_horizontal = ['classic'] admin.site.register(models.Language, PlayLists) admin.site.register(models.Profile, … -
Django server shows wrong time
I have a problem with my django server time, it is 2 hours late. I tried to find a solution but whatever i found (as How to change my django server time, or Django documentation) is not what i think I need. Right now my computer's time is 23:14:37 When i write in bash date +%H:%M:%S I will get: (python_env) bash-3.2$ date +%H:%M:%S 23:17:03 So I don't think this is my console problem. But when I am running my server here is what i get: (python_env) bash-3.2$ python3 manage.py runserver Watching for file changes with StatReloader Performing system checks... System check identified no issues (0 silenced). You have 17 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions. Run 'python manage.py migrate' to apply them. April 04, 2020 - 21:18:47 Django version 2.2.4, using settings 'myVote365.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C. The time is now 2 hours late. I have red that it could be because of wrong timezone, but I have my code similar to How to change my django server time LANGUAGE_CODE = 'pl' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True … -
Populate ModelChoiceField via queryset of 3 tables in Django Form
I have this model definition: class Header(models.Model): no = models.CharField(max_length=20, primary_key=True) # Header ID status = models.CharField(max_length=9) class Item(models.Model): header = models.ForeignKey(Header, on_delete=models.CASCADE) # link Header item_no = models.CharField(max_length=20) class Meta: unique_together = (("header", "item_no"),) class Resource(models.Model): no = models.CharField(max_length=20, primary_key=True) name = models.CharField(max_length=50) class Assignment(models.Model): item = models.ForeignKey(Item, on_delete=models.CASCADE) # link Item resource = models.ForeignKey(Resource, on_delete=models.CASCADE) # link Resource class Meta: unique_together = (("item", "resource"),) With this Form: class ItemForm(forms.Form): header = forms. ModelChoiceField(queryset=Header.objects.filter( ??????? )) def __init__(self, resource, *args, **kwargs): super().__init__(*args, **kwargs) self.resource = resource And with this View: def form_function(request): resource = get_resource(request). # gets resource from user and other logics if request.method == 'POST': form = ItemForm(data=request.POST, resource=resource) if form.is_valid(): pass # do something with the form else: form = ItemForm(resource=resource) return render(request, 'template1.html', {'form': form }) So basically the Assignment table links a Resource (let's say the user) to a particular Item In a Form I need to propose a ModelChoiceField (html select) the list of all Headers assigned to current Resource (the Resource is passed in the view to the Form) Translated in SQL "pseudo code" it would become something similar to the following statement: select * from HEADER where NO in ( select … -
Django- How do I get the content of a model thats related to another?
So i'm creating a to-do app. How do I view the tasks linked to the board? Like I understand that the board needs to be the foreign key to task. Here is my code so far: Models.py class Board(models.Model): id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False) admin = models.ForeignKey(User, on_delete=models.CASCADE, related_name="Board") name = models.CharField(max_length=200) class Task(models.Model): board = models.ForeignKey(Board, on_delete=models.CASCADE) admin = models.ForeignKey(User, on_delete=models.CASCADE) text = models.CharField(max_length=300) complete = models.BooleanField(default=False) assigned_to = models.CharField(max_length=30) views.py def board_post_detail(request, board_id): obj = get_object_or_404(Board, id=board_id) context = {"object": obj} return render(request, 'boards/board_post_detail.html', context) board_post_detail.html {% block content %} <h1>{{ object.name}}</h1> <p>Created by {{object.admin.username }}</p> {% endblock %} -
how do i resolve this django.core.exceptions.ImproperlyConfigured error
please how do I resolve this. I'm trying to add data on the admin site but I keep getting this error urls.py for btre from django.contrib import admin from django.urls import path, include from django.conf import settings from django.conf.urls.static import static urlpatterns = [ path('', include('pages.urls')), path('listings/', include('listings.urls')), path('admin/', admin.site.urls), ] + static(setting.MEDIA_URL, document_root=settings.MEDIA_ROOT) this is what the terminal shows File "C:\Users\David\Envs\btre-project\lib\site-packages\django\urls\resolvers.py", line 597, in url_patterns raise ImproperlyConfigured(msg.format(name=self.urlconf_name)) django.core.exceptions.ImproperlyConfigured: The included URLconf 'btre.urls' does not appear to have any patterns in it. If you see valid patterns in the file then the issue is probably caused by a circular import. -
Problems with real time chat in django project
I have django project with rooms, and i want to create real time chat for rooms with channels library, this chat works with data from url kinda example.com/room_name/person_name, but i have rooms that have static url(example below),how to adjust that for my project. I want to show request.user.username instead of person_name in url, and i want to use room_detail url instead of room_name that i should type every time views.py class RoomDetail(DetailView): model = Room template_name = 'rooms/room_detail.html' context_object_name = 'room_detail' slug_field = 'invite_url' slug_url_kwarg = 'url' consumers.py class Consumer(WebsocketConsumer): def connect(self): self.room_name=self.scope['url_route']['kwargs']['room_name'] self.room_group_name='chat_%s' % self.room_name self.person_name=self.scope['url_route']['kwargs']['person_name'] async_to_sync(self.channel_layer.group_add)( self.room_group_name, self.channel_name ) async_to_sync(self.channel_layer.group_send)( self.room_group_name, { "type":"chat_message", "message":self.person_name+" Joined Chat" } ) self.accept() def disconnect(self, code): async_to_sync(self.channel_layer.group_send)( self.room_group_name, { "type":"chat_message", "message":self.person_name+" Left Chat" } ) async_to_sync(self.channel_layer.group_discard)( self.room_group_name, self.channel_name ) def receive(self, text_data=None, bytes_data=None): text_data_json=json.loads(text_data) message=text_data_json['message'] async_to_sync(self.channel_layer.group_send)( self.room_group_name, { 'type':'chat_message', 'message':self.user+" : "+message } ) def chat_message(self,event): message=event['message'] self.send(text_data=json.dumps({ 'message':message })) urls.py path('rooms/<url>/', RoomDetail.as_view(), name='room_detail'), -
Django - Trying to call a model function from list_display in modeladmin
I'm following along with Mozilla's Django tutorial, currently on this page: https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Admin_site I am trying to get the ModelAdmin for the Book model to call a function of the Book model in the list_display of the ModelAdmin. This is to provide a list of genres in the list display. I have the following code in the admin.py file: class BookAdmin(admin.ModelAdmin): list_display('title', 'author', 'display_genre') And in the models.py file: class Book(models.Model): ... def display_genre(self): return ', '.join(genre.name for genre in self.genre.all()[:3]) display_genre.short_description = 'Genre' I believe this was exactly what the tutorial asked me to add to each of these files. Here's is what django tells me when I try to makemigrations: SystemCheckError: System check identified some issues: ERRORS: : (admin.E108) The value of 'list_display[2]' refers to 'display_genre', which is not a callable, an attribute of 'BookAdmin', or an attribute or method on 'catalog.Book'. I'm not sure what I've done wrong Running python 3.6.9 on Ubuntu 18.04.4 -
django | importing two models' stored data in a single html page
I have two views in my views.py as following: def table1(request): template_name = 'tables.html' queryset = one.objects.all() context = { "table1_list": queryset } return render(request, template_name, context) def table2(request): template_name = 'tables.html' queryset = two.objects.all() context = { "table2_list": queryset } return render(request, template_name, context) and the following models in models.py: class one(models.Model): title = models.CharField(max_length=100) explanation = models.CharField(max_length=1000, blank=True, null=True) class two(models.Model): title = models.CharField(max_length=100) explanation = models.CharField(max_length=1000, blank=True, null=True) In my tables.html I want to show the contents from both of these models. I have: <p>Table one content</p> <ul> {% for obj in table1_list %} {{ obj.title }}, {{ obj.explanation }} {% endfor %} </ul> <p>Table two content</p> <ul> {% for obj in table1_list %} {{ obj.title }}, {{ obj.explanation }} {% endfor %} </ul> But since I can just return one view from views.py in urls.py, I cannot return both of the tables. In urls.py I have to write either of the following: urlpatterns = [ url(r'^$', home), url(r'^tables/$', table1), ] or urlpatterns = [ url(r'^$', home), url(r'^tables/$', table2), ] I tried adding both of the tables from the query in views.py as: def table1(request): template_name = 'tables.html' queryset_one = one.objects.all() queryset_two = two.objects.all() context = { … -
How to filter the class to which the model is related in a ManyToManyField relation in Django?
I would like to filter the class Location to which the model House is related. The idea is to limit the choices of Location based on the value of the field country in the admin pannel. Is it something possible and if so, how can I do that? class House(models.Model): country = models.ForeignKey(Country, on_delete=models.CASCADE, related_name='country' ) city = models.ManyToManyField( Location, related_name='city' ) Basically I would like someting like that but Django throw an error saying django.core.exceptions.AppRegistryNotReady: Models aren't loaded yet. city = models.ManyToManyField( Location.objects.filter(country=country, related_name='city' ) -
JQuery Ajax call refused by Django server in google compute engine. net::ERR_CONNECTION_REFUSED
I have a Django web server with REST API. Front end Ajax is implemented with JQuery. All works in local Mac and Ubuntu. When deployed in google computer engine, web page showed up and subsequence Ajax call failed with error: net::ERR_CONNECTION_REFUSED This application does not have cross domain API calls. It's simply web page ajax call to the same web server. I have firewall rule allow TCP:8000 Ingress http-server IP ranges: 0.0.0.0/0 tcp:8000 Allow 1000 default I also confirmed that Ajax call never reached the server side. It's like refused by google compute engine. What GCP configuration is missing? -
Django : SystemCheckError: System check identified some issues
I have created Django projects before. However this time,I do django-admin startproject myproject and run server python3 manage.py runserver. First I see include() error in urls.py, I removed the include() from admin urlpattern. It then looks like : path(r'^admin/', include(admin.site.urls)). Second, I see another security check problems. Exact message is this : django.core.management.base.SystemCheckError: SystemCheckError: System check identified some issues: ERRORS: ?: (admin.E408) 'django.contrib.auth.middleware.AuthenticationMiddleware' must be in MIDDLEWARE in order to use the admin application. ?: (admin.E409) 'django.contrib.messages.middleware.MessageMiddleware' must be in MIDDLEWARE in order to use the admin application. ?: (admin.E410) 'django.contrib.sessions.middleware.SessionMiddleware' must be in MIDDLEWARE in order to use the admin application. I followed another Stack question with similar problem like me but different Django/Python versions : Django E.408, E.409 and E.410 errors on runserver From reading these, I understood the problem has risen because of incompatible versions of Django/Python. However I still have questions like : I ran the runserver on default settings (settings generated by startproject). Why Django cannot recognize it's own settings ? . In the Stack question above, I tried changing MIDDLEWARE_CLASSES to MIDDLEWARE then it solves this issue and raises another issue of django.core.exceptions.ImproperlyConfigured: WSGI application 'portfolio.wsgi.application' could not be loaded; Error importing module. I …