Re: MultipleObjectsReturned: get() returned more than one Site -- it returned 2!

2019-09-05 Thread Tosin Ayoola
A screenshot will do a lot of help, this is really terrible I can't read or interpret it & u not saying Wat u intend on archiving On Sep 5, 2019 23:02, "gh" wrote: > Traceback (most recent call last): >File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site- >

Re: MultipleObjectsReturned: get() returned more than one Site -- it returned 2!

2019-09-05 Thread Simon Charette
It's hard to tell what's wrong from the limited context you provided but whatever code is in django_sites_extensions is highly suspicious. Best, Simon Le jeudi 5 septembre 2019 18:02:49 UTC-4, gh a écrit : > > Traceback (most recent call last): >File >

Creating a new product model with a twist of course

2019-09-05 Thread John McClain
I have a requirement to generate a new item each time a like item is purchased in my marketplace For example My system sells 2 items exclusively When a buyer buys one of the items I need the system to duplicate the item so that it can be sold in the marketplace again. This cannot be managed

MultipleObjectsReturned: get() returned more than one Site -- it returned 2!

2019-09-05 Thread gh
Traceback (most recent call last): File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 108, in get_response response = middleware_method(request) File

Re: How can i share one Database Sqlite between 2 app on pythonanywhere -. Should I prefer postgresql or MySQL - Security

2019-09-05 Thread Amirhosein Rajabi
I enumerate your questions and answer them in order. For the first one, yes, you can have DB using Postgres, but for configurations you have to refer to databases tab in your PythonAnyWhere account. Also you can use PythonAnyWhere help for setting up databases. (Note1: For Postgresql, you need

Re: How can i share one Database Sqlite between 2 app on pythonanywhere -. Should I prefer postgresql or MySQL - Security

2019-09-05 Thread Balaji Shetty
Thanks for your reply. I hosted on pythonAnywhere. Is it possible for postgresql. Should I prefer postgresql or MySQL regarding security issues . Can you please tell me how to achieve in MySQL. Also how can I backup daily data of server on my local machine . Can any DB also provide front-end

how to display retrieved data from database using django

2019-09-05 Thread leb dev
i have a django project that is connected to SQL Server i tried to retrieve data from the database. if i try to display all the data it run correct and display all the values. but if i try to display the data in an **html table** it doesn't display anything. views.py === def

Re: Regarding to nested serilizers

2019-09-05 Thread RONAK JAIN
Yes, I am sure about it when I am doing in admin panel I am getting my data.. On Thu, Sep 5, 2019 at 10:26 PM Ronit Mishra wrote: > If you see your output, you're getting empty salaries, you're just not > getting to edit them in the form beneath it since they're read only fields. > Are you sure

Re: Regarding to nested serilizers

2019-09-05 Thread Ronit Mishra
If you see your output, you're getting empty salaries, you're just not getting to edit them in the form beneath it since they're read only fields. Are you sure you've data for your salary model? On Thu, Sep 5, 2019 at 1:41 PM RONAK JAIN wrote: > please check it output also... > > On Thu, Sep 5,

Re: Django-filter customization for rest api

2019-09-05 Thread Nishant Bhanushali
I have an doubt.. There are many field types and many other field option. How can we make it On Thu, Sep 5, 2019, 18:56 Abhineet Baranwal wrote: > When we pass fields in Meta class for custom filter then django-filter > adds 'and' in-between the fields .how to add 'or' operator in between > the

Re: How can i share one Database Sqlite between 2 app on pythonanywhere

2019-09-05 Thread Amirhosein Rajabi
I have shared a MySQL database even between two accounts in PythonAnyWhere. But I think there is no possible way for local DBs. If you can access the app1 files from the app2 or otherwise, you may be able to change settings.py for that db.sqlite path. On Wednesday, September 4, 2019 at 9:40:39

Query into Django ORM

2019-09-05 Thread Amit Samanta
Hi, I am facing a challenge please help me. [image: Query.PNG] output: [image: output.PNG] Here one env_name can have many comp name and one env with one comp_name there will be many deploy_details which is in green colour (latest). in deploy_detail if there is two deploy in one component

Django-filter customization for rest api

2019-09-05 Thread Abhineet Baranwal
When we pass fields in Meta class for custom filter then django-filter adds 'and' in-between the fields .how to add 'or' operator in between the fields.please explain with an example for rest api. -- You received this message because you are subscribed to the Google Groups "Django users"

Re: PLS Help Me in Securing Project - Application on PythonAnyWhere hosted

2019-09-05 Thread Rahul Roshan
You can go through below links: https://docs.djangoproject.com/en/2.2/topics/security/ https://opensource.com/article/18/1/10-tips-making-django-admin-more-secure https://coffeeonthekeyboard.com/best-basic-security-practices-especially-with-django-697/

How to change the Change permission for superuser editing form to view only?

2019-09-05 Thread Pema Galey
Hi All, How can I change the Change permission for Superuser editing form to view only for my log file? *By default, Django allowed superuser change form in editable But I don't want to allow superuser to edit the log files view.* Someone help me to change the editable form to view only form in

Re: Weird django.urls.exceptions.NoReverseMatch: 'review' is not a registered namespace

2019-09-05 Thread Pasquale
On 04/09/19 10:24, Julien Enselme wrote: > Did you do the reverse with 'reviews:detail'? >>> reverse("review:detail")   Traceback

Re: Weird django.urls.exceptions.NoReverseMatch: 'review' is not a registered namespace

2019-09-05 Thread Pasquale
On 04/09/19 10:24, Julien Enselme wrote: > Did you do the reverse with 'reviews:detail'? >>> reverse("review:detail")   Traceback

Re: Regarding to nested serilizers

2019-09-05 Thread RONAK JAIN
please check it output also... On Thu, Sep 5, 2019 at 1:39 PM RONAK JAIN wrote: > I am getting same issue... > > > Thanks > > On Wed, Sep 4, 2019 at 7:49 PM Ronit Mishra > wrote: > >> Hey RJ, >> >> All your views have the same name, that is probably the reason you're not >> able to view the

lookup error at router

2019-09-05 Thread shubham joshi
I my users api - > https://github.com/shubham1507/school/blob/trial/users/urls.py *HTTP 200 OK**Allow:* GET, HEAD, OPTIONS*Content-Type:* application/json*Vary:* Accept { "teacher": "http://127.0.0.1:8000/users/teacher/;, "student": "http://127.0.0.1:8000/users/student/"} whenever I

Re: Please help me in views.py

2019-09-05 Thread Amit Samanta
Hi everybody thank you for helping me throughout... lastly do anyone know how to group by in django orm or if i give a db query can anyone help me in changing it to django orm?? please Thank you in advance Amit Samanta On Wed, 4 Sep, 2019, 7:50 PM Amit Samanta, wrote: > Its done now.. thank

Re: ForeignKey value while querying the model object

2019-09-05 Thread Jay Vasant
Please reply with your models schema. On Thu, Sep 5, 2019 at 7:56 AM dev wrote: > Hi All, > > How to get the ForeignKey value while querying the model object. > > > > I was trying to query a model object "mla" to fetch a specific sets of > columns and its working fine but the field ForeignKey