how to copy one table content in to another table in database

2019-09-16 Thread Mahendhar Reddy
how to copy one table content in to another table in database -- 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: How to inspect MSSQL Database in Django 2.1

2019-09-12 Thread Adam Parsons
has the relevant permissions to inspect the database On Thursday, 12 September 2019 00:00:00 UTC+8, wikils john wrote: > > I have a large MSSQL server. > I am using it now. I am going to use this database in new django project. > however, inspectdb TableName > models.py this command

How to inspect MSSQL Database in Django 2.1

2019-09-11 Thread wikils john
I have a large MSSQL server. I am using it now. I am going to use this database in new django project. however, inspectdb TableName > models.py this command isn't performed. How can I fix this? -- You received this message because you are subscribed to the Google Groups "Django user

Re: Relation between different database?

2019-09-10 Thread ANi
Thanks, Jason. I was trying to connect a table to a view from another database. But it is not allowed to have a foreign key on a view unless I use a materialized view! Problem is solved. ANi於 2019年9月10日星期二 UTC+8上午11時54分28秒寫道: > > Hi, > > I have my asset table in local d

Re: Relation between different database?

2019-09-10 Thread Jason
https://docs.djangoproject.com/en/2.2/topics/db/multi-db/ If you have to do this, Django does support multiple databases. But you’re going to need to handle the data consistency and integrity you’r. -- You received this message because you are subscribed to the Google Groups "Django users"

Re: Relation between different database?

2019-09-10 Thread ANi
to reference to the employee > view from another database. > But I realized that Django might not allow relations across databases, > right? > > so does it means that I can only store the employee key as string in the > asset table? > or other way to achieve? > > many thanks,

Re: Relation between different database?

2019-09-10 Thread N'BE SORO
Ok you can add an additional column my_id and you give him the unique property = True Le mar. 10 sept. 2019 à 06:00, ANi a écrit : > my real situation as an example. > > *local database* > AssetModel(id, employee, name, barcode, location, value) > > *remote database* >

Re: Relation between different database?

2019-09-10 Thread ANi
my real situation as an example. *local database* AssetModel(id, employee, name, barcode, location, value) *remote database* EmployeeView(id, name, department) I am thinking to set employee in AssetModel as an ForeignKey which references to EmployeeView. but it seems to be not allowed

Re: Relation between different database?

2019-09-09 Thread N'BE SORO
Hello. Give me one example Le mar. 10 sept. 2019 à 03:54, ANi a écrit : > Hi, > > I have my asset table in local db which need to reference to the employee > view from another database. > But I realized that Django might not allow relations across databases, > right? &g

Relation between different database?

2019-09-09 Thread ANi
Hi, I have my asset table in local db which need to reference to the employee view from another database. But I realized that Django might not allow relations across databases, right? so does it means that I can only store the employee key as string in the asset table? or other way

Re: How to write efficient Django ORM when the database you are working has no relationship defined(No foreign key )

2019-09-06 Thread Bhoopesh sisoudiya
Hi yogesh, First: you create index on columns which you want use in ORM. Second: No need to create index on datetime field. Third: Use join by ORM. No need to key-relationship in database. Thanks Bhoopesh sisoudiya On Fri, Sep 6, 2019, 5:14 PM Yogesh Agarwal wrote: > Hiii guys, Currentl

Re: how to display retrieved data from database using django

2019-09-06 Thread Gajanan Kathar
ted 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 > === > >

How to write efficient Django ORM when the database you are working has no relationship defined(No foreign key )

2019-09-06 Thread Yogesh Agarwal
Hiii guys, Currently I am working on a Database whose structure is very bad and I want to write efficient Django ORM where two or more models are involved(similar to the joining of two or more table in SQL) and we can write the most efficient ORM to make it work fast? -- You received

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
. For instance, database lock could not be implemented on sqlite but MySQL. You can get more information at *djangoproject.com. *(More: https://docs.djangoproject.com/en/2.2/ref/databases/) For the third question, back up one, you can use PythonAnyWhere Task service which are bits of codes runned regularly

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
GUI for database access as per user Access Control Rights ( Permissions ) On Thursday, September 5, 2019, Amirhosein Rajabi wrote: > 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

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 connect

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

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

2019-09-04 Thread Mario R. Osorio
September 4, 2019 at 1:10:39 AM UTC-4, Balaji wrote: > > Hi Everyone > > Can anybody suggest me > How can i share one Database Sqlite between 2 app on pythonanywhere. > > Currently i have deployed one project on PythonAnywhere. > I have purchases 2 App. > Now i can e

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

2019-09-04 Thread Jay Vasant
> Can anybody suggest me > How can i share one Database Sqlite between 2 app on pythonanywhere. > > Currently i have deployed one project on PythonAnywhere. > I have purchases 2 App. > Now i can execute 2 App simultaneous. > > I have deployed app1.pythonanywhere.com and ap

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

2019-09-03 Thread Balaji Shetty
Hi Everyone Can anybody suggest me How can i share one Database Sqlite between 2 app on pythonanywhere. Currently i have deployed one project on PythonAnywhere. I have purchases 2 App. Now i can execute 2 App simultaneous. I have deployed app1.pythonanywhere.com and app2.pythonanywhere.com

Re: Is it a good practice to store all static data dynamically in database rather?

2019-08-31 Thread Aldian Fazrihady
There are already servers that are very good at handling static files, such as nginx, apache, or amazon S3. Django will never be better at handling static files compared to those servers, as on production, Django will always be put behind those web servers. Putting static files on database, means

Re: Is it a good practice to store all static data dynamically in database rather?

2019-08-30 Thread Raul Santos
atic-files/ Em Sex, 30 de ago de 2019 17:35, Sapna Tomar escreveu: > Hey! I'm making a static website (showcasing a hobby club of my college) > using Django. I have used database for storing most of the content like > photos, or events since they have multiple instances. Will it als

Is it a good practice to store all static data dynamically in database rather?

2019-08-30 Thread Sapna Tomar
Hey! I'm making a static website (showcasing a hobby club of my college) using Django. I have used database for storing most of the content like photos, or events since they have multiple instances. Will it also be okay to save all the rest of the content which does not necessarily have more

Re: help me to fix this issue with database connection

2019-08-29 Thread leb dev
yes i am on the same LAN and i am able to get remote connection and ping -- 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

RE: help me to fix this issue with database connection

2019-08-29 Thread doddahulugappa
Yes it is right . r u on same LAN? From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of leb dev Sent: Thursday, August 29, 2019 1:47 PM To: Django users Subject: Re: help me to fix this issue with database connection yes i can get a remote connection

Re: help me to fix this issue with database connection

2019-08-29 Thread leb dev
yes i can get a remote connection with the server and i can do ping so its reachable. and about the port its the default port used to connect ms sql server 1433. isn't this right ? -- You received this message because you are subscribed to the Google Groups "Django users" group. To

RE: help me to fix this issue with database connection

2019-08-29 Thread doddahulugappa
Make sure that port is opened and it is reachable from machine u r trying to access From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of leb dev Sent: Thursday, August 29, 2019 12:33 PM To: Django users Subject: Re: help me to fix this issue with database

Re: help me to fix this issue with database connection

2019-08-29 Thread leb dev
i tried your answer also and did not work i do not know what is the problem and how to fix it -- 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

Re: help me to fix this issue with database connection

2019-08-29 Thread leb dev
o...@googlegroups.com ] > *Sent:* Thursday, August 29, 2019 12:16 PM > *To:* Django users > *Subject:* Re: help me to fix this issue with database connection > > > > DATABASES = { > 'default': { > 'ENGINE': 'django.db.backends.postgresql', > 'NAME':

RE: help me to fix this issue with database connection

2019-08-29 Thread doddahulugappa
, August 29, 2019 12:16 PM To: Django users Subject: Re: help me to fix this issue with database connection DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', 'NAME': 'Authenticate', # database name 'USER': 'postgres', 'PASSWORD': 'pwd

Re: help me to fix this issue with database connection

2019-08-29 Thread 'Amitesh Sahay' via Django users
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', 'NAME': 'Authenticate', # database name 'USER': 'postgres', 'PASSWORD': 'pwd', 'HOST': 'localhost' } }I don't think you need anything other than this. For MySql you can use mysql

Re: help me to fix this issue with database connection

2019-08-29 Thread leb dev
t ? > > from django.shortcuts import render > import pyodbc > > def connect(request): > conn = pyodbc.connect( > 'Driver={SQL Server};' > 'Server=ip address;' > 'Database=I-Bas

Re: help me to fix this issue with database connection

2019-08-29 Thread 'Amitesh Sahay' via Django users
to fix it ? from django.shortcuts import render import pyodbc def connect(request): conn = pyodbc.connect( 'Driver={SQL Server};' 'Server=ip address;' 'Database=I-Base_beSQL

help me to fix this issue with database connection

2019-08-28 Thread leb dev
};' 'Server=ip address;' 'Database=I-Base_beSQL;' 'Trusted_Connection=yes;' ) cursor = conn.cursor() c = cursor.execute('SELECT "first name" FROM Person WHERE id = 2 ') ret

Re: i need a project developed in django +mysql database and front end in bootstrap-4

2019-08-28 Thread Desh Deepak
Hi, Waqas I am Desh Deepak from New Delhi, My Qualification MCA done from IGNOU. I am experience in Python technology like python based frameworks: Django, flask and also knowledge about MySQL8.0. My github id: deshxpm (https://www.github.com/deshxpm) and linkedin id: deshdeepak...@gmail.com

i need a project developed in django +mysql database and front end in bootstrap-4

2019-08-28 Thread Waqas Ahmad
For Contact me ::: waqasahmadtarar...@gmail.com -- 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

Re: Database Views

2019-08-27 Thread Doddahulugappa.B
to database views, its also applicable to tables also. Kindly make sure to change above two lines in setting according to ur local time zone to render correct records. Thank you. On Tue, Aug 27, 2019, 10:02 PM Doddahulugappa.B wrote: > Thanks for your response. > > In Django models.. Fo

Re: Database Views

2019-08-27 Thread Doddahulugappa.B
Thanks for your response. In Django models.. For example class TempUser(models.Model): first_name = models.CharField(max_length=100) class Meta: managed = False db_table = "temp_user" temp_user is database view. Now assume select * from temp_user Gives

Re: Database Views

2019-08-27 Thread Jani Tiainen
Hi. You really need to provide more context. Without knowing your data, tables involved in a view. Your model and query you used and query you used to verify wrong (or correct) results it is virtually impossible to help you further. ti 27. elok. 2019 klo 17.47 HULUGESH B kirjoitti: > Hi All,

Database Views

2019-08-27 Thread HULUGESH B
Hi All, I am facing issues in Django Models: If connect databse views in models. It shows less records than actual number of records. Kindly assist me. How to solve. This is not all the time.. sometimes it is correct sometimes not correct. -- You received this message because you are

Re: Weird Database behavior (Can't access object from a view after directly saving it from inside another view)

2019-08-23 Thread mohamed habib
Wow that is interesting, thank you for this update. I will be reading more about this. On Thu, Aug 22, 2019 at 2:15 PM Ahmed Shahwan wrote: > I solved the problem. > > It's related to the atomic requests. I had "ATOMIC_REQUESTS": True in the > database settings and XPAY'

Re: Weird Database behavior (Can't access object from a view after directly saving it from inside another view)

2019-08-22 Thread Ahmed Shahwan
I solved the problem. It's related to the atomic requests. I had "ATOMIC_REQUESTS": True in the database settings and XPAY's service responded so fast while the first atomic-request hadn't finished yet, so it prevented the other callback-url from accessing the same instance. Than

Re: Weird Database behavior (Can't access object from a view after directly saving it from inside another view)

2019-08-21 Thread mohammed habib
gt;> email = t_obj.get("order").get("shipping_data").get("email") >>>>>> # TODO: send mail based upon success status >>>>>> try: >>>>>> send_mail( >>>>>>

Re: Weird Database behavior (Can't access object from a view after directly saving it from inside another view)

2019-08-21 Thread Ahmed Shahwan
send_mail( >>>>>"Transaction Processed", >>>>>"Your transaction is processed", >>>>>"SERNDER MAIL", >>>>>[email], >>>>>

Re: Weird Database behavior (Can't access object from a view after directly saving it from inside another view)

2019-08-21 Thread Ahmed Shahwan
quot;: "Transaction Updated!"}, status= >>>> status.HTTP_200_OK) >>>> >>>> >>>> The 6th step (redirect-url) is irrelevant here, and not included in the >>>> XPAY's service for this payment option. >>>> >>>>

Re: Weird Database behavior (Can't access object from a view after directly saving it from inside another view)

2019-08-21 Thread mohamed habib
MAIL") >>>>print(ex) >>>> >>>> return Response({"message": "Transaction Updated!"}, status= >>>> status.HTTP_200_OK) >>>> >>>> >>>> The 6th step (redirect-url) is irr

Re: Weird Database behavior (Can't access object from a view after directly saving it from inside another view)

2019-08-21 Thread mohamed habib
rote: >>>> >>>> Are you sure the callback request passes the right parameters ? >>>> >>>> Could you share some of your views code from the 6 steps, and your >>>> Transaction model ? >>>> >>>> Sent fr

Re: Weird Database behavior (Can't access object from a view after directly saving it from inside another view)

2019-08-21 Thread Ahmed Shahwan
rvice that wraps another REST API payment >>> service, let's call the other services XPAY. It has various payment options >>> (Card, eWallet, Kiosk, and Cash). The steps required to use the services >>> (to make a transaction) >>> >>> 1. authenticat

Re: Weird Database behavior (Can't access object from a view after directly saving it from inside another view)

2019-08-21 Thread mohamed habib
ugh HTTP Requests that I issue from my service. I store some of the >> information I receive in those steps in a Model called Transaction. 5th and >> 6th steps are Callback endpoints that I create to receive further >> information about the status of the transaction that

Re: Weird Database behavior (Can't access object from a view after directly saving it from inside another view)

2019-08-21 Thread Ahmed Shahwan
/payment/kiosk > myservice/payment/cash > > myservice/payment/callback-url > myservice/payment/redirect-url > > These endpoints are wrappers for the payment methods available in XPAY's > service that my frontend apps will use to provide those payment options for > users. > > I imp

Re: Weird Database behavior (Can't access object from a view after directly saving it from inside another view)

2019-08-21 Thread mohammed habib
n from XPAY's > service. Note that it takes some time between creating the Transaction object > and saving it into the database from inside my endpoint, and updating it from > inside the callback url endpoint. > > The weird thing happens in the 4th endpoint `cash` endpoint. XPAY's service &

Weird Database behavior (Can't access object from a view after directly saving it from inside another view)

2019-08-21 Thread Ahmed Shahwan
it into the database from inside my endpoint, and updating it from inside the callback url endpoint. The weird thing happens in the 4th endpoint `cash` endpoint. XPAY's service responds very quickly on my *callback-url endpoint* and when it gets to the updating step, I get *Transaction.DoesNotExist

Re: Code wont let me pull data to modelform from database, :(

2019-08-17 Thread Kean
l try to solve your > conditions. > > > Thanks > > On Sat, 17 Aug 2019, 01:58 Kean, wrote: > Hi, > > New to Django, and am really really struggling which something maybe others > may find really easy.. > > I've created a custom database model, and the subsequent mode

Re: Code wont let me pull data to modelform from database, :(

2019-08-16 Thread RONAK JAIN
will try to solve your conditions. Thanks On Sat, 17 Aug 2019, 01:58 Kean, wrote: > Hi, > > New to Django, and am really really struggling which something maybe > others may find really easy.. > > I've created a custom database model, and the subsequent modelform > templa

Code wont let me pull data to modelform from database, :(

2019-08-16 Thread Kean
Hi, New to Django, and am really really struggling which something maybe others may find really easy.. I've created a custom database model, and the subsequent modelform template to enable creating a record and storing to database. However I am struggling to create two instances, where

Django Project - 1 database 2 schemas - Postgres database

2019-08-12 Thread LeandroL
Hi, I am working on a public project that uses Django. When I do ‘python manage.py migrate’ I get all my tables created properly on schema public. It also creates an extension hstore (and at least one of the table uses this extension). Then I rename the schema public, to for

Django GAE deployment DATABASE setting

2019-08-07 Thread Solomon Mbak
Hi guys. I've spent a few hours on this one, all to no avail. I'm trying to reply my Django App on Google App Engine, but I get errors on the database connection. I tried configurations as shown below, but it still isn't connecting. I need help please; DATABASES = { 'default': { 'ENGINE

Re: database migrations

2019-08-04 Thread Mike Dewhirst
Once I have a database I wish to replicate many times for testing I just use pg_dump to create a json file which can be reloaded into an empty database as often as required. For that I use a script which sequentially calls dropdb, createdb and finally psql which nominates the json dump file

Re: database migrations

2019-08-04 Thread Jani Tiainen
Hi. To me this sounds more debugging issue than migrations or database problem. Since it is most definitely your code that doesn't work right. Of course if youre building and testing features that fill thousands of entries or relatively complex data there are options. Personally I use

Re: database migrations

2019-08-04 Thread Perceval Maturure
Thanks Roger. On Sun, 04 Aug 2019 at 01:19, RLM wrote: > Why try to avoid re populating the database? That's the easy part, > figuring what went wrong is more difficult.You don't need a lot of data to > get an app working, you just need to understand what you want and how to

Re: database migrations

2019-08-03 Thread RLM
Why try to avoid re populating the database? That's the easy part, figuring what went wrong is more difficult.You don't need a lot of data to get an app working, you just need to understand what you want and how to achieve it. When I was learning django I rebuilt my events database 20 times

Re: database migrations

2019-08-03 Thread Perceval Maturure
Question is what’s the best way forward to avoid situations where u will have to create a new database if ur applications do not work with the current databases so as to avoid populating the database with data again Sent from my iPhone > On 02 Aug 2019, at 14:39, Perceval Maturure wr

Re: database migrations

2019-08-03 Thread Jani Tiainen
Hi. So... what is the actual question? pe 2. elok. 2019 klo 15.40 Perceval Maturure kirjoitti: > Dear all > creating a new database as applications increase has been one of the > solutions to some of the errors i have encountered especially after adding > a django cms by hand in my

database migrations

2019-08-02 Thread Perceval Maturure
Dear all creating a new database as applications increase has been one of the solutions to some of the errors i have encountered especially after adding a django cms by hand in my development environment. i cant imagine a situation like that in a production environment as this will mean re-entry

Re: What's the best way to find the number of database accesses being done?

2019-07-24 Thread Don Baldwin
logs all database queries to the django.db.backends logger. It is > not > redirected to STDOUT when using the default settings.LOGGING configuration > but you can enable it yourself[0]. > > If you wan to assert against a fixed number of queries you can use the > assertNumQueries

Re: What's the best way to update multiple entries in a database based on key/value pairs

2019-07-24 Thread Don Baldwin
> using Django < 2.2. > > Cheers, > Simon > > [0] > https://docs.djangoproject.com/en/2.2/ref/models/querysets/#bulk-update > > Le mardi 23 juillet 2019 12:15:20 UTC-4, Don Baldwin a écrit : >> >> Hi, >> >> I have a dictionary where the key is the pr

Re: What's the best way to find the number of database accesses being done?

2019-07-23 Thread Simon Charette
Hello Don, Django logs all database queries to the django.db.backends logger. It is not redirected to STDOUT when using the default settings.LOGGING configuration but you can enable it yourself[0]. If you wan to assert against a fixed number of queries you can use the assertNumQueries context

Re: What's the best way to update multiple entries in a database based on key/value pairs

2019-07-23 Thread Simon Charette
Hi, > > I have a dictionary where the key is the primary key from one of my > database tables, and the values are the values that I want to update with. > > For example, I may have the following dictionary: > > new_values = {1:'a', 2:'b', 3:'c'} > > > And the following

What's the best way to find the number of database accesses being done?

2019-07-23 Thread Don Baldwin
I have a function that runs some database queries and updates. In the test code for that function, I'd like to check out many times the database is actually being hit. Does Django provide a way to get that information? Thanks, Don -- You received this message because you are subscribed

What's the best way to update multiple entries in a database based on key/value pairs

2019-07-23 Thread Don Baldwin
Hi, I have a dictionary where the key is the primary key from one of my database tables, and the values are the values that I want to update with. For example, I may have the following dictionary: new_values = {1:'a', 2:'b', 3:'c'} And the following model: class TestThing(models.Model

Re: Can Django fill in a template based on a custom URL, if the contents of the URL match an item in the database?

2019-07-17 Thread Yoo
s & answers, and I > still don't feel like I'm any closer to the solution. I did manage to > figure out a few basics and some more complicated set-up type things in the > process: I've figure out how to connect Django to an MS SQL Server database > on a mac (using the sql_server.p

Can Django fill in a template based on a custom URL, if the contents of the URL match an item in the database?

2019-07-17 Thread Matvey Kostukovsky
nage to figure out a few basics and some more complicated set-up type things in the process: I've figure out how to connect Django to an MS SQL Server database on a mac (using the sql_server.pyodbc engine, Docker, Kitematic, and with the help of Azure Data Studio) and to display items

Re: django form not saving items to database

2019-07-08 Thread KIKOYO ISAAC
Some lessons about templates with django On Mon, Jul 1, 2019 at 8:29 AM Joe Reitman wrote: > Try this: > > > def sell(request): > if request.method == 'POST': > form = ProductsForm(request.POST) > if form.is_valid(): > print('form is valid') >

Re: need help - following django tutorial to create polls database - missing "on delete cascade" - using django 2.2.1 with mysql 8.0

2019-07-05 Thread sachin thakur
a. Mob: *+91 8792560572* *E-mail : sachin.thakur9...@gmail.com * *E-mail : sachin.tha...@mca.christuniversity.in * On Sat, Jun 29, 2019 at 3:38 AM Joe Reitman wrote: > The notes say: > >- The exact output will vary depending on the database you are using. >The ex

Re: django form not saving items to database

2019-07-01 Thread Joe Reitman
Try this: def sell(request): if request.method == 'POST': form = ProductsForm(request.POST) if form.is_valid(): print('form is valid') form.save() return redirect('home') else: form = ProductsForm()

Django Model form not saving items to database

2019-07-01 Thread brian
Model class Products(models.Model): UNIT = ( ('whole', 'whole unit'), ('item', 'per single item'), ) # category = models.ForeignKey(Category, related_name='products', on_delete=models.CASCADE) ProductName = models.CharField(max_length=255) user =

django form not saving items to database

2019-07-01 Thread brian
model class Products(models.Model): UNIT = ( ('whole', 'whole unit'), ('item', 'per single item'), ) # category = models.ForeignKey(Category, related_name='products', on_delete=models.CASCADE) ProductName = models.CharField(max_length=255) user =

Database Configuration Error

2019-06-29 Thread Soumen Khatua
Hi Folks, I'm uisng Digital Ocean provided VPS and I'm using PostgreSQL and I'm gettings this error, *File "/home/sai/saiproject/env/lib/python3.5/site-packages/psycopg2/__init__.py", line 126, in connectconn = _connect(dsn, connection_factory=connection_factory,

Re: need help - following django tutorial to create polls database - missing "on delete cascade" - using django 2.2.1 with mysql 8.0

2019-06-28 Thread Joe Reitman
The notes say: - The exact output will vary depending on the database you are using. The example above is generated for* PostgreSQL.* Are you using the default SQLite? You could try running migrate and then checking the tables to see if the constraint was added using a DB admin viewer

Re: need help - following django tutorial to create polls database - missing "on delete cascade" - using django 2.2.1 with mysql 8.0

2019-06-28 Thread Jasmine Smith
Looking into, will get back to you soon. Thanks. On Thu, Jun 27, 2019 at 8:15 PM Rudy Quiroga Gamboa wrote: > Hi, I have the same problem, did you find the problem or the solution ? > > > El martes, 28 de mayo de 2019, 20:44:44 (UTC-4), K Tan escribió: >> >> Hi, everyone, >> >> This is my first

Re: need help - following django tutorial to create polls database - missing "on delete cascade" - using django 2.2.1 with mysql 8.0

2019-06-27 Thread Rudy Quiroga Gamboa
Hi, I have the same problem, did you find the problem or the solution ? El martes, 28 de mayo de 2019, 20:44:44 (UTC-4), K Tan escribió: > > Hi, everyone, > > This is my first time using Django and I think I'm missing something or > there is a bug. I am following the instructions on ( >

Re: Why I cannot save records into database?

2019-06-24 Thread Aldian Fazrihady
How do you render your form? Can I see the content of the template file? Regards, Aldian Fazrihady On Mon, 24 Jun 2019, 20:14 Alexandru Caplat, wrote: > I have a form that in past works good but after I change some data in the > models and add image field it doesn't work. > > From admin I

Re: Django App - Database connection

2019-06-16 Thread Travis Risner
Hi Sapna, What works for me (in Django 2.2) is to use the ENGINE setting that Dave suggested: 'ENGINE':'django.db.backends.postgresql', and install the driver that Daniel suggested: psycopg2 Some database drivers are in the standard Python library (e.g. sqlite) while others need

Re: Django App - Database connection

2019-06-14 Thread Ing.Daniel Bojorge
RV2000) El vie., 14 jun. 2019 a las 8:22, Dave Edwards () escribió: > Apologies that was from when I used MySQL, please use the following for > postgres: > > DATABASES = { > 'default': { > 'ENGINE': 'django.db.backends.postgresql', > 'HOST':'HOST', > 'PORT':'PORT', >

Re: Create View not saving form data to database

2019-06-14 Thread curtly critchlow
Shouldn't they be classes? Doc > <https://docs.djangoproject.com/en/2.2/ref/models/fields/#manytomanyfield> > > On Thursday, June 13, 2019 at 8:31:29 PM UTC-5, curtly critchlow wrote: >> >> CreateView class not saving data to database. When I hit submit, the html >> th

Re: Django App - Database connection

2019-06-14 Thread Dave Edwards
y to whom they are addressed. Any dissemination, distribution or copying of this message or any files transmitted with it by an unauthorised recipient is strictly prohibited. On Fri, 14 Jun 2019 at 14:08, Sipum Mishra wrote: > Hi sapna, > > Check your settings.py file and search for DATABASE there yo

Re: Django App - Database connection

2019-06-14 Thread Dave Edwards
Apologies that was from when I used MySQL, please use the following for postgres: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', 'HOST':'HOST', 'PORT':'PORT', 'USER':'USERNAME', 'PASSWORD':'PASSWORD', 'NAME': 'DATABASE NAME', } } *Dave Edwards

Re: Django App - Database connection

2019-06-14 Thread Sipum Mishra
Hi sapna, Check your settings.py file and search for DATABASE there you can get a link which is commented. Copy n paste that url and that will take you to documentation page where you can get what needs to be imported in DATABASE. On Fri, 14 Jun, 2019, 4:45 PM Sapna Dhage, wrote: > >

Re: Create View not saving form data to database

2019-06-14 Thread curtly critchlow
els.CharField(max_length=50, unique=True) def __str__(self): return f'{self.category}: {self.test}' ``` On Thursday, 13 June 2019 21:31:29 UTC-4, curtly critchlow wrote: > > CreateView class not saving data to database. When I hit submit, the html > the page only refreshes. l'm no

Re: Create View not saving form data to database

2019-06-14 Thread curtly critchlow
%2Fdocs.djangoproject.com%2Fen%2F2.2%2Fref%2Fmodels%2Ffields%2F%23manytomanyfield=D=1=AFQjCNHcES6LF8pQ5sDe-SjXBuDfDWyMjA> > > On Thursday, June 13, 2019 at 8:31:29 PM UTC-5, curtly critchlow wrote: >> >> CreateView class not saving data to database. When I hit submit, the html &

Django App - Database connection

2019-06-14 Thread Sapna Dhage
Hello, I'm implementing Django application using PostgreSQL. However, I'm not able to configure database connection string. Any idea how do I configure database connection and where should I mention database connection string? Thank you, Sapna -- You received this message because you

Re: Create View not saving form data to database

2019-06-14 Thread Joe Reitman
saving data to database. When I hit submit, the html > the page only refreshes. l'm not getting any errors so I have no idea what > i'm doing wrong. Does CreateView automatically takes care of many to many > relationships? here is my code below, I've been trying to solve this > proble

Create View not saving form data to database

2019-06-13 Thread curtly critchlow
CreateView class not saving data to database. When I hit submit, the html the page only refreshes. l'm not getting any errors so I have no idea what i'm doing wrong. Does CreateView automatically takes care of many to many relationships? here is my code below, I've been trying to solve

Re: parse xml from url to database

2019-06-13 Thread Nuno Vieira
Hi Ewen, thanks for the reply. I have extended user model with a profile model and a new field (xml_ky). The goal is to verify each user profile and if they have an xml url on field xml_ky, than populate the database with the properties located on that url. Thanks for your help. quinta-feira

Re: parse xml from url to database

2019-06-13 Thread Nuno Vieira
quarta-feira, 12 de Junho de 2019 às 17:22:01 UTC+1, Nuno Vieira escreveu: > > Hi there. > > I´m having some problems on parsing a real estate xml to database. > The user profile have url field to import properties automatically from > xml feed (url). The user ca

Re: parse xml from url to database

2019-06-12 Thread Taylor Hughes-Scott
>> >> Hi there. >> >> I´m having some problems on parsing a real estate xml to database. >> The user profile have url field to import properties automatically from >> xml feed (url). The user can insert mannually or automatically, if the user >> insert the url feed then

Re: parse xml from url to database

2019-06-12 Thread Ewen Le Bihan
Hi, where does prof.xml_ky comes from ? Le mercredi 12 juin 2019 18:22:01 UTC+2, Nuno Vieira a écrit : > > Hi there. > > I´m having some problems on parsing a real estate xml to database. > The user profile have url field to import properties automatically from > xml feed (

parse xml from url to database

2019-06-12 Thread Nuno Vieira
Hi there. I´m having some problems on parsing a real estate xml to database. The user profile have url field to import properties automatically from xml feed (url). The user can insert mannually or automatically, if the user insert the url feed then it should be able to get the objects and save

Re: Existing database for users to use django user auths

2019-06-05 Thread Vijay Khemlani
o user authentication using a different database for users? > > -- > 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+unsub

Existing database for users to use django user auths

2019-06-05 Thread michael ababao
I am new to django and i would like to know if it is possible to use the django user authentication using a different database for users? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiv

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