Re: Remote database using ssh

2022-07-19 Thread Abdul Qoyyuum
We don't know if your DB is in the same network or not as your Django App server but the answer is to open the database port on the database server. If you're using postgresql on the Database, then install a psql client on the app server and test connect from there. If it works, then your Django

Re: Remote database using ssh

2022-07-19 Thread Sebastian Jung
ining how to connect a remote database from another > server using ssh. I am able to connect the remote database with putty using > ssh, but but I don't know how to apply it in django. > > Thank you. > > -- > You received this message because you are subscribed to the Google

Re: Remote database using ssh

2022-07-19 Thread Mr.Teapot
Probably your database is not listening for remote connections for security reasons. Do the database and your application server are in the same network? Or maybe you are able to set up a VPN for both of these machines. Last but not recommended solution you can open a public port and allow only

Re: Remote database using ssh

2022-07-19 Thread Anh Nguyen
Public db port but not recommend for security reason and performance. On Tue, 19 Jul 2022 at 22:32 Wennie Catabay wrote: > Hello, > > I am stuck on defining how to connect a remote database from another > server using ssh. I am able to connect the remote database with putty

Remote database using ssh

2022-07-19 Thread Wennie Catabay
Hello, I am stuck on defining how to connect a remote database from another server using ssh. I am able to connect the remote database with putty using ssh, but but I don't know how to apply it in django. Thank you. -- You received this message because you are subscribed to the Google Groups

Re: Added new column to model and run migrations but not applied to database table

2022-07-03 Thread Thomas Lockhart
eksolutions.com>> wrote: > Hi, > I am hitting this problem again with new code merges into the deployment > server. Last time, I fixed the issue by doing like this > > "I have tried all the ways what you guys suggested me But here I don't want > change database why

Re: Added new column to model and run migrations but not applied to database table

2022-07-03 Thread Malik Rumi
time, I fixed the issue by doing like this >> >> "I have tried all the ways what you guys suggested me But here I don't >> want change database why because it is deployment server so, when I run >> manage.py makemigrations migrations are applied and changes are readi

Re: Added new column to model and run migrations but not applied to database table

2022-06-15 Thread Salima Begum
gested me But here I don't > want change database why because it is deployment server so, when I run > manage.py makemigrations migrations are applied and changes are reading but > when I run manage.py migrate changes are not taken to database so, Manually > I queried queries to a

Re: Having Trouble Creating a Test Database

2022-06-07 Thread Mark Phillips
Yes. All migrations have been done. On Tue, Jun 7, 2022, 9:01 AM Sebastian Jung wrote: > Do you have make manage.py migrate and afzer this manage.py makemigrations? > > Mark Phillips schrieb am Di., 7. Juni 2022, > 17:02: > >> I can't seem to be able to create a test d

Re: Having Trouble Creating a Test Database

2022-06-07 Thread atoosa Keshavarz
Hi Why do not you use mock for data base ? If you use mock data base you do not need test data base and your data base will not be change On Tue, 7 Jun 2022, 7:32 pm Mark Phillips, wrote: > I can't seem to be able to create a test database for my django project. I > get this

Re: Having Trouble Creating a Test Database

2022-06-07 Thread Sebastian Jung
Do you have make manage.py migrate and afzer this manage.py makemigrations? Mark Phillips schrieb am Di., 7. Juni 2022, 17:02: > I can't seem to be able to create a test database for my django project. I > get this error: > > django.db.utils.ProgrammingError: (

Having Trouble Creating a Test Database

2022-06-07 Thread Mark Phillips
I can't seem to be able to create a test database for my django project. I get this error: django.db.utils.ProgrammingError: (1146, "Table 'test_hopi_django.CurrentArticle' doesn't exist") I have full details at https://stackoverflow.com/questions/72521409/cant-create-django-tes

Re: OperationalError at /admin/login database or disk is full

2022-05-28 Thread Paul Kudla (SCOM.CA Internet Services Inc.)
database, dhango etc lives and go from there keep in mind that default locations usually work but sometimes not pending how your system was formatted. Happy Saturday !!! Thanks - paul Paul Kudla Scom.ca Internet Services <http://www.scom.ca> 004-1009 Byron Street South Whitby, O

Re: OperationalError at /admin/login database or disk is full

2022-05-27 Thread Clive Bruton
On 27 May 2022, at 22:37, Andrew Rea wrote: OperationalError at /admin/login/ database or disk is full Is this because my SQLite database is full from other projects? Or possibly because I have too many virtual envs from those same other projects? Or is it due to my personal computer's

OperationalError at /admin/login database or disk is full

2022-05-27 Thread Andrew Rea
Hello! This is my first post in this group so be gentle. I'm creating a new Django project, and I've successfully created a superuser. But when I try to access the Admin page of my project with my superuser credentials, I receive this error: OperationalError at /admin/login/ database

Django Serialization: ManyToMany Field doesn't input into database

2022-04-12 Thread Jeffrey Ma
The code runs and all fields except the manytomany field is written into the mysql database. I am posting json to the django backend which will be written into the database. For more information: https://stackoverflow.com/questions/71849923/django-serializer-inserting-nothing-into-database

Re: Got an error creating the test database: database "" already exists

2022-03-17 Thread Salima Begum
2 PM Prashanth Patelc < > prashanthpat...@gmail.com> wrote: > >> Check your settings.py once >> Add auth_user='app.UserModel' >> >> Or >> 1) delete database and migrations >> 2) create new db >> 3) python manage.py makemigration >> 4)

Re: Got an error creating the test database: database "" already exists

2022-03-17 Thread DJANGO DEVELOPER
our settings.py once > Add auth_user='app.UserModel' > > Or > 1) delete database and migrations > 2) create new db > 3) python manage.py makemigration > 4) python manage.py migrate > > > On Thu, Mar 17, 2022, 9:35 AM Avinash Alanjakar > wrote: > >> >> The

Re: Got an error creating the test database: database "" already exists

2022-03-17 Thread Prashanth Patelc
Check your settings.py once Add auth_user='app.UserModel' Or 1) delete database and migrations 2) create new db 3) python manage.py makemigration 4) python manage.py migrate On Thu, Mar 17, 2022, 9:35 AM Avinash Alanjakar wrote: > > Their are lots of pre-bulit apps in django so yo

Re: Got an error creating the test database: database "" already exists

2022-03-16 Thread Avinash Alanjakar
Their are lots of pre-bulit apps in django so you need to migrate them first. In your case you are using the authentication with migrating their tables with database. Try to run command in this sequence. This might be solve your problem. python manage.py migrate python manage.py makemigrations

Re: Got an error creating the test database: database "" already exists

2022-03-16 Thread Salima Begum
issue > still persists. let me know > > On Wed, Mar 16, 2022 at 2:15 PM Sebastian Jung > wrote: > >> Hey salima, >> >> This error is strange. Django try to use a Relation in postgresql which >> doesn't exist. >> >> I have only tip that you cam res

Re: Got an error creating the test database: database "" already exists

2022-03-16 Thread DJANGO DEVELOPER
y tip that you cam reset database. I would delete database in > postgresql and create it new with psql tool. After this you must reset all > migrations: > > > https://simpleisbetterthancomplex.com/tutorial/2016/07/26/how-to-reset-migrations.html > > And after this when you migra

Re: Got an error creating the test database: database "" already exists

2022-03-16 Thread Sebastian Jung
Hey salima, This error is strange. Django try to use a Relation in postgresql which doesn't exist. I have only tip that you cam reset database. I would delete database in postgresql and create it new with psql tool. After this you must reset all migrations: https://simpleisbetterthancomplex.com

Got an error creating the test database: database "" already exists

2022-03-15 Thread Salima Begum
Hi all, After writing test cases I run test cases I am getting an error below ``` Python manage.py behave ``` After running the above command I am getting this error. ``` Creating test database for alias 'default'... Got an error creating the test database: database "test_newDataBase&quo

trying to getJSON data from database, but there is a problem with rendering

2022-03-02 Thread UGC
Hey all, I have the models .py with employee and all the info. With one click i want to render all the info of my employee. When i click on the button i see the data on my js console , but i dont see it come on the page frontend. i think i have problems with the key but i dont know. here is

Re: Database objects do not implement truth value testing

2022-02-24 Thread Kasper Laudrup
On 24/02/2022 16.18, Pradumn Maurya wrote: Dear Sir/Mam I just face this problem when i am using makemigrations cmd, how can i fix this. Can any one help me solve this problem? I'm fairly certain no one will be able to help you solve this problem if you don't describe it a bit more in

Oracle database sequences generated by Django

2022-02-03 Thread Harold Achipiz
Hello everyone. I have a web application built in Django == 1.11.6, when the migrations were generated in oracle the sequences are created and they can be modified and even deleted. When I update to django 3 and I generate the migrations again, it creates the sequences with a name similar to

Re: Search & replace an object in the database

2022-01-24 Thread jools
Thanks! I’ll consider this. The whole thing is supposed to be a tool for everyday work (although: a very dangerous one!), so the “fix the database once” strategy isn’t going to work for me. I’ve added some tests for checking different relation types (m2m, fk, one-to-one, generic relation

Re: Database design

2022-01-23 Thread Derek
=== >> => he will enter values in variables with appropriate field type. >> for eg., "name char type", "Salary decimal field" and so on.. >> =>When the user enter data into application it should directly store in >> database in the for

Re: Database design

2022-01-23 Thread Madhusudhan Reddy
ame and fields like in html or super admin > can do > > === > => he will enter values in variables with appropriate field type. > for eg., "name char type", "Salary decimal field" and so on.. > =>When the user enter data into application it should

Database design

2022-01-23 Thread Prashanth Patelc
ues in variables with appropriate field type. for eg., "name char type", "Salary decimal field" and so on.. =>When the user enter data into application it should directly store in database in the form of tables and rows.. Regards; Prashanth email : prashanthpat...@g

NotImplementedError: Database objects do not implement truth value testing or bool(). Please compare with None instead: database is not None

2022-01-21 Thread Oumar Thiombane
NotImplementedError: Database objects do not implement truth value testing or bool(). Please compare with None instead: database is not None -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: Search & replace an object in the database

2022-01-21 Thread Thomas Lockhart
Yes this exactly. A couple of possible additions: I’ve had great luck using python and SQL queries to manipulate a database including converting from other schemas and merging duplicate records. Make a test database from your backup, and beat it up with your scripted code until you are happy

Re: Search & replace an object in the database

2022-01-21 Thread Bernard Mallala
I would approach this differently and from the database side mostly 1. Backup the database so you can restore if something happens 2. In Django, Create an an empty copy of the Customer database e.g CustomerB 3. Using a SQL query tool, select all duplicate copies from Customer

Re: Search & replace an object in the database

2022-01-21 Thread Yeboah Dominic
Okay bro try this script hope it works On Fri, 21 Jan 2022 at 10:05, jools wrote: > Dear Django users, > > here’s an interesting case and I’m curious whether somebody can point me > in the right direction. > > Here’s the problem: > My company has a database of customers.

Re: Search & replace an object in the database

2022-01-21 Thread jools
: > My company has a database of customers. Over the years, many duplicates > have been created. For cleaning up duplicates, I’d like to have a > search-and-replace functionality. > > I.e.: Replace all references in the database to customer with > customer . > The database schem

Search & replace an object in the database

2022-01-21 Thread jools
Dear Django users, here’s an interesting case and I’m curious whether somebody can point me in the right direction. Here’s the problem: My company has a database of customers. Over the years, many duplicates have been created. For cleaning up duplicates, I’d like to have a search-and-replace

Re: are migrations the same regardless of database type?

2021-12-29 Thread Anil Felipe Duggirala
Thanks to all for your replies. Using the "sqlmigrate" command, as far as I can see, there are no differences between database types. I asked this question initially because I was unable to set up postgresql locally. I have solved those issues now and will follow your advice on using

Re: are migrations the same regardless of database type?

2021-12-28 Thread Bernard Mallala
Migrations are different depending on your DBMS. Why? Briefly, here are a few reasons : 1. RDBMS or DBMS (Database management system) is a software that organizes the data in a database thus allowing for easy management, administration, retrieval and manipulation of data by users

Re: are migrations the same regardless of database type?

2021-12-28 Thread Jason
Not exactly. Migrations try to be generalized across db types, but that doesn't mean that you can be using db-specific features in your models and ORM usage. Thats one reason its highly, highly recommended to use the same database and version at all layers of your stack. In other words

Re: are migrations the same regardless of database type?

2021-12-28 Thread Lars Liedtke
As far as I know, the migrations are "Python-Code" in themselves, only defining which tables change in what way. Only when they are being applied, this is turned into actual database code. But you can test this easily by creating migrations and look at them. Or use e.g. a postg

are migrations the same regardless of database type?

2021-12-28 Thread Anil Felipe Duggirala
hello, I running an app locally using an SQlite database (I have not been able to set up postgresql locally). I am running the same app in Heroku, using Postgresql. If I run "makemigrations" locally, then push those migrations to Heroku (which is using postgresql), will those

Re: Why does sqlmigrate need a connection to an existing database?

2021-12-24 Thread Shmuel Treiger
for `if self.connection is >> None:`, so that shouldn't be an issue? >> As far as atomicity, what if, in a case where no connection is found, it >> could just prompt: "No database connection found. Do you want your >> migration to be atomic? (y/N)" >> On Th

Re: Why does sqlmigrate need a connection to an existing database?

2021-12-11 Thread Jason
ath for `if self.connection is > None:`, so that shouldn't be an issue? > As far as atomicity, what if, in a case where no connection is found, it > could just prompt: "No database connection found. Do you want your > migration to be atomic? (y/N)" > On Thursday, 9 December 2021 a

Re: Why does sqlmigrate need a connection to an existing database?

2021-12-10 Thread Shmuel Treiger
Build graph has a specific separate path for `if self.connection is None:`, so that shouldn't be an issue? As far as atomicity, what if, in a case where no connection is found, it could just prompt: "No database connection found. Do you want your migration to be atomic? (y/N)" On T

Database "InterfaceError connection already closed" with asgi.

2021-12-09 Thread peter.wagemans via Django users
Database "InterfaceError connection already closed" with asgi. This often seems to happen when an exception was triggered, e.g., even a simple Http404 due to incorrect URL. A suspicion is discussed below. Ideas about this suspicion, how to validate it and how to avoid t

Re: Why does sqlmigrate need a connection to an existing database?

2021-12-09 Thread Jason
; Wondering why sqlmigrate needs a connection to an existing database. > > I understand that for certain commands, it needs the database to generate > the migration. But for most (basic) commands, no connection is really > needed. > > For example, I created a test project > &l

Why does sqlmigrate need a connection to an existing database?

2021-12-07 Thread Shmuel Treiger
Wondering why sqlmigrate needs a connection to an existing database. I understand that for certain commands, it needs the database to generate the migration. But for most (basic) commands, no connection is really needed. For example, I created a test project <https://github.com/ShmuelTrei

Re: Get data from table rows and save in database

2021-12-04 Thread ram s
use name attribute in site input tag... On Sat, Dec 4, 2021 at 3:47 PM Eugene TUYIZERE wrote: > Dear Colleagues, > > I have data in the table. I want to get the rows value and save them in > the database. How can I do this with jquery? > The table I have is like this >

Re: Get data from table rows and save in database

2021-12-04 Thread Fredrick Ekoma
what is your product On Sat, 4 Dec 2021, 11:17 am Eugene TUYIZERE, wrote: > Dear Colleagues, > > I have data in the table. I want to get the rows value and save them in > the database. How can I do this with jquery? > The table I have is like this > [image: image.png] >

Re: Get data from table rows and save in database

2021-12-04 Thread Jet Ezra
> I have data in the table. I want to get the rows value and save them in > the database. How can I do this with jquery? > The table I have is like this > [image: image.png] > This is what I have in HTML. The total is automatically calculated as I > type the amount > > &g

Get data from table rows and save in database

2021-12-04 Thread Eugene TUYIZERE
Dear Colleagues, I have data in the table. I want to get the rows value and save them in the database. How can I do this with jquery? The table I have is like this [image: image.png] This is what I have in HTML. The total is automatically calculated as I type the amount Description Amount

How to create dynamic database per tenant for multitenant application in Django

2021-11-16 Thread sreeba...@gmail.com
https://stackoverflow.com/questions/69984640/how-to-create-dynamic-database-per-tenant-for-multitenant-application-in-django I need solutions for this stack overflow thread. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubs

Re: Re : Need help in django database related

2021-10-14 Thread Richard Dushime
i Think using Django u will create models then register them in admin, for saving data /registration u will create a form that will be posting data in database may be u can add in an email scripts if u want to always be aware of who has registered for an event On Wed, Oct 13, 2021 at 8:37

Re: Re : Need help in django database related

2021-10-14 Thread MR INDIA
Maybe you need to learn db relationships in django models and forms, Learn about db : https://www.webforefront.com/django/setuprelationshipsdjangomodels.html And inspect source code of this project: https://github.com/sajib1066/django-event-management Hope this helps, A fellow django

MSSQL server database question

2021-10-14 Thread hebers
Greetings. I was given a task of creating a django app that will use a database. However, I am not given admin rights to create a database on MSSQL Server, and I can only create tables inside an assigned database with existing tables. I have tried migrations on an existing database (py

Re : Need help in django database related

2021-10-13 Thread Avi shah
I want to build an platform where admin can add events and I want end users to register for that event , so how do I save the data/registration of the user for that particular event , how can i create dynamic tables like 1 table for 1 event or is there some other logic behind it? Thanks in

Re: Added new column to model and run migrations but not applied to database table

2021-08-15 Thread Salima Begum
Hi, I am hitting this problem again with new code merges into the deployment server. Last time, I fixed the issue by doing like this "I have tried all the ways what you guys suggested me But here I don't want change database why because it is deployment server so, when I run mana

Re: Added new column to model and run migrations but not applied to database table

2021-07-26 Thread guna visva
having had the unfortunate phase of dealing with it , sorting it requires some patience the issue is the tables in django_migrations is not in sync with rest the rest of your database or migrations files. You have to first remove the addition in field etc and make sure the database tables

Re: connection to an existing legacy database

2021-07-21 Thread Gabriel Araya Garcia
Get the [ODBC Driver in other site, perhaps your odbc driver are corrupted. Gabriel Araya Garcia GMI - Desarrollo de Sistemas Informáticos El lun, 19 jul 2021 a las 19:58, sum abiut () escribió: > I am trying to connect Django to an existing legacy database but I got > this error mess

Re: connection to an existing legacy database

2021-07-20 Thread sum abiut
sum abiut wrote: > >> I am trying to connect Django to an existing legacy database but I got >> this error message. I only get the message why I try to migrate. I follow >> the guide from the Django documentation >> <https://docs.djangoproject.com/en/3.2/how

Re: Added new column to model and run migrations but not applied to database table

2021-07-20 Thread Sebastian Jung
s or migrate and > python manage.py migrate --fake-initial. But those migrations are not > applying to the database. How can I fix this issue without deleting the > database? > > Thank you > ~Salima > > > On Mon, Jul 19, 2021 at 7:02 PM Aman Vyas wrote: > >> i

Re: Added new column to model and run migrations but not applied to database table

2021-07-20 Thread Salima Begum
Hi , Thank you for your responses. I have tried all the ways Which you people suggested I am not getting any error while running makemigrations or migrate and python manage.py migrate --fake-initial. But those migrations are not applying to the database. How can I fix this issue without deleting

Re: connection to an existing legacy database

2021-07-20 Thread Divyesh Khamele
If you have any doubt I’ll provide you all the solutions (Dm for paid work) On Tue, 20 Jul 2021 at 5:29 AM, sum abiut wrote: > I am trying to connect Django to an existing legacy database but I got > this error message. I only get the message why I try to migrate. I follow > the g

connection to an existing legacy database

2021-07-19 Thread sum abiut
I am trying to connect Django to an existing legacy database but I got this error message. I only get the message why I try to migrate. I follow the guide from the Django documentation <https://docs.djangoproject.com/en/3.2/howto/legacy-databases/>. error message: django.db.utils.Programmin

Re: Added new column to model and run migrations but not applied to database table

2021-07-19 Thread Aman Vyas
if it is saying no changes detected while running makemigrations and you are sure that you changed models.py then these things you can try: 1: python manage.py makemigrations appname if this will not work then do that 2: delete migrations folder from your app and delete database then run again

Re: Added new column to model and run migrations but not applied to database table

2021-07-19 Thread Boris Pérez
> On Mon, 19 Jul 2021 at 07:07, Salima Begum > wrote: > >> Hi all, >> >> I have added a new column to the existing model while developing. Then I >> run makemigrations and migrate. It is not applied to the database table >> which is created based on that mo

Re: Added new column to model and run migrations but not applied to database table

2021-07-19 Thread Ayser shuhaib
ew column to the existing model while developing. Then I > run makemigrations and migrate. It is not applied to the database table > which is created based on that model. How can I fix this issue? Please help > me to complete this issue. > > The below issue I am facing in deployment serve

Re: Added new column to model and run migrations but not applied to database table

2021-07-19 Thread Ayser shuhaib
t I don't want to change my > database without changing databases. I want to fix this issue. How can I > achieve this? Please help me out. > > Thank you very much for your quick response. > > Thank you > ~Salima > > On Mon, Jul 19, 2021 at 11:45 AM Abhishek Choudhury <

Re: Added new column to model and run migrations but not applied to database table

2021-07-19 Thread Salima Begum
Hi Abhishek, What you suggested will work but I don't want to change my database without changing databases. I want to fix this issue. How can I achieve this? Please help me out. Thank you very much for your quick response. Thank you ~Salima On Mon, Jul 19, 2021 at 11:45 AM Abhishek Choudhury

Re: Added new column to model and run migrations but not applied to database table

2021-07-19 Thread Abhishek Choudhury
Hi Salima, If you're in a hurry and trying it on development, I think you can create a new database and run the migrate command. This will recreate the schema and your issue will be resolved in no time. Thanks and regards, Abhishek Choudhury On Mon, 19 Jul 2021 at 10:37 AM, Salima Begum wrote

Added new column to model and run migrations but not applied to database table

2021-07-18 Thread Salima Begum
Hi all, I have added a new column to the existing model while developing. Then I run makemigrations and migrate. It is not applied to the database table which is created based on that model. How can I fix this issue? Please help me to complete this issue. The below issue I am facing

Re: Error when loading data to database to postgresql

2021-07-15 Thread Kasper Laudrup
On 7/15/21 11:05 AM, Wale Olajumoke wrote: Please how do I fix this error that comes up when loading data. See the error message below. Reading something like this is a good start: https://www.propublica.org/nerds/how-to-ask-programming-questions Kind regards, Kasper Laudrup -- You

Error when loading data to database to postgresql

2021-07-15 Thread Wale Olajumoke
Please how do I fix this error that comes up when loading data. See the error message below. Thanks Traceback (most recent call last): File "/app/.heroku/python/lib/python3.9/site-packages/django/contrib/contenttypes/models.py", line 19, in get_by_natural_key ct =

image storing to database

2021-07-08 Thread Aniket Gadge
my project is to store the images to database after classified them but when i process it storethe images first time in folder but second time it not store thedata to data base model.py class Addhars(models.Model): name = models.CharField(max_length=64) images = models.ImageField

Re: i have a picture field in my model that was not stored properly in django database and i can't retrive that picture

2021-07-07 Thread dapsyn
Try check your model On Wednesday, July 7, 2021 at 3:07:55 PM UTC+1 mohansar...@gmail.com wrote: > please check below view Function -- 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

Re: i have a picture field in my model that was not stored properly in django database and i can't retrive that picture

2021-07-07 Thread Lalit Suthar
this can help https://simpleisbetterthancomplex.com/tutorial/2016/08/01/how-to-upload-files-with-django.html On Wed, 7 Jul 2021 at 20:25, DJANGO DEVELOPER wrote: > you're doing well but it is not the right way o ask the question. you need > to describe all of your problem and what you have done

Re: i have a picture field in my model that was not stored properly in django database and i can't retrive that picture

2021-07-07 Thread DJANGO DEVELOPER
you're doing well but it is not the right way o ask the question. you need to describe all of your problem and what you have done to resolve it, then may be someone will be able to help you. On Wed, Jul 7, 2021 at 7:07 PM Hugh Frost wrote: > please check below view Function > > -- > You

i have a picture field in my model that was not stored properly in django database and i can't retrive that picture

2021-07-07 Thread Hugh Frost
please check below view Function -- 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 on the web

Need an Advice about large database I/O

2021-07-04 Thread Mottaz Hegaze
Hello Friends, Hope all is well, I have a project that involves reading large data files ( csv, excel sheets ) and writing them to a database. I am thinking of using the django ORM to read / write from files from / to the database ( maybe postgresql ) and to use Django templates to show records

Re: Specifying a database connection for ManyToMany add()

2021-06-23 Thread Mike Dewhirst
On 23/06/2021 7:18 pm, Jayanth Shankar wrote: Hi, I am trying to add items to a ManyToMany relationship, but I would like to make the operation use a particular database connection, like one might do when calling save() on a model instance. However, looking at the source for ManyToMany.add

Specifying a database connection for ManyToMany add()

2021-06-23 Thread Jayanth Shankar
Hi, I am trying to add items to a ManyToMany relationship, but I would like to make the operation use a particular database connection, like one might do when calling save() on a model instance. However, looking at the source for ManyToMany.add(), the function defaults to checking

Re: Problem to connect to database only when run "migrate"

2021-06-22 Thread Heron
Thank you Aziz Regards, _ Heron hero...@gmail.com _ Em ter., 22 de jun. de 2021 às 15:29, Aziz Meknassi escreveu: > Hi Heron, > > To make sure you are talking to your database, > in your project and in your command line, type > python

Re: Problem to connect to database only when run "migrate"

2021-06-22 Thread Aziz Meknassi
Hi Heron, To make sure you are talking to your database, in your project and in your command line, type python manage.py shell then import your model If for example you have prodApp and model Product from prodApp.models import Product prd = Product.objects.all() print(prd) Please checkout ORM

Re: Using ORM to retrieve values (REAL) from SQLite database to round to 2 decimal places

2021-06-21 Thread Lalit Suthar
t;, the > modified search would be for "2.1". > > Cheers, > Wai > > On Sat, Jun 19, 2021 at 5:53 AM Lalit Suthar > wrote: > >> this can help >> https://docs.djangoproject.com/en/2.2/ref/models/database-functions/#round >> >> On Fri, 18 Jun 2021 a

Re: Problem to connect to database only when run "migrate"

2021-06-21 Thread Heron
Yes, And its works fine with runserver, check or with apache/wscgi regards, _ Heron hero...@gmail.com _ Em dom., 20 de jun. de 2021 às 07:31, Luciano Martins escreveu: > > have you configured mysql database in settings.py? > Em sábado, 19 de junho d

Re: Using ORM to retrieve values (REAL) from SQLite database to round to 2 decimal places

2021-06-21 Thread Wai Yeung
alit Suthar wrote: > this can help > https://docs.djangoproject.com/en/2.2/ref/models/database-functions/#round > > On Fri, 18 Jun 2021 at 22:43, Wai Yeung wrote: > >> Hello, >> >> To be able to get a REAL value from a SQLite database rounded to 2 >>

Re: Problem to connect to database only when run "migrate"

2021-06-20 Thread Luciano Martins
have you configured mysql database in settings.py? Em sábado, 19 de junho de 2021 às 09:19:09 UTC-3, her...@gmail.com escreveu: > Hello, > > I getting problem to connect to database only when run "migrate". I'm able > to use on apache/wsgi and runserver, so it's

Re: help me plz: getting error while importing csv file into database

2021-06-20 Thread Luciano Martins
you have to pass the 'path' variable into open I believe that's it Em sexta-feira, 18 de junho de 2021 às 15:22:41 UTC-3, rammano...@gmail.com escreveu: > Hi > i am trying to import the csv file data into database > my views.py > def Filter(request): > if reques

Re: Using ORM to retrieve values (REAL) from SQLite database to round to 2 decimal places

2021-06-19 Thread Lalit Suthar
this can help https://docs.djangoproject.com/en/2.2/ref/models/database-functions/#round On Fri, 18 Jun 2021 at 22:43, Wai Yeung wrote: > Hello, > > To be able to get a REAL value from a SQLite database rounded to 2 decimal > places, I had to use the following RAW SQL query

Problem to connect to database only when run "migrate"

2021-06-19 Thread Heron
Hello, I getting problem to connect to database only when run "migrate". I'm able to use on apache/wsgi and runserver, so it's seens that connection to database is okay. Dango is running on docker. Anyone can help me ? bash-4.2# python manage.py migrate /usr/local/lib/pyth

help me plz: getting error while importing csv file into database

2021-06-18 Thread ram manoj Vuyyuru
Hi i am trying to import the csv file data into database my views.py def Filter(request): if request.method=="POST": form = DataForm(request.POST, request.FILES) if form.is_valid(): initial_obj = form.save(commit=False) data=initial

Re: help me plz: getting error while importing csv file into database

2021-06-18 Thread ram manoj Vuyyuru
thank you On Fri, Jun 18, 2021 at 10:52 PM ram manoj Vuyyuru < rammanojvuyy...@gmail.com> wrote: > Hi > i am trying to import the csv file data into database > my views.py > def Filter(request): > if request.method=="POST": > form = DataForm(r

Using ORM to retrieve values (REAL) from SQLite database to round to 2 decimal places

2021-06-18 Thread Wai Yeung
Hello, To be able to get a REAL value from a SQLite database rounded to 2 decimal places, I had to use the following RAW SQL query: SELECT printf("%.2f", round(orig_total,2)), FROM final_billing_tbl I would like to be able to duplicate the functionality of the in ORM

issue with filter database on a standalone script

2021-06-18 Thread Zolo Kiala
Dear Django developers, I would like to connect my dash plotly dashboard to a django model filtered to a specific user. I was able to import the model into a standalone script. The problem is that I can only connect the dashboard to the values related to all the users in the database. But I want

Re: Makemigrations/migrate in existing database

2021-06-08 Thread Gabriel Araya Garcia
No. Only take sure That model structure about your tables should be the same fields in your database El vie., 4 jun. 2021 8:58, Ankita Sharma escribió: > Hello Team > Hope all are doing great > > I have a database in microsoft sql server. I created tables and views in > i

Re: Makemigrations/migrate in existing database

2021-06-08 Thread Omkar D
; Hello Team >> Hope all are doing great >> >> I have a database in microsoft sql server. I created tables and views in >> it. >> >> I ran py manage.py inspetdb > Models.py and populated my models.py file >> . I also don't want my model to alter my database.

Re: Makemigrations and migrate for already existing database

2021-06-04 Thread sourav panja
Have you created a new model field ? Then put on that null= "True" Example :: Name = Model.CharField(max_legth,* null= "True"*) On Fri, Jun 4, 2021 at 7:59 PM OSA-33 SyCS Atik Rangnekar < atikrangneka...@gmail.com> wrote: > It think the problem is there is null values/bytes > > On Fri, 4 Jun,

Re: Makemigrations and migrate for already existing database

2021-06-04 Thread OSA-33 SyCS Atik Rangnekar
It think the problem is there is null values/bytes On Fri, 4 Jun, 2021, 6:28 pm Ankita Sharma, wrote: > Hello All > Hope all are doing great. > The issue is as follows: > I have already existing 2 MSSql databases from which I have migrated > required tables into models.py > Now I am not able to

Re: Makemigrations and migrate for already existing database

2021-06-04 Thread Mahendra
Check the error in Google Mahendra Yadav On Fri, 4 Jun 2021, 18:28 Ankita Sharma, wrote: > Hello All > Hope all are doing great. > The issue is as follows: > I have already existing 2 MSSql databases from which I have migrated > required tables into models.py > Now I am not able to do

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