Weird caching issue with database query

2020-09-04 Thread Michael Jensen
I have a page that shows a grid of items and dates associated with that. I am using a JOIN query to get the data, but it appears to be cached or delayed somehow. When I query the database directly I can see the data has been updated, but on my page when I refresh it still doesn't show

Re: Can Anyone suggest on Snowflake database connection using Django?

2020-08-31 Thread Himanshu Shekhar Mohapatra
Hi everyone, I am also searching for a solution for this. Please Help Thanks On Tuesday, October 29, 2019 at 5:41:16 PM UTC+5:30 Avinash Gaurav wrote: > Hi All, > I am trying to create an engine in settings.py of django app to connect to > snowflake database, > but not able to

Django access the Default database (prod/dev) when testing and Fatal Error

2020-08-13 Thread Carlos Leite
50) class Musica(models.Model): disco = models.ForeignKey(Disco, on_delete=models.CASCADE) nome = models.CharField('nome do disco', max_length=50) # forms.py # class MusicForm(forms.Form): ''' ... like a search form, I need option from database

Re: How to populate fields generated by modelformset_factory with data from database

2020-08-08 Thread Integr@te System
Hi Micheal, https://docs.djangoproject.com/en/3.0/topics/forms/formsets/ You see in doc with example such as custom queryset, initial data get from existed instances all base on your design and codebase. On Sat, Aug 8, 2020, 10:48 PM Michael Klassen wrote: > Hi, thank you for your response b

Re: How to populate fields generated by modelformset_factory with data from database

2020-08-08 Thread Michael Klassen
Hi, thank you for your response but I need some more specifics. My queryset includes the questions which the form presents to the user. How do I get their responses included in the queryset? Do I have to somehow join tables to get both questions and responses? If I follow the relationships

Re: How to populate fields generated by modelformset_factory with data from database

2020-08-07 Thread Integr@te System
Hi Michael, You can read queryset combine with model in modelformset_factory() method to get exact user and/or any fields you need as existed instance or base on cookies or sth like that to identify your user, depend on your use case(ex trigger events or choose one option...). Hope it helpful.

How to populate fields generated by modelformset_factory with data from database

2020-08-07 Thread Michael Klassen
Hello: I am using modelformset_factory to generate my form based on a model. If the user submits a page, then returns to it later, I would like to populate the fields with what they previously answered. I can only find examples of pre-populated fields with the extra forms; is there a way to d

Re: Django modelformset is_valid method retrieves entire model from database

2020-07-30 Thread Shaheed Haque
y_form caused my filtering to be skipped. The effect was similar to yours, returning every possible object for each field in the form not only hammering the database, but the browser/renderer too. I *think* that if I had been able to use limit_choices_to <https://docs.djangoproject.com/en/3.

Re: Django modelformset is_valid method retrieves entire model from database

2020-07-29 Thread Abdulrahman Alahaideb
UTC+3, Abdulrahman Alahaideb wrote: > > I have a modelformset when is_valid method is called the entire model > objects of the underlying form is retrieved from the database which is not > efficient if the database table contains hundred of thousands records, I > believe Django was not

Re: Django MySQL database backup and restore to new server

2020-07-28 Thread mcaay
ango.contrib.contenttypes.models import ContentType > -- >> ContentType.objects.all().delete() > -- >> quit() > - sftp db.json file to new server web project directory > - python manage.py loaddata db.json > > > On Monday, May 4, 2020 at 4:53:29 PM UTC-5, marc bellazzini wrote: >>

Re: BEST DATABASE REPLICATION AND SYNCHRONIZATION TOOL

2020-07-23 Thread Sunday Iyanu Ajayi
gt; (+234) 806 771 5394 > *sunnexaj...@gmail.com * > > > > On Thu, Jul 23, 2020 at 12:31 PM m1chael wrote: > >> I believe that would be barman. >> >> On Thu, Jul 23, 2020 at 7:26 AM Sunday Iyanu Ajayi >> wrote: >> >>> Hi guys, >>>

Re: BEST DATABASE REPLICATION AND SYNCHRONIZATION TOOL

2020-07-23 Thread Sunday Iyanu Ajayi
gt;> Please I need recommendation on the best mssql to postgres database >> replication and synchronziation tool ( especially linux OS enabled) >> >> >> Thank you. >> >> *AJAYI Sunday * >> (+234) 806 771 5394 >> *sunnexaj...@gmail.com * >>

Re: BEST DATABASE REPLICATION AND SYNCHRONIZATION TOOL

2020-07-23 Thread m1chael
I believe that would be barman. On Thu, Jul 23, 2020 at 7:26 AM Sunday Iyanu Ajayi wrote: > Hi guys, > > > Please I need recommendation on the best mssql to postgres database > replication and synchronziation tool ( especially linux OS enabled) > > > Thank you. > >

BEST DATABASE REPLICATION AND SYNCHRONIZATION TOOL

2020-07-23 Thread Sunday Iyanu Ajayi
Hi guys, Please I need recommendation on the best mssql to postgres database replication and synchronziation tool ( especially linux OS enabled) Thank you. *AJAYI Sunday * (+234) 806 771 5394 *sunnexaj...@gmail.com * -- You received this message because you are subscribed to the Google

Re: Heroku database migration

2020-07-20 Thread Karan Sahu
x27; in existing app 'existing_app' on Django, >> Entered commands manage.py makemigrations and manage.py migrate it >> migrated changes to local database. >> Tried to apply same on heroku but its not working there. I then tried to >> setup heroku database in local se

Re: Heroku database migration

2020-07-20 Thread John McClain
e.py migrate it > migrated changes to local database. > Tried to apply same on heroku but its not working there. I then tried to > setup heroku database in local settings.py of project and migrations worked > but it shown some well known error, I have attached the output with this > discu

Re: Intensive access and modification of database table

2020-07-19 Thread Derek
"unavailable" if the > quantity drop to zero. > - However, the effective "avail_qty" is only updated permanently in the > database if and only if the client checks out and pays. > > For small eCommerce sites, updating the database frequently is not a

Re: Heroku database migration

2020-07-19 Thread Ayser shuhaib
terminal run "python manage.py migrate" > > > On Sunday, July 19, 2020 at 10:18:18 PM UTC+5:30, Aman Mandloi wrote: >> >> Added a small model 'new_model' in existing app 'existing_app' on Django, >> Entered commands manage.py makemigrations and

Re: Heroku database migration

2020-07-19 Thread Heet Gupta
ate" On Sunday, July 19, 2020 at 10:18:18 PM UTC+5:30, Aman Mandloi wrote: > > Added a small model 'new_model' in existing app 'existing_app' on Django, > Entered commands manage.py makemigrations and manage.py migrate it > migrated changes to local database

Re: Heroku database migration

2020-07-19 Thread Joakim Hove
bash% heroku run python. /manage.py migrate søn. 19. jul. 2020, 18:48 skrev Aman Mandloi : > Added a small model 'new_model' in existing app 'existing_app' on Django, > Entered commands manage.py makemigrations and manage.py migrate it > migrated changes to local da

Re: Invalid SQL : - Re: Query Optimization (Huge Data in the Database)

2020-07-19 Thread Roger Gammans
Thank you for that fascinating excursion. On Sun, 2020-07-19 at 07:48 -0700, karthik challa wrote: > Hi Roger, > > I have fetched this query from the Django Debug tool bar. I am using > POSTGRES database and Django 2.2.3 version. > > I am able to fetch the records which i require

Re: Query Optimization (Huge Data in the Database)

2020-07-19 Thread karthik challa
Thank you Damanjeet On Sunday, July 19, 2020 at 3:32:02 AM UTC-4, Damanjeet Singh wrote: > > Hello , > > Prefetch_related can be helpful, see doc > > > > https://docs.djangoproject.com/en/3.0/ref/models/querysets/#prefetch-related > > Regards, > Damanjeet > > > > On Sun, 19 Jul 2020, 04:39 karthi

Re: Invalid SQL : - Re: Query Optimization (Huge Data in the Database)

2020-07-19 Thread karthik challa
Hi Roger, I have fetched this query from the Django Debug tool bar. I am using POSTGRES database and Django 2.2.3 version. I am able to fetch the records which i require but the issue is with the performance the django query set or the query which i am making. Thanks & Regards, karthik

Re: Intensive access and modification of database table

2020-07-19 Thread Tran Trong Tri
clients access the product concurrently, add it to >> their shopping cart. >> - The site needs to manage the contemporary available quantity, >> "avail_qty", and all times. And switch the product to "unavailable" if the >> quantity drop to zero. >>

Re: Intensive access and modification of database table

2020-07-19 Thread Aldian Fazrihady
es. And switch the product to "unavailable" if the > quantity drop to zero. > - However, the effective "avail_qty" is only updated permanently in the > database if and only if the client checks out and pays. > > For small eCommerce sites, updating the database freque

Intensive access and modification of database table

2020-07-19 Thread tristant
ently, add it to their shopping cart. - The site needs to manage the contemporary available quantity, "avail_qty", and all times. And switch the product to "unavailable" if the quantity drop to zero. - However, the effective "avail_qty" is only updated permanently in

Invalid SQL : - Re: Query Optimization (Huge Data in the Database)

2020-07-19 Thread Roger Gammans
Hi Just a side issue I spotted here, but I'm probably missing something, so I'm seeking to understand. Is this the SQL the django query builder made? If so which database backend and django version are you using? On Sun, 2020-07-19 at 08:30 +0100, Damanjeet Singh wrote: >

Re: Query Optimization (Huge Data in the Database)

2020-07-19 Thread Damanjeet Singh
Hello , Prefetch_related can be helpful, see doc https://docs.djangoproject.com/en/3.0/ref/models/querysets/#prefetch-related Regards, Damanjeet On Sun, 19 Jul 2020, 04:39 karthik challa, wrote: > Hi Experts, > > I am trying to execute the below query and the query is taking more than 5 >

Query Optimization (Huge Data in the Database)

2020-07-18 Thread karthik challa
Hi Experts, I am trying to execute the below query and the query is taking more than 5 minutes. Here are the details Model.py class Url(models.Model): subdomain = models.ForeignKey(Subdomain, null=True, blank=True, related_name='url_subdomain', on_delete=models.SET_NULL,db_index=True) full_

Please help I want to list down all the users with the sharewith from the frontend in backend I used Many to Many field and also my data is not getting into database

2020-07-16 Thread mick
views.py def notesadd(request): form = NoteForm(request.POST or None) if form.is_valid(): form.save() form=NoteForm() context = { 'form': form } print('submitted') return render(request, 'notes.html', context) models.py class Notes(mode

django.db.migrations.exceptions.InconsistentMigrationHistory: Migration chat.0001_initial is applied before its dependency account.0045_auto_20200618_1121 on database 'default'.

2020-07-10 Thread Minh Giang Hoàng
I'm encountering this problem for the first time. The order of the application for the files are correct (account before chat). Is there anyone willing to help? :) -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this grou

Re: Need Covid 19 Database for Experiments

2020-07-04 Thread Aldian Fazrihady
countries_and_territories LIKE '%America%' AND date > '2020-03-01' ORDER BY date DESC ``` On Fri, Jul 3, 2020 at 12:38 AM Balaji Shetty wrote: > Hi > > Can anyone provide me Covid 19 Database. > I need Covid 19 Database for Experiments > > Thank you >

Re: Need Covid 19 Database for Experiments

2020-07-04 Thread Luciano Martins
Hello, you have an excellent job done by devs and Brazilian journalists... https://brasil.io/covid19/ Em quinta-feira, 2 de julho de 2020 14:38:51 UTC-3, Balaji escreveu: > > Hi > > Can anyone provide me Covid 19 Database. > I need Covid 19 Database for Experiments > > Than

Re: Need Covid 19 Database for Experiments

2020-07-03 Thread Mohsen Pahlevanzadeh
: >> >> Hi >> >> Can anyone provide me Covid 19 Database. >> I need Covid 19 Database for Experiments >> >> Thank you >> >> >> -- >> Mr Shetty Balaji >> Asst. Prof. >> IT Department >> SGGS I&T >> Nanded.

Re: Need Covid 19 Database for Experiments

2020-07-03 Thread Shubham Garg
Hi Balaji, You can get COVID-19 dataset from kaggle.com Let me know if you have any questions. Thanks, On Thu, Jul 2, 2020 at 11:07 PM Balaji Shetty wrote: > Hi > > Can anyone provide me Covid 19 Database. > I need Covid 19 Database for Experiments > > Thank you > >

Re: Need Covid 19 Database for Experiments

2020-07-02 Thread carlos
;> >> Can anyone provide me Covid 19 Database. >> I need Covid 19 Database for Experiments >> >> Thank you >> >> >> -- >> Mr Shetty Balaji >> Asst. Prof. >> IT Department >> SGGS I&T >> Nanded. My. India >> &

Re: Need Covid 19 Database for Experiments

2020-07-02 Thread mohamed khaled
go to Kaggle website you will see or IEEE On Thu, 2 Jul 2020 at 19:38, Balaji Shetty wrote: > Hi > > Can anyone provide me Covid 19 Database. > I need Covid 19 Database for Experiments > > Thank you > > > -- > Mr Shetty Balaji > Asst. Prof. > IT Depar

Need Covid 19 Database for Experiments

2020-07-02 Thread Balaji Shetty
Hi Can anyone provide me Covid 19 Database. I need Covid 19 Database for Experiments Thank you -- Mr Shetty Balaji Asst. Prof. IT Department SGGS I&T Nanded. My. India -- You received this message because you are subscribed to the Google Groups "Django users" group. To un

call the model of the secondary database in djnago using Multiple Databases

2020-06-30 Thread Pradyum Gupta
https://stackoverflow.com/q/62658396/7999665 -- 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.com. To view this discussion o

Error in Connecting Multiple Database Django ( 'DatabaseOperations' object has no attribute 'geo_db_type' )

2020-06-29 Thread Pradyum Gupta
Hi, Can anyone please sort the issue. https://stackoverflow.com/q/62630722/7999665 Regards Pradyum -- 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-user

Error in Connecting Multiple Database Django ( 'DatabaseOperations' object has no attribute 'geo_db_type' )

2020-06-29 Thread Pradyum Gupta
', 'ENGINE' : 'django.db.backends.postgresql_psycopg2', 'HOST' : '', 'PORT' : '', 'USER' : 'user_name_2', 'PASSWORD' : '', }, # 'users_db'

Re: Performing raw sql queries in database

2020-06-26 Thread Cbh Bnh
Hi, Perhaps this could help you: I had to find how many versions of each "edge" object without using a db version column So basically for this kind of dataset: ''' | ID | edge_id | geom | ++=+===+ | 1 | 22 | y | | 2 | 22

Performing raw sql queries in database

2020-06-25 Thread tejas joshi
Hi, I want to return the first occurrence of repetitive fields in my model. I have a title field in my model as follows : models.py class Post(models.Model): title = models.CharField(max_length=20) There will be multiple 'Post' with the same title. I want to exectute the following query on the P

Re: Question on migrations vs postgres database

2020-06-21 Thread Mike Dewhirst
On 22/06/2020 8:04 am, Ram wrote:   self.cursor.execute("DELETE from django_migrations WHERE app = %s", % app) There should not be a comma in that line -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop r

Re: Question on migrations vs postgres database

2020-06-21 Thread Ram
velopment server in the past. The application was >>> working fine in the past. Now we merged our new features into the same >>> repository which has new models in our models.py. When we merged the >>> changes into the development server, we tried running these commands >>&

Re: Question on migrations vs postgres database

2020-06-14 Thread Ram
manage.py migrate >>> < no migrations to apply > >>> 3. python3 manage.py reset_migrations >>> < all the migrations are created fine including new tables > >>> >> >> But the issue is Postgres database does not show 2 of those new tables

Re: Question on migrations vs postgres database

2020-06-12 Thread Integr@te System
mmands > > 1. python3 manage.py makemigrations >> < no changes detected > >> 2. python3 manage.py migrate >> < no migrations to apply > >> 3. python3 manage.py reset_migrations >> < all the migrations are created fine including new tables > >

Question on migrations vs postgres database

2020-06-12 Thread Ram
tables > > But the issue is Postgres database does not show 2 of those new tables and we are not able to find any clue in the postgres database logs other than these log lines. 2020-06-13 02:48:34.627 UTC [7463] vxxx@v ERROR: relation > "pages_rim_classifieds_messages"

Re: Quick way to set up a faceted search/database using Django?

2020-06-07 Thread nei...@nein09.com
Ari, If I were going to do this in Django, I think what I’d do is have a database table with the things you mention in it like ‘link’, ’title’, etc, and a ManyToManyField to a tags table or a “sections” table - “sections” being the “what is happening” /“who is working on this” things you

Re: Quick way to set up a faceted search/database using Django?

2020-06-07 Thread Cam
cms page) and edit the thing manually, > maintaining a host of links to the different sections and maybe even > repeating information so that people could find it in different > sections, etc. > > This is a basic database/facets question, I think. What is the > easiest way to put toget

Quick way to set up a faceted search/database using Django?

2020-06-07 Thread Ari Davidow
repeating information so that people could find it in different sections, etc. This is a basic database/facets question, I think. What is the easiest way to put together a database noting a few common things (link field, title, description, tags) and then put together something that helps people c

Re: Deciding on Database

2020-06-06 Thread Alexander Alemayhu
like you don’t really need a database but rather a content management system for easily writing / editing the documentation. Useful links https://www.staticgen.com https://headlesscms.org On Fri, 5 Jun 2020 at 02:00, RLM wrote: > Hello > > I am a 25 year python dev working with Flask a

Re: Deciding on Database

2020-06-04 Thread RLM
with different chapters and sections. And the right side will be the content. What I am trying to figure out is instead of doing a hardcoded HTML css static file, use the database to create a html file . What do you think is the best way to go about ir. I thought about it a lot and the problems

Re: Can we use Database with Django without creating models

2020-05-25 Thread Dylan Reinhold
Inspectdb is the way to go. Nothing is stopping you from just running sql queries though your DB python package like mysql-connector. You will loose much of the extras django provides with using the django-orm like admin connections to your database. Maybe flask would suit your use case better

Re: Can we use Database with Django without creating models

2020-05-25 Thread _M_A_Y_A_N_K_
Adding more details... I did tried *inspectdb, *but having other different issues with this. Here i want to purely use the legacy / existing database. Thanks & Regards, - Mayank Tripathi Mo. +1 615 962 2128 "Do what you can, with what you have, where you are -by

Can we use Database with Django without creating models

2020-05-25 Thread Mayank Tripathi
Hi Team, I am trying to get options to connect to Database from Python-Django App. But here the requirement is I already have a Database setup (MySQL) with all required tables and fields. So am not willing to use models.py and create tables. Is there a way still i can use the tables... and still

Re: Database audit fields in Django

2020-05-24 Thread Derek
om/jjkester/django-auditlog I'd look at those before considering writing any code yourself. On Friday, 22 May 2020 23:40:02 UTC+2, Sujata Aghor wrote: > > I am looking to create a database audit fields such as 'created by' , ' > modified by', 'created on time&

Re: Database audit fields in Django

2020-05-22 Thread Sebastian Jung
current User... When you have further questions please wrote me Regards Sujata Aghor schrieb am Fr., 22. Mai 2020, 23:39: > I am looking to create a database audit fields such as 'created by' , ' > modified by', 'created on time', ' modified on time' a

Re: Database audit fields in Django

2020-05-22 Thread Gabriel Araya Garcia
You can see it in ADMIN tables of Django Gabriel Araya Garcia GMI - Desarrollo de Sistemas Informáticos 99.7721.15.70 El vie., 22 may. 2020 a las 17:39, Sujata Aghor () escribió: > I am looking to create a database audit fields such as 'created by' , ' > modified

Database audit fields in Django

2020-05-22 Thread Sujata Aghor
I am looking to create a database audit fields such as 'created by' , ' modified by', 'created on time', ' modified on time' and Archive table where i can see the changes over the time about perticular row. this was possible in web2py automatically. Do

Re: CouchDB as Django backend database

2020-05-19 Thread Akshat Zala
You can refer to the link below: 1. https://stackoverflow.com/a/50521563/4511992 On Friday, 15 May 2020 19:46:52 UTC+5:30, Gopesh Shriwas wrote: > > Hi All, > > Can anybody help me on using couchdb as a django backend database. I went > though with multiple options available

How to load content dynamically from database into Bootstrap modal using Django

2020-05-15 Thread Benedict Uwazie
I am working on a testing app that lists out users from the database in a HTML table, what I want to achieve is this, when you click on any icon for a particular record or row the full detail of that record is displayed in a Bootstrap Modal. My problem is how do I implement my views, urls, and

CouchDB as Django backend database

2020-05-15 Thread Gopesh Shriwas
Hi All, Can anybody help me on using couchdb as a django backend database. I went though with multiple options available on the internet like django-couchbase , django-cbtools but didn't find suitable with python3.x and django3.x. python-cloudant looks fine to be used as standard c

Re: Inserting data from a text file is not working for Postgres database

2020-05-14 Thread ABHIJIT PATKAR
Try to give complete path of file and try again Thank you, Abhijit On Thu, 14 May, 2020, 10:27 AM Ram, wrote: > Hi, > > We are trying to insert the data from a text file ' > *some_category_list.txt*'' into a table in Postgres database using the > highlighted quer

Inserting data from a text file is not working for Postgres database

2020-05-13 Thread Ram
Hi, We are trying to insert the data from a text file '*some_category_list.txt*'' into a table in Postgres database using the highlighted query in our functions.py file = open(str(a)+'_category_list.txt', 'r') > file_content = file.read() > print(file

Getting error while importing xls file from django admin panel to csv for storing in database mysql gating error like

2020-05-08 Thread Chirag Patel
Imported file has a wrong encoding: 'charmap' codec can't decode byte 0x8d in position 1774: character maps to -- 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 d

Re: Django MySQL database backup and restore to new server

2020-05-05 Thread marc bellazzini
ango 2.x running on an old Ubuntu server with a MySQL database. I > have installed a new Ubuntu 20.04 server on another machine with Django 3.x > and MySQL. I would like to backup the old Django/mysql database and restore > it on the new server. What is the best practice for doing this? &

Re: Django MySQL database backup and restore to new server

2020-05-05 Thread marc bellazzini
ango 2.x running on an old Ubuntu server with a MySQL database. I > have installed a new Ubuntu 20.04 server on another machine with Django 3.x > and MySQL. I would like to backup the old Django/mysql database and restore > it on the new server. What is the best practice for doing

Django MySQL database backup and restore to new server

2020-05-04 Thread marc bellazzini
Hello, I have Django 2.x running on an old Ubuntu server with a MySQL database. I have installed a new Ubuntu 20.04 server on another machine with Django 3.x and MySQL. I would like to backup the old Django/mysql database and restore it on the new server. What is the best practice for doing

Re: OperationalError at /admin/login/attempt to write a readonly database

2020-05-03 Thread ramadhan ngallen
In short, it happens when the application which writes to the sqlite database does not have write permission. You have to add writing rights to the directory in which your sqlite database is stored. So running chmod 664 /srv/mysite should help. This is a security risk, so better solution is to

Re: OperationalError at /admin/login/attempt to write a readonly database

2020-05-03 Thread Amina Anna Mahamane.O
te to > the file. All other users (except for sudo users, I believe) have read-only > access by default. > > That's what's happening here. When you ran migrations as the currently > logged in user, your user has read and write permissions. Apache, however, > runs

Re: OperationalError at /admin/login/attempt to write a readonly database

2020-05-03 Thread Jorge Gimeno
user, your user has read and write permissions. Apache, however, runs as a different user, so it cannot write to the database. That answer I linked did have some things to try, in addition to a link to more general question about permissions. The file you would need to change permissioins on (since y

Re: OperationalError at /admin/login/attempt to write a readonly database

2020-05-03 Thread Amina Anna Mahamane.O
h but if it is not possible, help me anyway, I will >> manage. >> >> OperationalError at /admin/login/ >> >> attempt to write a readonly database >> Request Method: POST >> Request URL: http://www.djangoproject.localhost/admin/login/?next=/admin/ >

Re: OperationalError at /admin/login/attempt to write a readonly database

2020-05-02 Thread Jorge Gimeno
gent. I wish > someone can answer to me in french but if it is not possible, help me > anyway, I will manage. > > OperationalError at /admin/login/ > > attempt to write a readonly database > > Request Method: POST > Request URL: http://www.djangoproject.localhost/adm

OperationalError at /admin/login/attempt to write a readonly database

2020-05-02 Thread Amina Anna Mahamane.O
, I will manage. OperationalError at /admin/login/ attempt to write a readonly database Request Method: POST Request URL: http://www.djangoproject.localhost/admin/login/?next=/admin/ Django Version: 3.0.5 Exception Type: OperationalError Exception Value: attempt to write a readonly data

Re: The database backend does not accept 0 as a value for AutoField.

2020-04-29 Thread Mayur Bagul
el returns username as string autofield so >> what shall i put as default their? >> i tried to put None for default value but while migrating it giving same >> error :-- >> >> line 192, in validate_autopk_value >> raise ValueError('The database

database is not working

2020-04-27 Thread Balkrishana Gaur
Dear friends as per django project app mysite/polls After creationnof the database 1st entry was " whats new? ". When i login to the admin site than only question object is available. What can i do. -- You received this message because you are subscribed to the Google Groups &qu

Re: The database backend does not accept 0 as a value for AutoField.

2020-04-26 Thread Divash Singh
lue for each specific field > > Sent from Mail for Windows 10 > > From: Mayur Bagul > Sent: Sunday, 26 April 2020 18:39 > To: Django users > Subject: Re: The database backend does not accept 0 as a value for AutoField. > > Hey thanks for your response i did so beca

Re: The database backend does not accept 0 as a value for AutoField.

2020-04-26 Thread Jorge Gimeno
st putted false in rush. > that filed user from User model returns username as string autofield so > what shall i put as default their? > i tried to put None for default value but while migrating it giving same > error :-- > > line 192, in validate_autopk_value > raise V

Re: The database backend does not accept 0 as a value for AutoField.

2020-04-26 Thread Antje Kazimiers
username as string > autofield so what shall i put as default their? > i tried to put None for default value but while migrating it giving > same error :--  > > | >  line 192,invalidate_autopk_value >     raiseValueError('The database backend does not accept 0 as a 

RE: Re: The database backend does not accept 0 as a value for AutoField.

2020-04-26 Thread Divash Singh
Once you use the default argument for a model field, it cannot be removed even when u rerun migrations. You need to provide a valid default input value for each specific field Sent from Mail for Windows 10 From: Mayur BagulSent: Sunday, 26 April 2020 18:39To: Django usersSubject: Re: The database

RE: Re: The database backend does not accept 0 as a value for AutoField.

2020-04-26 Thread Divash Singh
Also, Please make sure that any foreign key fields are not default nulls Sent from Mail for Windows 10 From: Mayur BagulSent: Sunday, 26 April 2020 18:39To: Django usersSubject: Re: The database backend does not accept 0 as a value for AutoField. Hey thanks for your response i did so because

Re: The database backend does not accept 0 as a value for AutoField.

2020-04-26 Thread Mayur Bagul
while migrating it giving same error :-- line 192, in validate_autopk_value raise ValueError('The database backend does not accept 0 as a ' ValueError: The database backend does not accept 0 as a value for AutoField. guys help me with this error . On Sunday, April 26, 2020 at

RE: The database backend does not accept 0 as a value for AutoField.

2020-04-26 Thread Divash Singh
Think you shouldn’t use false as a default for fields which are not bool Sent from Mail for Windows 10 From: Antje Kazimiers Sent: Sunday, 26 April 2020 17:40 To: django-users@googlegroups.com Subject: Re: The database backend does not accept 0 as a value for AutoField. setting default=False is

Re: The database backend does not accept 0 as a value for AutoField.

2020-04-26 Thread Antje Kazimiers
setting default=False is odd for any field other than a BooleanField. I would take that out for the OneToOneField at least and see how things go. Antje On 4/26/20 4:19 PM, Mayur Bagul wrote: > Hello guys, > > im stucked with this error mentioned in subject. > below link redirect details about que

The database backend does not accept 0 as a value for AutoField.

2020-04-26 Thread Mayur Bagul
Hello guys, im stucked with this error mentioned in subject. below link redirect details about question. https://stackoverflow.com/q/61427882/11351226 let me know how to get rid of this problem. Thanking You. -- You received this message because you are subscribed to the Google Groups "Djan

Re: i want to change database sqllite to mysql but show error

2020-04-13 Thread myproblemsolution38
Just go to the settings.py file and make the following changes in Database section: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'your_DatabaseName', 'USER':'your_usernam

Re: Database migration issue

2020-04-12 Thread wanbao jin
Ok, I figure it out, When application configuration class is used in INSTALLED_APPS, the name field of AppConfig subclass should be the path of that application. AppConfig.name¶ > > Full > Python path to the applic

Re: Database migration issue

2020-04-12 Thread wanbao jin
> > When I just change the api.blogs.apps.BlogsConfig to api.blogs , it > worked fine. I am curious why api.blogs.apps.BlogsConfig doesn't work > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop rec

Re: i want to change database sqllite to mysql but show error

2020-04-12 Thread Ernest Thuku
>> site-packages\django\db\backends\mysql\base.py", line 16, in >> >> import MySQLdb as Database >> ModuleNotFoundError: No module named 'MySQLdb' >> >> The above exception was the direct cause of the following exception: >> >> T

Database migration issue

2020-04-12 Thread Jin
Hi, everyone. I'm completely new to DRF and I structured my first project as the following. When I run *python manage.py makemigrations * script, it gives errors. I guess it's related to my folder structure but don't know exactly what's wrong with it. [image: Capture.PNG] Any help would be

Re: i want to change database sqllite to mysql but show error

2020-04-12 Thread Andrew Fetting
\Users\Arunkumar\PycharmProjects\app2\venv\lib\site-packages\django\db\backends\mysql\base.py", > line 16, in > > import MySQLdb as Database > ModuleNotFoundError: No module named 'MySQLdb' > > The above exception was the direct cause of the following excep

i want to change database sqllite to mysql but show error

2020-04-12 Thread Arun Sharma
MySQLdb as Database ModuleNotFoundError: No module named 'MySQLdb' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "C:\Users\Arunkumar\AppData\Local\Programs\Python\Python37-32\lib\threading.py", line 926, in _bootstr

Re: ValueError: The database backend does not accept 0 as a value for AutoField.

2020-04-06 Thread Simon Charette
>> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/sql/compiler.py" >>> , line 1335, in as_sql >>> for obj in self.query.objs >>> File >>> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/sql/compiler.

Re: ValueError: The database backend does not accept 0 as a value for AutoField.

2020-04-06 Thread Hamza Mirchi
ery.objs >> File >> "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/sql/compiler.py" >> , line 1334, in >> [self.prepare_value(field, self.pre_save_val(field, obj)) for field >> in fields] >> File >> "/home/lenovo/.local/lib/python3.7/s

Re: ValueError: The database backend does not accept 0 as a value for AutoField.

2020-04-06 Thread Simon Charette
ields] > File > "/home/lenovo/.local/lib/python3.7/site-packages/django/db/models/sql/compiler.py" > , line 1275, in prepare_value > value = field.get_db_prep_save(value, connection=self.connection) > File > "/home/lenovo/.local/lib/python3.7/site-packages/d

Re: i am using database postgressql and after migrate my data is not displaying in the database

2020-03-27 Thread Ing.Daniel Bojorge
s el SEÑOR. (Jeremías 17:7 RV2000) El vie., 27 mar. 2020 a las 14:11, Jyotika Berry () escribió: > hi all , > I am new to Django so created a small application to understand the flow .. > till now everything good now I have created the database connection and > when I am trying

Re: i am using database postgressql and after migrate my data is not displaying in the database

2020-03-27 Thread Luka Nik
You should provide some more info. You could be messing your models.py file if the database contains no data. Or it's just frontend problems On Fri, 27 Mar 2020, 9:10 pm Jyotika Berry, wrote: > hi all , > I am new to Django so created a small application to understand the flow ..

i am using database postgressql and after migrate my data is not displaying in the database

2020-03-27 Thread Jyotika Berry
hi all , I am new to Django so created a small application to understand the flow .. till now everything good now I have created the database connection and when I am trying to pass the data from frontend its not displaying any entry at the database can anybody help me what could be the reason

Re: I have issue. I want to migrate database from sqlite3 to postgresql. With a table have 10M records. I need a solution for issue. Maybe help me?

2020-03-26 Thread Farai M
Export to csv in SQL then import into postgresql from there On Wed, Mar 25, 2020, 6:43 PM Thắng IT wrote: > solution > > -- > 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, sen

<    1   2   3   4   5   6   7   8   9   10   >