Re: I have one doubt

2021-04-30 Thread Arpana Mehta
Can you share the error stack in more detail? Or a screenshot? On Thu, 29 Apr 2021, 19:53 Bheemanagowda S Gowdra, wrote: > I am knew to Django > > I am getting below warning > > unresolved import 'django.contrib' > > -- > You received this message because you are subscribed to the Google Groups

API to stop/resume/terminate a long running task

2020-10-12 Thread Arpana Mehta
Hello everybody, I am here looking for a solution to a problem commonly faced maybe. I have like a huge amount of data that is being uploaded in a go. While I can keep these upload tasks under atomic decorators to avoid systemic failure but I don't have way to let the user stop the task and

Re: How to consume DJango Rest Api with DJango?

2020-10-04 Thread Arpana Mehta
You can googlle about `mixin` classes in Django CreateUpdateRetrieve mixins class along with your template or API view. On Thu, 1 Oct 2020, 05:10 Stalin Vladimir Gomez Gutierrez, < stanleyni...@gmail.com> wrote: > I am trying to consume a django api with django itself. Should I use class >

Re: Calculated feild in models

2020-09-19 Thread Arpana Mehta
You can use @property On Sat, 19 Sep 2020, 20:45 eankomah, wrote: > I have two fields: > quantity = models.FloatField() > unit_price = models.FloatField() > > and i want ot do someting like this > > > total_price = models.FloatField('unit_price' * 'quantity') > > Thanks > > -- > You

Re: Error configuring URLs for a beginner

2020-08-31 Thread Arpana Mehta
Do you have a *urls.py* in your 'app' folder? (And app is a reserved keyword, it would be better if you use some other name to avoid confusion even later ) On Tue, 1 Sep 2020 at 04:29, Manal Helal wrote: > Hi > > I am using Django to the first time and followed the tutorial in: >

Re: URL configuration error for a beginner

2020-08-31 Thread Arpana Mehta
You need to replace apps.url with the name of the app ( which you might have created using python manage.py startapp and have a urls.py file in that app folder) In the tutorial also, they first create an app 'polls' and then include 'polls.url' It would be easier to solve your problem if you

Re: URGENT ---- Third party API integration basics

2020-08-21 Thread Arpana Mehta
key. >>> >>> I just want to know the basic steps of where to add the key and ID in >>> settings file so I can access that API from my app in django-project. >>> >>> *It's kind of urgent. Any help will be appreciated.* >>> Many thanks, >>&

URGENT ---- Third party API integration basics

2020-08-21 Thread Arpana Mehta
of urgent. Any help will be appreciated.* Many thanks, Arpana Mehta -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.co

Re: Why Django ValidationError not raising error?

2020-08-20 Thread Arpana Mehta
You can try forming.is_valid(raise_exception=True) On Thu, 20 Aug 2020 at 19:29, Ahmed Yasin wrote: > > Well I believe you are more expert and experienced personality than me. I > am having an error and i am using django 3.0.3 and python 3.8.5 and VS code > as an IDE. I am using

Re: Invalid syntax on line 16 of manage.py

2020-07-20 Thread Arpana Mehta
Creating a virtual environment and then working might solve this issue. On Mon, 20 Jul 2020 at 15:28, Douglas Ii wrote: > While following the tutorial for creating your first Django app, I run > into a problem when entering the command line "python manage.py runserver" > into my terminal. I am

Using primary key to update via POST request.

2020-07-19 Thread Arpana Mehta
do I use the pk received in GET? Thanks and regards, Arpana Mehta -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@google

Re: how to give permission to a logged in specific user in a list of users profile

2020-07-05 Thread Arpana Mehta
https://www.django-rest-framework.org/tutorial/4-authentication-and-permissions/ [image: Screenshot from 2020-07-06 03-15-34.png] On Mon, 6 Jul 2020 at 03:13, Arpana Mehta wrote: > You can user permission classes in your code. Or decorators before the > function view you want to be only v

Re: how to give permission to a logged in specific user in a list of users profile

2020-07-05 Thread Arpana Mehta
You can user permission classes in your code. Or decorators before the function view you want to be only visible to logged in users. from django.contrib.auth.decorators import login_required @login_required def your_view_here(request): On Mon, 6 Jul 2020 at 01:28, Exactly musty wrote: >

Re: Custom-DRF-Response

2020-07-04 Thread Arpana Mehta
You can use a function which returns Response({'status': 'SUCCESS'}) On Sat, 4 Jul 2020, 03:24 Ronaldo Mata, wrote: > Hi Guys > > Somebody can help me? > > I want to create a custom response with the follow format: > > { > "status": true, > "message": "Any message", > "data": []} > > >

Re: django.db.utils.ProgrammingError: relation "ops_sightseeing" already exists

2020-06-29 Thread Arpana Mehta
nd which one is it ? > > Normally when you use multiple databases, the routers could also cause > the problem > > Without knowing all this and the code, it might be difficult to take a > decision > > Regds > > Sent from my iPhone > > On Jun 29, 2020, at 11:17 PM, Arpana

Re: django.db.utils.ProgrammingError: relation "ops_sightseeing" already exists

2020-06-29 Thread Arpana Mehta
This is because those tables exist in your database probably. And thus when you migrate it is showing error. On Mon, 29 Jun 2020, 19:42 rishi kalsi, wrote: > Hi, > > I am very new to Django or to web programming. > Somehow i have learnt from Django documentation to create models. > >

using serializers with POST requests

2020-06-24 Thread Arpana Mehta
https://stackoverflow.com/questions/62561906/django-adding-a-new-row-in-a-table-based-on-a-foreign-key-value-using-serializ Please visit this link!! I have posted my question with details there. It's super urgent. -- You received this message because you are subscribed to the Google Groups