Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
I need to make a slider having 3 images each
I have a list of products an im going to use for loop to get each product details with photo from backend,now i want make a slider using carousel in which each slide will be having 3 images each means three products each and on slding i will next three products.Please answer me with respect to django as i know normal carousel code is available online. -
TypeError: index_queryset() got an unexpected keyword argument 'using'
Django==3.2.5 django-haystack==3.0 pysolr==3.9.0 Solr = 8.9.0 I am following the tutorial as in https://django-haystack.readthedocs.io/en/master/tutorial.html to create an Django application with Solr. While executing ./manage.py rebuild_index, I am getting an error like: **File "/..../tele_env/lib/python3.8/site-packages/haystack/indexes.py", line 202, in build_queryset index_qs = self.index_queryset(using=using) TypeError: index_queryset() got an unexpected keyword argument 'using'** I am stuck up since 3 days solving this error. Tried to downgrade each of the packages (Django, pysolr, haystack with solr 6.6, but didn't help me. Please help me to get out of this circle of upgrading and downgrading... Thanks in advance -
How to save comment while blog post save in Django
Info: I want to save comments form when i submit the form of blog post. problem: if i fill the form of comment then comment save with blog post form other wise comments is blank in database. i don't understand how can perform this logic? **Views.py def PostCreate(request): post_form = PoatForm() comment_form = CommentForm() if request.method == 'POST': post_form = PostForm(request.POST) comment_form = CommentForm(request.POST or None) if post_form.is_valid() or comment_form.is_valid(): post = ticker_form.save(commit=False) post.author = request.use post.save() com = comment_form.save(commit=False) com.post_by = request.user com.post = post com.save() return redirect('/') context = { 'post_form': post_form, 'comment_form': comment_form, } return render(request, "post/create.html", context) -
How to generate a zoom meeting using Django?
I have created a JWT app on zoom marketplace and got API key and secret but i am not able to understand and bit confused like how to create a zoom meeting by making post request to zoom using Django -
Detect database DDL schema changes with Django
Let's say that we have a Django app that looks on a legacy database. If someone make changes on some database tables from a db client as DBeaver for example and not through Django models, is there a way to identify these changes? -
Filtering the table using Date
I am facing an issue with filtering the table data by its created date. I have a Part model where I have created a date field that auto add the creation date and I am using queryset to filter the table. However, I managed to do filtering by Product and Supplier name but in the below code, I also tried to filter by date but somehow it doesn't work. After filtering the table by date, still I can see old data in there. models.py class Part(models.Model): created_date = models.DateField(auto_now_add=True) views.py def get_queryset(self, request): queryset = self.model.objects.all().order_by('-id') if self.request.GET.get('supplier'): queryset = queryset.filter(supplier_id=self.request.GET.get('supplier')) elif self.request.GET.get('product'): queryset = queryset.filter(product_id=self.request.GET.get('product')) elif self.request.GET.get('created_date'): queryset = queryset.filter(created_date=self.request.GET['created_date']) return queryset filters.py class PartFilter(django_filters.FilterSet): class Meta: model = Part fields = ['partno', 'product', 'supplier','created_date'] Can anyone help me out? Thank you very much -
django.db.utils.ProgrammingError: relation does not exist with recursive model
I have a django app that is working as intended on my local pc. but when I'm deploying it to heroku it prints the message: django.db.utils.ProgrammingError: relation "core_menuoption" does not exist Now, I searched about this a lot, but no case is similar as mine. I think that my problem is because my model MenuOption is recuesive. Here is the model: class MenuOption(models.Model): parent = models.ForeignKey('self', on_delete=models.CASCADE, blank=True, null=True) title = models.CharField(max_length=50, unique=True) ... As you can see, the parameter parent is a foreign key to this model. So I think becuase the model is not yet created, django doesn't know which model to relate to. I thought about maybe deleting this field, migrate and than bring it back, but too many things rely on this field. -
cannot load background images when the source URL is provided in stylesheet instead of HTML code, Using django STATIC_URL
I am unable to load the background image of my webpage when using {static} in my CSS code It's difficult to explain so I will just paste the snippets here: Inside settings.py I have configured STATIC items as follows: ```STATIC_URL = '/static/' STATICFILES_DIRS=[ os.path.join(BASE_DIR,'static') ,] # ] STATIC_ROOT= os.path.join(BASE_DIR, 'assets')``` I have used the command: python manage.py collectstatic to collect all the static items inside the assets folder(in the base directory) images/files, for example "ii.jpg" inside project/static/img whose source provided in the HTML template render fine using this code <div class="imgbox"><img src="{%static 'img/ii.jpg'%}"></div> but then I try to render image using : ```background: linear-gradient(rgba(0,0,0,0.5),#05071a) ,url("{%static 'img/ff_1.jpg'%}") no-repeat center center/cover;``` the browser console gives 404(image not found error) even when the name and extension are correct I will attach the screenshot of the error shown in the browser console. Now, one more thing, when I hover over the {%static 'image_name'%}, I think it shows me the interpreted path as shown in 3rd screenshot I feel like it's looking for img folder in project/static/styles/ instead of project/static/ if that's the error IDK how to fix this please refer the 4th screenshot to see my folder structure(carnival is the app's name,ITAproject is name … -
CS50 Python & JS Web: Cannot operate website after trying to 'makemigrations'
I have been working through the Web with Python and Django with the CS50 course. When i got to the stage of 'makemigrations' it didnt run and not i cant use the command 'runserver' either. PS C:\Users\44777\code\airline> python3 manage.py runserver Watching for file changes with StatReloader Performing system checks... Exception in thread django-main-thread: Traceback (most recent call last): File "D:\Python38\lib\site-packages\django\urls\resolvers.py", line 591, in url_patterns iter(patterns) TypeError: 'module' object is not iterable The above exception was the direct cause of the following exception: Traceback (most recent call last): File "D:\Python38\lib\threading.py", line 932, in _bootstrap_inner self.run() File "D:\Python38\lib\threading.py", line 870, in run self._target(*self._args, **self._kwargs) File "D:\Python38\lib\site-packages\django\utils\autoreload.py", line 53, in wrapper fn(*args, **kwargs) File "D:\Python38\lib\site-packages\django\core\management\commands\runserver.py", line 118, in inner_run self.check(display_num_errors=True) File "D:\Python38\lib\site-packages\django\core\management\base.py", line 392, in check all_issues = checks.run_checks( File "D:\Python38\lib\site-packages\django\core\checks\registry.py", line 70, in run_checks new_errors = check(app_configs=app_configs, databases=databases) File "D:\Python38\lib\site-packages\django\core\checks\urls.py", line 13, in check_url_config return check_resolver(resolver) File "D:\Python38\lib\site-packages\django\core\checks\urls.py", line 23, in check_resolver return check_method() File "D:\Python38\lib\site-packages\django\urls\resolvers.py", line 409, in check messages.extend(check_resolver(pattern)) File "D:\Python38\lib\site-packages\django\core\checks\urls.py", line 23, in check_resolver return check_method() File "D:\Python38\lib\site-packages\django\urls\resolvers.py", line 408, in check for pattern in self.url_patterns: File "D:\Python38\lib\site-packages\django\utils\functional.py", line 48, in __get__ res = instance.__dict__[self.name] = self.func(instance) File "D:\Python38\lib\site-packages\django\urls\resolvers.py", line 598, in url_patterns raise ImproperlyConfigured(msg.format(name=self.urlconf_name)) from e django.core.exceptions.ImproperlyConfigured: The … -
How to save or store the documents that a user uploads in my django form?
I have a django form that accepts complaints from users and saves them in the admin panel. Everything seems to be working perfectly. The form accepts the data and stores them all in the admin panel except for the upload file data. The form does accept a file from the user and seems to submit it but while the other data is getting stored perfectly, The file isn't getting stored. How do I upload and save the file as well? models.py: class Complaint(models.Model): user = models.ForeignKey(User, on_delete= models.CASCADE, null = True, blank=True) reportnumber = models.CharField(max_length=500 ,null = True, blank= False) eventdate = models.DateField(null=True, blank=False) event_type = models.CharField(max_length=300, null=True, blank=True) device_problem = models.CharField(max_length=300, null=True, blank=True) manufacturer = models.CharField(max_length=300, null=True, blank=True) product_code = models.CharField(max_length=300, null=True, blank=True) brand_name = models.CharField(max_length = 300, null=True, blank=True) exemption = models.CharField(max_length=300, null=True, blank=True) patient_problem = models.CharField(max_length=500, null=True, blank=True) event_text = models.TextField(null=True, blank= True) document = models.FileField(upload_to='static/documents', blank=True, null=True) def __str__(self): return self.reportnumber views.py: def NewComplaint(request): user = request.user if request.method == 'POST': form = ComplaintForm(request.POST) print(form) if form.is_valid(): print("hello") cmp_obj = form.save(commit=False) cmp_obj.user = user cmp_obj.save() submitbutton= request.POST.get('submit') if submitbutton: messages.success(request, 'Submitted!') context = {'form': form} return render(request, 'new.html', context) else: form = ComplaintForm() context = {'form': … -
How to bulk create or update in Django
I have to process an item report CSV file every 1 hour. The CSV contains 1.5 lac plus records for 1 account and there are multiple accounts in my system. I was working on rails previously and there was active record gem to handle this use case very efficiently. I am looking for an alternate to this gem in Django or any built in method that will be helpful to import such large data in bulk. So far I have tried this code. class ItemReportService: def call(self, file_url): with open(file_url, 'r') as file: reader = csv.DictReader(file) products = [] for row in reader: product = self.process_product(row) products.append(product) self.update_products(products) def process_product(self, row): print(f'Processing sku: {row["SKU"]}') product = Product.objects.filter( sku=row['SKU']).first() or Product(sku=row['SKU']) product.listing_title = row['Product Name'] product.listed_price = row['Price'] product.buy_box_price = row['Buy Box Item Price'] + \ row['Buy Box Shipping Price'] product.status = row['Lifecycle Status'] return product def update_products(self, products): Product.objects.bulk_update( products, [ 'listing_title', 'listed_price', 'buy_box_price', 'Lifecycle Status' ] ) It is raising this exception because when there is a new product it doesn't have primary key assigned to it ValueError: All bulk_update() objects must have a primary key set. -
Jquery is new and hard for me
This is my code I want when someone click on checkbox this price adding in to total price. Or button will be better? I use Django models and form for visual on html. I am new in programing, start learning python 1 month ago. $(document).ready(function() { const ID_CHECK_1 = 'id_checkbox_1'; const ID_CHECK_2 = 'id_checkbox_2'; const ID_CHECK_3 = 'id_checkbox_3'; const ID_PRICE_1 = 'id_price_1'; const ID_PRICE_2 = 'id_price_2'; const ID_PRICE_3 = 'id_price_3'; const ID_TOTAL_PRICE = 'id_total_price'; var $check1 = $('#' + ID_CHECK_1); var $check2 = $('#' + ID_CHECK_2); var $check3 = $('#' + ID_CHECK_3); var $price1 = $('#' + ID_PRICE_1); var $price2 = $('#' + ID_PRICE_2); var $price3 = $('#' + ID_PRICE_3); var $total = $('#' + ID_TOTAL_PRICE); var totalPrice = $total.val(); $($check1).click(function() { if ($check1.is(":checked")) { totalPrice += parseFloat($price1.val()); } if ($check2.is(":checked")) { totalPrice += Number($price2.val()); } if ($check3.is(":checked")) { totalPrice += Number($price3.val()); } }) }); -
Using a variable in a {% url %} when `app_name` has been defined
I am having issues trying to use a Django template variable to form a URL in combination with the app_name attribute. Currently, I am using a template variable to form a URL <a href={% url variable_name %}>On our page about {{ variable_name }}.</a> Though I am aware that it is seen as good practice to make a URL more accurate by defining app_name in URLs. e.g. app_name = "name_of_app" Meaning that URLs are then written like: <a href={% url "name_of_app:about" %}>About</a> Is it possible for me to combine my current code with this approach? To use a variable and the app_name attribute? I have experimented with this {% url 'NameOfApp:'this_is_a_variable %}, by putting the quote marks in different places, but no success yet. -
django rest-framework. Expand fields. AttributeError
I have expand fields in my serializers. I send request api/drivers/?expand=tractors__drivers__driver and get error: "Got AttributeError when attempting to get a value for field make on serializer TractorSerializer. The serializer field might be named incorrectly and not match any attribute or key on the TractorDriver instance. Original exception text was: 'TractorDriver' object has no attribute 'make'." Models: class Tractor(BaseModel): ... make = models.CharField("Make", max_length=32) ... class TractorDriver(BaseModel): tractor = models.ForeignKey( Tractor, verbose_name="Tractor", on_delete=models.CASCADE, related_name="drivers", ) driver = models.ForeignKey( Driver, verbose_name="Driver", on_delete=models.CASCADE, related_name="tractors", ) ... Serializers: class DriverSerializer(BaseModelSerializer): class Meta: model = Driver expandable_fields = dict( ... tractors=dict( serializer="safety.api.serializers.TractorSerializer", many=True, ), ... class TractorDriverSerializer(BaseModelSerializer): class Meta: model = TractorDriver expandable_fields = dict( tractor=dict(serializer="safety.api.serializers.TractorSerializer", read_only=True), driver=dict(serializer="safety.api.serializers.DriverSerializer", read_only=True), ) class TractorSerializer(BaseModelSerializer): class Meta: model = Tractor expandable_fields = dict( ... drivers=dict( serializer="safety.api.serializers.TractorDriverSerializer", many=True, ), ... Views: class DriverStatusViewSet(BaseModelViewSet): queryset = DriverStatus.objects.all() serializer_class = DriverStatusSerializer class TractorViewSet(BaseModelViewSet): queryset = Tractor.objects.all() serializer_class = TractorSerializer class TractorDriverViewSet(BaseModelViewSet): queryset = TractorDriver.objects.all() serializer_class = TractorDriverSerializer TractorDriver instance does not have make field. Tractor instance contains make field. I do not understand why it trys to find make field in TractorDriver instance. -
django-websocket-redis development server not working in server
I'm using your lib in so many project, thanks for your serious and robust job. This problem occured on server ubuntu 20.04 We tested with Firefox, and Chrome, and same problem with all navigators. I can't reproduce on my machine, which is a ubuntu 20.04. Disable firewall: no change Adding a setTimeout of 1 sec for Faye client connect on the JS code: no change While transport down message occured in the screenshot, i only see handshake debug message server side. At the moment of the screenshot, we were only 2 using the web application. Server side: dedicated server with python django, latest lib. I would tend that it's NOT a problem with your libs, i'm just trying to find where come this problem. I'd like to know if you got a debug method suggestion, this could be a nice page in the wiki (trouble shooting steps) Do you have any suggestions please ? -
I want to select multiple allowances options on front end it shows me error
i just want to try select a multiple options but the thing is on front end i selected but on back end it shows me error and the data is not passed. i did allowance model manytomanyfield in create contract for select multiple allowances models.py class allowances(models.Model): enName = models.CharField(max_length=200, blank=True, null=True) value = models.FloatField() def __str__(self): return "{}".format(self.enName) class CreateContracts(models.Model): allowance = models.ManyToManyField(allowances) def __str__(self): return "{}".format(self.ContractsReference) views.py def savecontract(request): allowance = request.POST['allowance'] if cid == "": CreateContracts.objects.create(allowance=allowance) res = {"status": "success"} return JsonResponse(res) else: contract.allowance = allowance contract.save() res = {"status": "success"} return JsonResponse(res) js function savecontract(){ allowance = $('#allowance').val(); data.append("allowance", allowance) var r = false; $.ajax({ type: 'POST', contentType: "application/json; charset=utf-8", contentType: false, processData: false, url: '/Employee/savecontract/', data: data, async: false, success: function (response) { if(response.status == "success"){ $('#cid').val(response.id) r=true; } else{ swal("Error","Something Went Wrong!","error") } }, error: function () { swal("Error","Something Went Wrong!","error") } }); return r; } }); HTML Template <select class="form-control new-create selectpicker" multiple data-actions-box="true" id="allowance"name="allowance"> {% for d in allowance %} <option value="{{d.id}}">{{d.enName}}</option> {% endfor %} </select> -
How do I get object
Views.py I am trying to get genre id but i got none class IndexView(View): def get(self , request): books = None language = Language.objects.all() genre = Genre.objects.all() print(genre) genre_id = request.GET.get('genre') print(genre_id) language_id = request.GET.get('language') if genre_id: books = Book.get_books_by_genre_id(genre_id) elif language_id: books = Book.get_books_by_language_id(language_id) else: books = Book.objects.all() return render(request , "index.html" , {"all_books":books , 'lan':language , 'gen':genre} ) models.py I made a staticmethod for the get genre id but i failed to get it class Book(models.Model): b_name = models.CharField(max_length=150) b_author = models.CharField(max_length=150) b_genre = models.ForeignKey(Genre ,on_delete=models.CASCADE) b_language = models.ManyToManyField(Language) @staticmethod def get_books_by_genre_id(genre_id): if genre_id: return Book.objects.filter(b_genre = genre_id) else: return Book.objects.all() @staticmethod def get_books_by_language_id(language_id): if language_id: return Book.objects.filter(b_language = language_id) else: return Book.objects.all() I get this in command I am getting this objects but not get id <QuerySet [<Genre: fiction>, <Genre: novel>, <Genre: narrative>, <Genre: non-fiction>]> None Html here is my html code <ul class="list-group"> <h3><b>Languages</b></h3> <a class="list-group-item " href="/">All Books</a> {% for lan in lan %} <a class="list-group-item" href="/?language={{lan.id}}">{{lan.name}}</a> {% endfor %} </ul> <ul class="list-group"> <h3><b>Genre</b></h3> {% for gen in gen %} <a class="list-group-item" href="/?Genre={{gen.id}}">{{gen.book_genre}}</a> {% endfor %} </ul> -
Django Datatable view using POST rather than GET
https://django-datatable-view.readthedocs.io/en/latest/index.html Does anybody know how to use POST requests rather than GET? The issue is the AWS loadbalancer doesnt seem to like the length of URL generated in the GET request (3000 chars) and so i am not able to use on live server (after spending days building and working fine locally). -
django - Upload file to models on existing form
i'm trying to upload a file inside an existing form, the idea is to send a buy request with a transaction receipt attached. i need to upload the input type="file" to receipt on models i tried with forms, but couldn´t get it to work (it gave me an error with amount from models), i think it is because there is a form inside a form... i guess any idea? .html <div> <form action="{%url 'buying' %}" method="post" name="f"> {% csrf_token %} <div class="form-group h1color"> <label for="">USD Amount</label> <input type="number" class="form-control" name="amount" placeholder="$" value={{values.amount}} onchange="cal()" onkeyup="cal()" > </div> <div class="form-group h1color"> <label for="">Price in UF</label> <p><input class="form-control" type="text" name="amount_uf" value="UF 00" readonly="readonly" /></p> </div> <div class="form-group h1color"> <Label for="">Attach Receipt</Label> <input type="file" class="form-control-file border"> </div> <button type="submit" class="btn whitecolor bgcolorgraay" style="width: 100%;">Send</button> </form> </div> models class Transactions(models.Model): STATUS = [ ('pending', 'pending'), ('aproved', 'aproved'), ] amount = models.FloatField() date = models.DateField(default=now) owner = models.ForeignKey(to=User, on_delete=models.CASCADE) category = models.CharField(default='Payment', max_length=255) status = models.CharField(max_length=255, choices=STATUS, default='pending', ) receipt= models.FileField(upload_to='documents/%Y/%m/%d') amount_uf=models.FloatField(default=0) account = models.CharField(default="n/a" , max_length=255) def __str__(self): return str(self.owner) + " | " + self.category + " | " + str(self.date) -
Djnago Pagenation not working for filter and showing all items in every page
I want to display only one item per page but it's displaying all items in every page and just increasing only page numbers after added new item. see the picture: here is my views.py def ShowAuthorNOtifications(request): user = request.user notifications = filters.NotificationFilter( request.GET, queryset=Notifications.objects.all() ).qs paginator = Paginator(notifications, 1) page = request.GET.get('page') try: response = paginator.page(page) except PageNotAnInteger: response = paginator.page(1) except EmptyPage: response = paginator.page(paginator.num_pages) notification_user = Notifications.objects.filter(user=user).count() Notifications.objects.filter(user=user, is_seen=False).update(is_seen=True) template_name ='blog/author_notifications.html' context = { 'notifications': notifications, 'notification_user':notification_user, 'page_obj':response, } print("##############",context) return render(request,template_name,context) filters.py import django_filters from .models import * class NotificationFilter(django_filters.FilterSet): class Meta: model = Notifications fields = ['notification_type'] models.py: NOTIFICATION_TYPES = (('New Comment','New Comment'),('Comment Approved','Comment Approved') notification_type = models.CharField(choices=NOTIFICATION_TYPES,max_length=250,default="New Comment") html {% for notification in notifications %} {% if notification.notification_type == "New Comment" %} #my code...... {%endif%} {%endfor%} first I tried to use this Function based views pagenations but getting same result. It's just adding page number and showing all items every page. -
How to access Django manage.py from Docker
I am using Django as my Web-Framework. As a database I use PostgresSQL. To start my Postgres Database and the Webserver I use Docker. When I start the server and db with docker-compose up, everything works fine. The database loads properly into Django and I dont get any errors. But when I run for example python3 manange.py makemigrations django throws an error: could not translate host name "db" to address: Name or service not known Where "db" is the name of my postgres database. This is even then when server and database are running on a different window. What I find very weird is that the Database is found when I start with docker. How do I access commands like python3 manage.py [...]? So for example I need to create a superuser and dont know where to create that because if I use the normal python3 manage.py createsuperuser I get the same error as above. The console window from starting docker I also cannot use because there the Django Server runs and just displays the incoming http posts and requests. -
Dynamic queryset in django sitemap
I have more than 100,000,000 page URLs, how can I make the QuerySet be dynamic in the sense that each class will have 10,000 unique URLs without manually creating the integers in 10,000 classes? # sitemap.py account_ from django.contrib.sitemaps import Sitemap from django.shortcuts import reverse from appname.models import Page import datetime from appname.sitemaps import Page000001 from appname.sitemaps import Page000002 ps_dict_01 = { "ps_file_000001": Page000001, "ps_file_000002": Page000002, { class Page000001(Sitemap): def items(self): return Passage.objects.all()[:10000] lastmod = datetime.datetime.now() changefreq = 'hourly' priority = 1.0 protocol = 'http' class Page000002(Sitemap): def items(self): return Passage.objects.all()[10000:20000] lastmod = datetime.datetime.now() changefreq = 'hourly' priority = 1.0 protocol = 'http' -
How to define a 'IsOwner' custom permission for a many-to-many field in Django rest framework?
I'm very new in Django especially in Django-rest-framework. So in this project exercise of mine. And I want to have an object level permission, a IsOwner custom permission where authors are the only one who can modify it. My Model looks like this: #imports class Book(models.Model): title = models.CharField(max_length=100) description = models.CharField(max_length=400) publisher = models.CharField(max_length=400) release_date = models.DateField() authors = models.ManyToManyField('Author', related_name='authors', blank=True) def __str__(self): return self.title class Author(models.Model): user= models.ForeignKey( User, on_delete=models.CASCADE, default=1) biography = models.TextField() date_of_birth = models.DateField() #books = models.ManyToManyField('Book', related_name='authors', blank=True) def __str__(self): return self.user.username And this is the serializers #imports here class BookSerializer(serializers.ModelSerializer): class Meta: ordering = ['-id'] model = Book fields = ("id", "title", "description", "publisher", "release_date", "authors") extra_kwargs = {'authors': {'required': False}} class AuthorSerializer(serializers.ModelSerializer): books = BookSerializer(many=True, read_only=True) class Meta: ordering = ['-id'] model = Author fields = ("id", "user", "biography", "date_of_birth", "books") extra_kwargs = {'books': {'required': False}} and views.py is like this: #imports here class IsAnAuthor(BasePermission): message = 'Editing book is restricted to the authors only.' def has_object_permission(self, request, view, obj): if request.method in SAFE_METHODS: return True # I need to filter who can only edit book in this part but # obj.authors when print is none return obj.authors == request.user class … -
the "Select all" header checkbox in django 2.7.6 version?
How to get header checkbox in python version 2.7.6? -
how to filter based on created an object for froingkey django
i have two models (tables) Ticketing and Cancel class Ticketing(models.Model): a= models.CharField(max_length=40) b = models.DecimalField(max_digits=10,decimal_places=2) #others class Cancel(models.Model): ticket = models.ForeignKey(Ticketing,on_delete=models.CASCADE) #others views.py , i have to make a query to show all active Ticketing Ticketing.objects.filter()#how to filter all objects which `cancel` not created for thank you , i know make a boolean field then whenver cancel created BooleanField in Ticketing will be False , but i dont want to use it , is it possible please ?!