Oracle database

2018-11-03 Thread fatoubinetou196
Hi!!! Do you know how to use oracle database with django? -- 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.

Re: Multiple Database Setup problem !?

2018-11-02 Thread 'Tom Evans' via Django users
Hi David Your router isn't configured correctly. This applies to all the allow_foo() methods, but see allow_migrate [1] as an example: Determine if the migration operation is allowed to run on the database with alias db. Return True if the operation should run, False if it shouldn’t ru

Multiple Database Setup problem !?

2018-10-30 Thread David Lubomirov
Hello, In my project I have 3 applications, and I'm trying to split them across 2 databases. More specifically 2 of the apps and Django "auth" application should work with the first database, and the last application should remain in the second database. These are

RE: Handling Database Tables without a unique column

2018-10-29 Thread Matthew Pava
columns and tables to match Django conventions. Something I do with actual “managed = False” models is use a row number window statement to calculate the “id” field in the database view rather than use concatenation. But your way may be faster. Even so, both solutions are handled at the database

Handling Database Tables without a unique column

2018-10-29 Thread Dan Davis
I am currently leading a team handling a 16 year old database filled with junk. I think it has existed since its HTML application was served by Oracle forms. We are in production with Django, and turning off the more recent ColdFusion version this Thursday. However, some of our ways of

new Django website with old mysql database

2018-10-24 Thread Thibaud MONTAGNON
Hello, I got some problems to join my mysql database to django. I install mysqlclient and I configure : #settings.py -> DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'OPTIONS': { 'read_default_file

Re: Use tables from database with creating models

2018-10-16 Thread Rakhee Menon
NoThere is nothing as such that I hate models...InFact models have made our work easy...Its just that I am working on an old project where all the tables were created...which was not in django so I didn't knew how to access them without models... -- You received this message because you

Re: Use tables from database with creating models

2018-10-16 Thread Joel
Any reason why you hate models? On Wed, 17 Oct, 2018, 11:16 AM Rakhee Menon, wrote: > > > Yes Thank You.. > > -- > 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

Re: Use tables from database with creating models

2018-10-16 Thread Rakhee Menon
Yes Thank You.. -- 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 post to this group, send email to django-users@go

Re: Use tables from a database without creating models

2018-10-16 Thread Glen D souza
Hi, If the Data Base is already present then Django provides an handy command which will translate your Database schemas into Django models You have to run python manage.py inspectdb It will auto generate the models based on the Schema. Best way to access the data present in the db in the

Re: Help me to Generate CSV through Django View from database - and download the same

2018-10-16 Thread Mohammad Shareef M
x27;Foo', 'Bar', 'Baz']) > writer.writerow(['Second row', 'A', 'B', 'C', '"Testing"', "Here's a > quote"]) > > return response > > > On Tue, Oct 16, 2018 at 9:39 AM Share

Re: Help me to Generate CSV through Django View from database - and download the same

2018-10-16 Thread mottaz hejaze
csv"' writer = csv.writer(response) writer.writerow(['First row', 'Foo', 'Bar', 'Baz']) writer.writerow(['Second row', 'A', 'B', 'C', '"Testing"', "Here's a quote&quo

Help me to Generate CSV through Django View from database - and download the same

2018-10-16 Thread Shareef 617
Help me to Generate CSV through Django View from database - and download the same -- 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

Re: Use tables from database with creating models

2018-10-15 Thread Ігор Магур
gt; I am sorry by mistake at the end I asked a wrong question .I meant > to ask in the same manner how can I get or access data form database > without models in Django ???Is there anyway in Django to access the data > from tables without models?? > > > -- > You re

Re: Use tables from database with creating models

2018-10-15 Thread Rakhee Menon
I am sorry by mistake at the end I asked a wrong question .I meant to ask in the same manner how can I get or access data form database without models in Django ???Is there anyway in Django to access the data from tables without models?? -- You received this message because you are

Use tables from database with creating models

2018-10-15 Thread Rakhee Menon
same manner how can I get or access data from database with models in Django?? Thank You Regards Rakhee -- 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

Use tables from a database without creating models

2018-10-15 Thread Rakhee Menon
Hi, The tables are already created in a project..I just want to use the tables so please could anyone tell without creating models how to access the table data. Thanks in Advance -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsub

Re: How to migrate old database into new database using python script

2018-10-11 Thread Joel Mathew
a basic python library (again, >> depends on your sql distribution) to connect to your database and execute >> the SQL command to execute the file. >> >> I only remember how to do this in postgres specifically, but you happen >> to be using postgres as well, I can help fu

Re: How to migrate old database into new database using python script

2018-10-11 Thread carlos
or a basic SQL script. >> >> If you need to do it in python, use a basic python library (again, >> depends on your sql distribution) to connect to your database and execute >> the SQL command to execute the file. >> >> I only remember how to do this in postgres

Re: How to migrate old database into new database using python script

2018-10-11 Thread Mohammad Aqib
a basic SQL script. > > If you need to do it in python, use a basic python library (again, depends > on your sql distribution) to connect to your database and execute the SQL > command to execute the file. > > I only remember how to do this in postgres specifically, but you happen t

Re: How to migrate old database into new database using python script

2018-10-11 Thread Ryan Gedwill
Depending on the SQL distribution you're using, there should be a couple tools to do this without python using a CLI command or a basic SQL script. If you need to do it in python, use a basic python library (again, depends on your sql distribution) to connect to your database and execute th

Re: How to handle database VIEWS in Django

2018-10-11 Thread Andréas Kühne
wrote: > >> Hi everyone, >> >> I am using SQL SERVER and I have some predefines VIEWS in the database, >> what I am looking for is to manage that VIEWS >> >> >> Thank you >> >> -- >> You received this message because you are subscribed

Re: How to migrate old database into new database using python script

2018-10-11 Thread Mohammad Shareef M
Create new database and Restore the backup file Thanks & Regards, Mahammad Shareef M +919741482617 +971501340618 +971581756035 On Thu, Oct 11, 2018 at 4:01 PM Mohammad Aqib wrote: > Hi All, > I have a task to migrate all data into a new database using "backup.sql" >

How to migrate old database into new database using python script

2018-10-11 Thread Mohammad Aqib
Hi All, I have a task to migrate all data into a new database using "backup.sql" file. How to write a Python script to do this task. Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this grou

Re: How to handle database VIEWS in Django

2018-10-11 Thread Gurmeet Kaur
Just code for them in models.py just as a table. And it will work. I have done that in my project. It is working fine. On Thu, Oct 11, 2018, 1:38 AM django_learner wrote: > Hi everyone, > > I am using SQL SERVER and I have some predefines VIEWS in the database, > what I am looki

How to handle database VIEWS in Django

2018-10-10 Thread django_learner
Hi everyone, I am using SQL SERVER and I have some predefines VIEWS in the database, what I am looking for is to manage that VIEWS Thank you -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: Configuration settings for Sql Server database in django

2018-10-10 Thread Rakhee Menon
Hi Vinod, Thanks for the quick response ...I also had doubt regarding which version of python and django are supported for SQL Server 2014. Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop recei

Re: Configuration settings for Sql Server database in django

2018-10-10 Thread 'Vinod Kumar' via Django users
n Wed, Oct 10, 2018 at 11:50 AM Rakhee Menon wrote: > Hello Everyone, > > Please could anyone specify what are the configuration settings to be done > in Django for using SQL Server 2014 as database instead of the default > sqlite. > > Thanks in Advance > Rakhee > > -

Configuration settings for Sql Server database in django

2018-10-09 Thread Rakhee Menon
Hello Everyone, Please could anyone specify what are the configuration settings to be done in Django for using SQL Server 2014 as database instead of the default sqlite. Thanks in Advance Rakhee -- You received this message because you are subscribed to the Google Groups "Django

Re: Change sqlite database to sql server

2018-10-09 Thread Jason
the error is saying your remote server doesn't allow external connections, so look at the docs for how to enable that -- 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 emai

Re: Change sqlite database to sql server

2018-10-09 Thread Rakhee Menon
Hey Thanks!!! but now I get this error , Actually I am trying it on my localhost machine not able to figure out what exactly is the issue. TCP Provider: No connection could be made because the target machine actively refused it.\r\n (10061) (SQLDriverConnect); [08001] [Microsoft][ODBC Driver 1

Re: Refer tutorials to make multitenant application with shared database with multiple schma

2018-10-09 Thread Devender Kumar
(UTC-6), Devender Kumar > escribió: >> >> Hi, >> I need a help from you I wanna start a project which is a multitenant >> application and I want the tenant can register themselves and schema is >> created for him from the shared database across tenants. >>

Re: Change sqlite database to sql server

2018-10-07 Thread Vishvajit Pathak
> of the default sqlite database. > While I do the changes I get the following error > > django.db.utils.InterfaceError: ('IM002', '[IM002] [Microsoft][ODBC Driver > Manager] Data source name not found and no default driver specified (0) > (SQLDriverConnect)'

Re: Change sqlite database to sql server

2018-10-07 Thread Jason
You might have some trouble with SQL Server http://nightlyclosures.com/2018/01/08/working-with-mssql-in-django/ but sounds to me you haven't installed the driver or anything else for django to talk to SQL server. have you insalled https://bitbucket.org/Manfre/django-mssql or any of the equival

Change sqlite database to sql server

2018-10-07 Thread Rakhee Menon
Hi everyone, I have a developed project in which I am trying to use sqlserver instead of the default sqlite database. While I do the changes I get the following error django.db.utils.InterfaceError: ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source name not found

RE: I put 3 more fields on database models

2018-10-06 Thread Deepak Kumar jha
After adding fields in model you have to do 1:python manage.py makemigrations (app_name) 2: Python manage.py migrate Sent from my Windows 10 phone From: Bleron Uka Sent: 07 October 2018 03:33 AM To: Django users Subject: I put 3 more fields on database models Hi,  My database has data there

Re: I put 3 more fields on database models

2018-10-06 Thread daniel main
Hello. Try and make the migrations then migrate. I hope that helps On Oct 7, 2018 01:03, "Bleron Uka" wrote: Hi, My database has data there and i add 3 more inputs and i am having this error ?! -- You received this message because you are subscribed to the Google Groups "Djan

Re: I put 3 more fields on database models

2018-10-06 Thread Manjunath
Seems like you have not performed migrations after adding the new fields. execute these commands & then run your server. python manage.py makemigrations python manage.py migrate On Sunday, October 7, 2018 at 3:33:54 AM UTC+5:30, Bleron Uka wrote: > > Hi, > My database has dat

I put 3 more fields on database models

2018-10-06 Thread Bleron Uka
Hi, My database has data there and i add 3 more inputs and i am having this error ?! -- 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

Re: Saving data from HTML form into the database

2018-10-04 Thread Roshan Jha
m.is_valid(): empform.save() On Thu, Oct 4, 2018 at 2:54 PM Jaydeep Borkar wrote: > I want to save the data entered by the user into the HTML form(pure HTML) > into the database. I'm a complete newbie in Django, what I found is Django > forms can do the job, but still I can't f

Saving data from HTML form into the database

2018-10-04 Thread Jaydeep Borkar
I want to save the data entered by the user into the HTML form(pure HTML) into the database. I'm a complete newbie in Django, what I found is Django forms can do the job, but still I can't figure it out. Please, provide me with a detailed answer/link for this. I'm using Django 1.

Re: Refer tutorials to make multitenant application with shared database with multiple schma

2018-10-02 Thread heriberto ochoa
d I want the tenant can register themselves and schema is > created for him from the shared database across tenants. > I want to make this application in Django I know all the terminology of > how multitenancy can be achieved I just want to how to write the code for > this as I have n

Re: Can anyone share code for uploading csv or excel file to sqlite3 database.

2018-09-28 Thread PASCUAL Eric
Subject: Re: Can anyone share code for uploading csv or excel file to sqlite3 database. I have tried this but not working def upload_csv(request): data = {} if "GET" == request.method: return render(request, "add_student/bulk.html", data) # if not GET,

Re: Can anyone share code for uploading csv or excel file to sqlite3 database.

2018-09-28 Thread Andréas Kühne
>> >> >> You'll find there all the needed information for reading and interpreting >> CSV files without having to implement the raw parsing, and have there rows >> in a form ready to use for inserting objects in your model. >> >> >> For perf

Re: store CSV content to database in django

2018-09-28 Thread PASCUAL Eric
e CSV content to database in django Can anyone share code for uploading CSV file content to 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 t

Re: Can anyone share code for uploading csv or excel file to sqlite3 database.

2018-09-28 Thread Derek
There's blog article on Excel import here: https://www.pythoncircle.com/post/591/how-to-upload-and-process-the-excel-file-in-django/ On Thursday, 27 September 2018 01:35:47 UTC+2, BBG wrote: > > I want to create upload bulk data. Can anyone share code to upload csv or > excel file. > -- You

Re: Can anyone share code for uploading csv or excel file to sqlite3 database.

2018-09-27 Thread BBG
> > > For performance's sake, it is advised to use bulk inserts or updates > instead on individual saves on the Django side if your CSV files contain a > lot of data. > > > Best > > > Eric > -- > *From:* django...@googlegrou

store CSV content to database in django

2018-09-27 Thread BBG
Can anyone share code for uploading CSV file content to 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...@googlegrou

Re: Can anyone share code for uploading csv or excel file to sqlite3 database.

2018-09-27 Thread PASCUAL Eric
Wednesday, September 26, 2018 6:04:09 PM To: Django users Subject: Can anyone share code for uploading csv or excel file to sqlite3 database. I want to create upload bulk data. Can anyone share code to upload csv or excel file. -- You received this message because you are subscribed to the Google Group

Can anyone share code for uploading csv or excel file to sqlite3 database.

2018-09-26 Thread BBG
I want to create upload bulk data. Can anyone share code to upload csv or excel file. -- 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...@

Explicitly setting 'created' date for Users when importing from Legacy database

2018-09-24 Thread Chris Routh
Hi folks, I'm wondering if there is a way to override the automatic 'creation' date for a user for an initial import of users from a legacy database, but then use normal created date settings the rest of the time. I imagine I need to override the user model, however I would

Re: Create tables for models in your database

2018-09-22 Thread Dheeraj Kumar
Thanks. I'm going to install pycharm now. On Sat, 22 Sep 2018 at 18:03, Kasper Laudrup wrote: > Hi, > > On 22/09/2018 14.21, talk...@gmail.com wrote: > > > > getting an error while run this code... > > > > "/home/dheerajkumar/djangogirls/myvenv/myproject/blog/models.py", > > line 6 >

Re: Create tables for models in your database

2018-09-22 Thread Kasper Laudrup
Hi, On 22/09/2018 14.21, talk...@gmail.com wrote: getting an error while run this code... "/home/dheerajkumar/djangogirls/myvenv/myproject/blog/models.py", line 6     author = models.Foreignkey('auth.User', on_delete=models.CASCADE) ^ IndentationError:

Create tables for models in your database

2018-09-22 Thread talkdkg
Hi getting an error while run this code... python manage.py makemigrations blog Traceback (most recent call last): File "manage.py", line 22, in execute_from_command_line(sys.argv) File "/home/dheerajkumar/.local/lib/python2.7/site-packages/django/core/management/__init__.py", line 36

Re: Refer tutorials to make multitenant application with shared database with multiple schma

2018-09-19 Thread Andréas Kühne
This is not possible with the mysql database, as mysql doesn't support schemas. Schemas in mysql creates multiple databases - this means that you will have to create a new database for each client. Postgres is a much better solution for these types of things. Regards, Andréas Den ons 1

Re: Refer tutorials to make multitenant application with shared database with multiple schma

2018-09-19 Thread Michal Petrucha
him from the shared database across tenants. > I want to make this application in Django I know all the terminology of how > multitenancy can be achieved I just want to how to write the code for this > as I have never played with schemas and other stuff. > You refer to any project where I

Re: Refer tutorials to make multitenant application with shared database with multiple schma

2018-09-19 Thread Joel
from you I wanna start a project which is a multitenant > application and I want the tenant can register themselves and schema is > created for him from the shared database across tenants. > I want to make this application in Django I know all the terminology of > how multitenancy can be

Re: Refer tutorials to make multitenant application with shared database with multiple schma

2018-09-19 Thread Devender Kumar
All this should be done using the MySQL database. On Wednesday, September 19, 2018 at 12:39:20 PM UTC+5:30, Devender Kumar wrote: > > Hi, > I need a help from you I wanna start a project which is a multitenant > application and I want the tenant can register themselves and schema i

Refer tutorials to make multitenant application with shared database with multiple schma

2018-09-19 Thread Devender Kumar
Hi, I need a help from you I wanna start a project which is a multitenant application and I want the tenant can register themselves and schema is created for him from the shared database across tenants. I want to make this application in Django I know all the terminology of how multitenancy can

Re: Recreate all tables in mysql after dropping the database

2018-09-17 Thread Daniel Roseman
issing tables. Then I dropped the database, since all I had was > development data. > It wouldn't do the makemigrations, still complaining about missing > columns. I deleted migration files, pycache.. Nothing helped. > Finally, I commented imports of models and forms in my code

Re: Recreate all tables in mysql after dropping the database

2018-09-17 Thread Joel
Thank you. That is how I fixed it yesterday late night after spending hours on it. For anyone else that may find it useful, I had dropped the tables to fix this. But that ended complaining about missing tables. Then I dropped the database, since all I had was development data. It wouldn't d

Re: Recreate all tables in mysql after dropping the database

2018-09-17 Thread Michal Petrucha
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 Hi Joel, On Sun, Sep 16, 2018 at 10:16:42PM +0530, Joel Mathew wrote: > I tried to fix mysql problems in my database by dropping tables. When that > didnt work, I dropped the database. > I then recreated the database, and tri

Re: Recreate all tables in mysql after dropping the database

2018-09-16 Thread Mark Phillips
This is how I do it: 1. drop the database 2. create the database. 4. make sure the user identified in your settings.py can still access the database 5. delete the migrations 6. run all migrations Your new db should be populated with all the initial tables. Take a look at this, https

Recreate all tables in mysql after dropping the database

2018-09-16 Thread Joel Mathew
I tried to fix mysql problems in my database by dropping tables. When that didnt work, I dropped the database. I then recreated the database, and tried to run makemigrations. But I am getting errors about missing tables: joel@hp:~/myappointments$ python3 manage.py makemigrations Traceback (most

Re: Cannot migrate database development changes to Live Database (Production)

2018-08-29 Thread Mikhailo Keda
Let me clarify, you added just one new model B that has a foreign key to existing model A and Django complains that A doesn't exist, right? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails

Cannot migrate database development changes to Live Database (Production)

2018-08-29 Thread Abhigyan Tiwari
Hi, We had our first deployment recently. Later, we were in the development stage for a month on copy of the live database locally. Today we tried to migrate the changes to the production database but were unable to due to table creation errors. We are having a new table (model) with nullable

Re: Django database problem

2018-08-27 Thread Mikko Meronen
Kühne wrote: >>> >>> The management command could be wrapped within a transaction, this would >>> then in the database create a lot of models, but if the transaction fails - >>> the rollback will not reset the database id. >>> >>> Regards, >&

Re: Django database problem

2018-08-27 Thread Andréas Kühne
Monday, August 27, 2018 at 3:50:28 AM UTC-4, Andréas Kühne wrote: >> >> The management command could be wrapped within a transaction, this would >> then in the database create a lot of models, but if the transaction fails - >> the rollback will not reset the database id.

Re: Django database problem

2018-08-27 Thread Jason
is would > then in the database create a lot of models, but if the transaction fails - > the rollback will not reset the database id. > > Regards, > > Andréas > > > Den sön 26 aug. 2018 kl 12:29 skrev Mikko Meronen >: > >> Hi, >> >> Thanks for advi

Re: Django database problem

2018-08-27 Thread Andréas Kühne
The management command could be wrapped within a transaction, this would then in the database create a lot of models, but if the transaction fails - the rollback will not reset the database id. Regards, Andréas Den sön 26 aug. 2018 kl 12:29 skrev Mikko Meronen < mikkovillemero...@gmail.

Re: Django database problem

2018-08-26 Thread Jason
yeah, there is a limit, and its set by the data type you use for the id field. by default, id is set to IntegerField which has a maximum value of 2147483647 sounds like the issue with the ids jumping aro

Re: Django database problem

2018-08-26 Thread Mikko Meronen
doing that? I'm not using django custom command (if that makes the difference or can be used for my case, I will get familiar with it a bit later), I'm just inserting the data to django's database with separate python code. -Mikko ma 20. elok. 2018 klo 20.41 Jani Tiainen (re

Re: how to import serveral csv into database by using migrations.RunPython

2018-08-22 Thread Mike Dewhirst
On 23/08/2018 1:32 AM, emmanuel wyckens wrote: Hello, The class below didn't work if you use migrations.RunPython several times. Have you got an idea to manage double csv file importation into database ? In your migration file ... from django.db import migrations, models from .utils i

how to import serveral csv into database by using migrations.RunPython

2018-08-22 Thread emmanuel wyckens
Hello, The class below didn't work if you use migrations.RunPython several times. Have you got an idea to manage double csv file importation into database ? Thanks Emmanuel class Migration(migrations.Migration): dependencies = [ ("contact", "0001_initial"

Re: Django Database Table Front End Editing

2018-08-22 Thread Mikhailo Keda
Check the documentation: https://docs.djangoproject.com/en/2.1/ref/databases/#connecting-to-the-database https://docs.djangoproject.com/en/2.1/topics/forms/ https://docs.djangoproject.com/en/2.1/ref/templates/ -- You received this message because you are subscribed to the Google Groups "D

Django Database Table Front End Editing

2018-08-22 Thread Sandeep Khatri
Hi, I am using a django framework and wants to fetch data from mysql database table. I also wants user to edit and update table column data at ui/ frontend. Please help me out with this issue. Thanks and Regards, Sandeep Khatri -- You received this message because you are subscribed to the

Re: Unable to migrate changes of model in database.

2018-08-21 Thread Mikhailo Keda
Please show your code for models and provide more details about changes that wasn't reflected Did you have any errors or warnings? What version of Django are you using? > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from th

Re: Unable to migrate changes of model in database.

2018-08-21 Thread Mikhailo Keda
butes. > > The first migration went well and I could see the table in database > (postgres). > > However, when I modified the model, the migration is unable to pick the > changes. > > Any inputs would be highly appreciated. > > Thanks, > > Roshan | zaaroshan0...@gm

Unable to migrate changes of model in database.

2018-08-21 Thread Roshan Jha
Hi All, I had created a class based model with attributes. The first migration went well and I could see the table in database (postgres). However, when I modified the model, the migration is unable to pick the changes. Any inputs would be highly appreciated. Thanks, Roshan | zaaroshan0

Re: Django database problem

2018-08-20 Thread Jani Tiainen
Hi, Instead of doing everything by hand I would recommend doing a custom management command in Django. Because management commands live inside Django ecosystem you get full benefits of Django. Migrations to setup database tables from model definitions. Models and ORM to interact with database

Re: Django database problem

2018-08-20 Thread Mikko Meronen
copg2.ProgrammingError: syntax error at or near "OR"* *LINE 1: INSERT OR IGNORE INTO testi (url, title, published) VALUES (...* -Mikko 2018-08-17 19:09 GMT+03:00 Mikhailo Keda : > You could generate models from sqlite database - > https://docs.djangoproject.com/en/2.1/howto/legac

Re: Django database problem

2018-08-17 Thread Mikhailo Keda
You could generate models from sqlite database - https://docs.djangoproject.com/en/2.1/howto/legacy-databases/ Than switch to PostgresQL -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiv

Re: Django database problem

2018-08-17 Thread Okware Aldo
I wish someone could help me. > > I'm building a webpage where my python program/bot collects data from > webpages. > > Is there a way that I can use my python program to store the data to > django's database? > > At the moment when I run my program, I collect the data

Re: Django database problem

2018-08-17 Thread Anirudh Jain
You will have to create a database on your system first (it is better to use mysql instead of sqlite) and then run commands :- 1. python manage.py makemigrations 2. python manage.py migrate Also you will have to create forms (forms.ModelForm or forms.Forms) for taking input. On Fri, 17 Aug 2018

Django database problem

2018-08-17 Thread Mikko Meronen
Hi, I'm quite new with django and python and I wish someone could help me. I'm building a webpage where my python program/bot collects data from webpages. Is there a way that I can use my python program to store the data to django's database? At the moment when I run my program

Django - Upload PDF and Excel file to mysql database

2018-08-15 Thread Sainath Bavugi
I have written a code to upload an excel sheet and save the contents to MySQL database. Below is the code to upload the file in memory. form = UploadFileForm(request.POST,request.FILES) if form.is_valid(): file_in_memory = request.FILES['file'].read() wb = load_workbook(filena

Cant save data to Database

2018-08-14 Thread Sandipan Saha
This is my problem can't solve it https://stackoverflow.com/questions/51780184/how-to-save-multiple-model-forms-which-are-in-11-simultaneously-in-a-view-dj/51783231#51783231 -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from thi

How to get oauth access token data saved in database

2018-08-13 Thread proshops19
To be able to make API calls on behalf of the user who granted access to django app, I have done the following : I have added the field below to the UserAssociation class in the django-authopenid models (see link

Re: i want to save is_staff value true in db but not save in database

2018-08-04 Thread Lalit Kumar
. You > can then proceed to change that model, and save it again. > > > > if form.is_valid(): > >instance = form.save(commit=False) # get the model instance > from the filled-out form without saving it to the database > >instance

Re: Django dynamic Database

2018-08-03 Thread Mikhailo Keda
Do you mean multi-tenancy? If so - check those apps - https://djangopackages.org/grids/g/multi-tenancy/ -- 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-u

Re: Django dynamic Database

2018-08-03 Thread carlos
What ? Need more information when you say dynamic database El vie., 3 de ago. de 2018 5:36 a. m., Cheran Rj escribió: > Hi! how to create dynamic database for each user or organisation > > -- > You received this message because you are subscribed to the Google Groups > "

Django dynamic Database

2018-08-03 Thread Cheran Rj
Hi! how to create dynamic database for each user or organisation -- 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...@googlegrou

RE: i want to save is_staff value true in db but not save in database

2018-08-02 Thread Matthew Pava
(): instance = form.save(commit=False) # get the model instance from the filled-out form without saving it to the database instance.is_staff = True # modify the instance by changing the is_staff attribute to True instance.save() # save the instance of the model to the database

Re: i want to save is_staff value true in db but not save in database

2018-08-01 Thread Lalit Kumar
called > > On Wed, Aug 1, 2018 at 1:06 PM, lalitaquasoft > wrote: > >> *Advance Thanks for your help:* >> >> >> *is_staff value is not save in database* >> >> *Here is Code:* >> >> from django.contrib.auth import login, authenticate &

Need to query a resultset from database in Django using a form

2018-08-01 Thread ryerekar
I have a form which is editing a database entry and saving the changes back to the database. after the changes are saved, I want to redirect to a contract.html, where I want to populate the details of that entry. below is the view: *def edit_res(request, pk=None): if request.method == '

Re: i want to save is_staff value true in db but not save in database

2018-08-01 Thread mazz ahmed
set is_staff to true to Account model in django model after that save method will be called On Wed, Aug 1, 2018 at 1:06 PM, lalitaquasoft wrote: > *Advance Thanks for your help:* > > > *is_staff value is not save in database* > > *Here is Code:* > > from django.c

i want to save is_staff value true in db but not save in database

2018-08-01 Thread lalitaquasoft
*Advance Thanks for your help:* *is_staff value is not save in database* *Here is Code:* from django.contrib.auth import login, authenticate from django.shortcuts import render, redirect from blog.forms import SignUpForm def signup(request): if request.method == 'POST':

Re: [Channels] How to write tests with database access?

2018-07-30 Thread Bill Torcaso
to > wonder if asynchronous tests + database manipulation are naturally and > painlessly compatible. > > Le dimanche 22 juillet 2018 18:44:52 UTC+2, Andrew Godwin a écrit : >> >> Asynchronous testing is very hard, unfortunately. I suspect what you are >> doing i

Re: [Channels] How to write tests with database access?

2018-07-28 Thread Neraste
Thanks for the hint, Andrew. I think it is a neat approach. But I start to wonder if asynchronous tests + database manipulation are naturally and painlessly compatible. Le dimanche 22 juillet 2018 18:44:52 UTC+2, Andrew Godwin a écrit : > > Asynchronous testing is very hard, unfortunat

Re: [Channels] How to write tests with database access?

2018-07-22 Thread Andrew Godwin
This sounds like a pretty newbish question, but I am struggling on how to > write tests for Django-channels 2 websocket consumers that access the > database. I am not familiar with pytest and asynchronous programming (the > bread and butter of Channels testing), so while I caught up with pyt

<    3   4   5   6   7   8   9   10   11   12   >