Re: Makemigrations/migrate in existing database

2021-06-08 Thread Omkar D
llo 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 datab

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, 2

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 makemigra

Re: Makemigrations/migrate in existing database

2021-06-04 Thread Mahendra
I think surely run makemigrations and migrate Mahendra Yadav On Fri, 4 Jun 2021, 18:28 Ankita Sharma, wrote: > 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 > Mo

Makemigrations and migrate for already existing database

2021-06-04 Thread Ankita Sharma
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 makemigrations on one of them. Below is the error: from records.models.transactions_east import AdgSrtransaction

Makemigrations/migrate in existing database

2021-06-04 Thread Ankita Sharma
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. I just want it for data retrieval. *

Re: Hi all, i'm using 2 modelforms in one view function one as foreign key but when i submit babyform2 not storing in database. anyone please fix this

2021-06-01 Thread Lalit Suthar
because you're passing commit=False with form2 On Tue, 1 Jun 2021 at 14:10, Hugh Frost wrote: > def detail(request): > if request.method == 'POST': > baby_form1 = BabyForm1(data=request.POST) > baby_form2 = BabyForm2(data=request.POST) > > if baby_form1.is_valid() and

Hi all, i'm using 2 modelforms in one view function one as foreign key but when i submit babyform2 not storing in database. anyone please fix this

2021-06-01 Thread Hugh Frost
def detail(request): if request.method == 'POST': baby_form1 = BabyForm1(data=request.POST) baby_form2 = BabyForm2(data=request.POST) if baby_form1.is_valid() and baby_form2.is_valid(): baby_form1.save() print(baby_form1) baby_form2.b

Re: Help with a huge database query.

2021-05-31 Thread 'odrzen' via Django users
If I use the values() or values_list() the request in database has a long waiting time and some time I also got a MemoryError (because 4GB RAM is not enough). My examples: Apple.objects.select_related('Orange').filter(state='fresh').values_list( # Fields I don'

Re: Help with a huge database query.

2021-05-27 Thread David Nugent
I think a better approach to using QuerySet.defer() is to use .values() instead, explicitly specifying which fields you need to export. Just FYI rest_framework handles this out of the box and provides an API to specify not only which fields to export but filters as well. Regards /d On Fri, May

Help with a huge database query.

2021-05-27 Thread 'odrzen' via Django users
Hello Django community o/ I want to create a API call in order to get all data from a specific model ( table ) - but I want to exclude-remove only specific fields from this. So, I try to find a right way to execute this difficult and "heavy" query/request with a efficient way. This is what I hav

Re: Loading csv data in database

2021-04-30 Thread 'Amitesh Sahay' via Django users
try the below way. Its simple Writing custom django-admin commands | Django documentation | Django | | | | Writing custom django-admin commands | Django documentation | Django | | | Regards, Amitesh On Friday, 30 April, 2021, 08:28:07 pm IST, Derek wrote: Someone has

Re: Loading csv data in database

2021-04-30 Thread Derek
Someone has an example of doing just this: https://arshovon.com/blog/django-custom-command/ On Thursday, 29 April 2021 at 19:39:36 UTC+2 Ryan Nowakowski wrote: > Typically you would write a custom management command for this kind of > thing: > > https://docs.djangoproject.com/en/3.2/howto/cust

Re: Loading csv data in database

2021-04-29 Thread Nauman Khan gori
you may use pandas for this you can use it as follows:- first install it if not using python from anaconda environment! pip install pandas import pandas as pd reader=pd.read_csv("sample-dataset.csv") reader.head(3) # for viewing top 3 rows. hope this may help you -)-) On Thursday, 29 April 2021

Re: Loading csv data in database

2021-04-29 Thread Ryan Nowakowski
Typically you would write a custom management command for this kind of thing: https://docs.djangoproject.com/en/3.2/howto/custom-management-commands/ On April 29, 2021 11:05:29 AM CDT, 'Muhammad Asim Khaskheli' via Django users wrote: > >Hi, > >I wanted to ask how to load CSV data into the mode

Loading csv data in database

2021-04-29 Thread 'Muhammad Asim Khaskheli' via Django users
Hi, I wanted to ask how to load CSV data into the model. What steps do we have to follow? I have made this function but how exactly to run this code because, python manage.py load data won't work. def import_data(): with open('sample-dataset.csv') as f: reader = csv.reader(f) for row in read

Oracle database sequences generated by Django

2021-04-23 Thread Harold A
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: How Choose Random User from database ?

2021-04-20 Thread FIRDOUS BHAT
gt; Thanks ! >> >> >> >> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for >> Windows 10 >> >> >> >> *From: *Kelvin Sajere >> *Sent: *Tuesday, April 20, 2021 3:58 AM >> *To: *django...@googlegroups.com >> *Sub

Re: How Choose Random User from database ?

2021-04-20 Thread Scot Hacker
gt; *Sent: *Tuesday, April 20, 2021 3:58 AM > *To: *django...@googlegroups.com > *Subject: *Re: How Choose Random User from database ? > > > > If you just want a random user, you could just use random.choice(). You > can use it in shell, in a function or wherever you want. > &

RE: How Choose Random User from database ?

2021-04-19 Thread mustafa burhani
Thanks ! Sent from Mail for Windows 10 From: Kelvin SajereSent: Tuesday, April 20, 2021 3:58 AMTo: django-users@googlegroups.comSubject: Re: How Choose Random User from database ? If you just want a random user, you could just use random.choice(). You can use it in shell, in a function or wherever

Re: How Choose Random User from database ?

2021-04-19 Thread Kelvin Sajere
If you just want a random user, you could just use random.choice(). You can use it in shell, in a function or wherever you want. Example: import random users = User.objects.all() #a list of all users random_user = random.choice(users) #a random user On Mon, Apr 19, 2021 at 20:45 Mustafa Burhani

Re: How Choose Random User from database ?

2021-04-19 Thread Joel Tanko
if you already have a table with some rows in it, writing a random function would work just fine. # as an example from random import randint def select_random_user(): all_users = User.objects.all() selected = list(all_users)[randint(0, all_users.count())] return selected On Tue, 20 Ap

How Choose Random User from database ?

2021-04-19 Thread Mustafa Burhani
I want to Choose random user from databse is possible with django shell or need to create model ? for random function ? Thanks ! -- 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,

Re: Beginning project of displaying graphical information from a sql database

2021-04-06 Thread Ryan Nowakowski
If you already have the data you need via the API you may not need models in your case. To start out, call the API from your Django view, add the data from the resulting data frame to the context for the template. Then in the template render it however you like... charts, graphs, tables, whateve

Beginning project of displaying graphical information from a sql database

2021-04-06 Thread J R
Hello, Fairly new to Django, I've been through a few tutorials and understand the basics. My goal is to create a page which shows a defined asset's value over time compared to various social metrics tying to that asset (volume of reddit comments, twitter posts, ect.). The user will input what

Oracle database sequences generated by Django

2021-04-06 Thread Harold A
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

Please help me ? forms are not stored in database

2021-04-01 Thread Mahendra
#Model Form Django import models Class singupdata(models.model): Username=models.CharField(max_len=20) Password=models.CharField(max_len=20) #form from django import forms Class Signform (forms.form): Username=forms.IntegerFiled( labe='E mail',

Re: Django debug toolbar database query stats, but when generating pdf files?

2021-03-14 Thread Kasper Laudrup
On 14/03/2021 09.52, sakshi jain wrote: > https://youtu.be/yqiyljC3BvM > How is that in any way relevant to the question being asked? You are not going to improve you reputation by spamming. Kind regards, Kasper Laudrup -- You received this message because you

Re: Django debug toolbar database query stats, but when generating pdf files?

2021-03-14 Thread sakshi jain
https://youtu.be/yqiyljC3BvM subscribe & share On Sun, Mar 14, 2021, 09:21 richard...@gmail.com wrote: > Hi, > > I find the identification of duplicate and similar database calls in the > Django Debug Toolbar invaluable for optimizing database access. The > information sho

Django debug toolbar database query stats, but when generating pdf files?

2021-03-13 Thread richard...@gmail.com
Hi, I find the identification of duplicate and similar database calls in the Django Debug Toolbar invaluable for optimizing database access. The information shows up in an overlay over html pages. Of course, the information cannot show up when I'm generating a pdf, though I can tell fro

Re: can I use django authentication in already created mysql database with user data?

2021-03-10 Thread Kasper Laudrup
On 10/03/2021 07.54, Kevin Thomas wrote: I am creating a web app and I need to authenticate the login. The username and password is already stored in mysql database. Can I use django for authentication of existing data? It will be great help if anyone knows the answer. You can: https

can I use django authentication in already created mysql database with user data?

2021-03-10 Thread Kevin Thomas
I am creating a web app and I need to authenticate the login. The username and password is already stored in mysql database. Can I use django for authentication of existing data? It will be great help if anyone knows the answer. -- You received this message because you are subscribed to the

How to design database for saving data into table

2021-02-15 Thread Salima Begum
Hi all, By using API calculating Distance between two Zip codes(post codes) But Here is my question. When user loading page always running API is not good coding so, I want to save that into one table and show that data into classifieds page( items listings). So, Here We are calculating distance b

Re: How to intergrate openpyxl with django and using the excel sheet as the database to query data

2021-01-26 Thread Ernest Thuku
Well thank you so much for this...I really appreciate..let me try it and I will let you know On Wed, 27 Jan 2021 03:12 Gabriel Araya Garcia, wrote: > In top of views files (views.py) you must put: > import openpyxl > from openpyxl import Workbook > from openpyxl.styles import Alignment,Border,Fo

Re: How to intergrate openpyxl with django and using the excel sheet as the database to query data

2021-01-26 Thread Gabriel Araya Garcia
In top of views files (views.py) you must put: import openpyxl from openpyxl import Workbook from openpyxl.styles import Alignment,Border,Font,PatternFill,Side from openpyxl.styles import colors from openpyxl.styles import Font, Color,Fill from openpyxl.styles.borders import BORDER_THIN from openpy

Re: How to intergrate openpyxl with django and using the excel sheet as the database to query data

2021-01-26 Thread Kasper Laudrup
On 26/01/2021 21.37, Ernest Thuku wrote: Yeah that is what I am talking about. I need  to integrate this screenshot below in django now. The link name, distance etc to be in  a form. I'm not really sure I understand what you mean. You say you want to import some existing data to a dat

Re: How to intergrate openpyxl with django and using the excel sheet as the database to query data

2021-01-26 Thread Ernest Thuku
Yeah that is what I am talking about. I need to integrate this screenshot below in django now. The link name, distance etc to be in a form. On Tue, Jan 26, 2021 at 9:58 PM Kasper Laudrup wrote: > On 26/01/2021 15.19, Ernest Thuku wrote: > > Hey Kasper, yes I ned to save it as a model so that

Re: How to intergrate openpyxl with django and using the excel sheet as the database to query data

2021-01-26 Thread Kasper Laudrup
On 26/01/2021 15.19, Ernest Thuku wrote: Hey Kasper, yes I ned to save it as a model so that i can use it to access information. OK, so what you really want to do is to create a model with the same fields as the ones in your spreadsheet and then import your data into that model? /Kasper

Re: How to intergrate openpyxl with django and using the excel sheet as the database to query data

2021-01-26 Thread Ernest Thuku
Hey Kasper, yes I ned to save it as a model so that i can use it to access information. On Mon, Jan 25, 2021 at 3:03 PM Kasper Laudrup wrote: > Hi Ernest, > > On 25/01/2021 10.43, Ernest Thuku wrote: > > Hello kasper, thank you so much for the information. I know how to use > > the django forms.

Re: How to intergrate openpyxl with django and using the excel sheet as the database to query data

2021-01-25 Thread Kasper Laudrup
Hi Ernest, On 25/01/2021 10.43, Ernest Thuku wrote: Hello kasper, thank you so much for the information. I know how to use the django forms. The issue was where will I include the python file above. I'm not sure I understand the problem. The file you posted earlier just contains a Python fun

Re: How to intergrate openpyxl with django and using the excel sheet as the database to query data

2021-01-25 Thread Ernest Thuku
this is the view to the model form that i have created. def findFault(request): form = findForm(request.POST or None) if form.is_valid(): instance = form.save(commit=False) instance.user = request.user instance.save() return redirect("home") context = { 'form': form, } return render(request, 'find

Re: How to intergrate openpyxl with django and using the excel sheet as the database to query data

2021-01-25 Thread Ernest Thuku
Hello kasper, thank you so much for the information. I know how to use the django forms. The issue was where will I include the python file above. If I decide to uploadthe excel file and put store it in the django admin, how will I access its content. I hope its clear now maybe you can help. On Mo

Re: How to intergrate openpyxl with django and using the excel sheet as the database to query data

2021-01-25 Thread Kasper Laudrup
Hi Ernest, On 25/01/2021 10.25, Ernest Thuku wrote: Hello Everyone, I have a python file which I run on the terminal and give me the result that I want. I want to to do the same via a web app whereby instead of interacting with the terminal, I can do that via a browser through a form. I have

How to intergrate openpyxl with django and using the excel sheet as the database to query data

2021-01-25 Thread Ernest Thuku
Hello Everyone, I have a python file which I run on the terminal and give me the result that I want. I want to to do the same via a web app whereby instead of interacting with the terminal, I can do that via a browser through a form. I have decided to choose django as the server. Below is the file

Hi there. I need info about in memory sqlite database with django

2021-01-13 Thread Ali Sufyan
is there a way to load sqlite database in memory and then do all read/write from there then when connection closes write back to disk -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving e

Re: Conversion and import of a pre-existing database

2021-01-07 Thread gabriela...@gmail.com
Perhaps there is a utility program that can do that. Something like converter. Have you look in web foros ? El jueves, 7 de enero de 2021 a las 11:58:36 UTC-3, pe...@oneilinteractive.com escribió: > Jérémy, > > It all depends on the Database which route to take. Is it one table, &

Re: Conversion and import of a pre-existing database

2021-01-07 Thread 'Peter van der Does' via Django users
Jérémy, It all depends on the Database which route to take. Is it one table, multiple tab;es, what are the relationship? My plan of attack would be: 1. Create all models in Django as you want them to be. Use the Django standards to name your new fields [1]. 2. Let Django handle the field

Conversion and import of a pre-existing database

2021-01-07 Thread Jérémy Garniaux
a is stored into a MS SQL Server database. The new website will use PostgreSQL, so I need to convert the MSQSQL database and import it into PostgreSQL. I'm aware of inspectdb but I decided to manually write models.py from the ground to get acquainted both with the data and with django mode

Re: attempt to write a readonly database

2020-12-30 Thread Steven Mapes
>> Try running as the root user using sudo permissions. >> >> All the best >> >> On Wed, Dec 30, 2020 at 8:18 PM Steven Mapes >> wrote: >> >>> This normally means that the user you are running your project as does >>> not have access to th

Re: attempt to write a readonly database

2020-12-30 Thread Govind Kumar Yadav
rmissions. > > All the best > > On Wed, Dec 30, 2020 at 8:18 PM Steven Mapes > wrote: > >> This normally means that the user you are running your project as does >> not have access to the SQLLite database file. I can see that you are >> running on windows so fine

Re: attempt to write a readonly database

2020-12-30 Thread RANGA BHARATH JINKA
hi, Try running as the root user using sudo permissions. All the best On Wed, Dec 30, 2020 at 8:18 PM Steven Mapes wrote: > This normally means that the user you are running your project as does not > have access to the SQLLite database file. I can see that you are running on > w

Re: attempt to write a readonly database

2020-12-30 Thread Steven Mapes
This normally means that the user you are running your project as does not have access to the SQLLite database file. I can see that you are running on windows so fine the database in the file system and check and change the owner as well as ensuring that the owner/group has read/write access to

Fwd: attempt to write a readonly database

2020-12-23 Thread Parul.
Can anyone help with this? OperationalError at /users/ Request Method: POST Request URL: http://localhost:8000/users/ Django Version: 3.0.3 Exception Type: OperationalError Exception Value: attempt to write a readonly database Exception Location: C:\Users\parul\anaconda\envs\MyDjangoEnv\lib

Re: attempt to write a readonly database

2020-12-23 Thread MALVIYA IT WEB
ue: > > attempt to write a readonly database > > Exception Location: > C:\Users\parul\anaconda\envs\MyDjangoEnv\lib\site-packages\django\db\backends\sqlite3\base.py > in execute, line 396 > Python Executable: C:\Users\parul\anaconda\envs\MyDjangoEnv\python.exe > Python Version: 3

Re: attempt to write a readonly database

2020-12-23 Thread Bryan Anderson bautista garcia
on Type: OperationalError > Exception Value: > > attempt to write a readonly database > > Exception Location: > C:\Users\parul\anaconda\envs\MyDjangoEnv\lib\site-packages\django\db\backends\sqlite3\base.py > in execute, line 396 > Python Executable: C:\Users\parul\anac

attempt to write a readonly database

2020-12-23 Thread Parul.
OperationalError at /users/ Request Method: POST Request URL: http://localhost:8000/users/ Django Version: 3.0.3 Exception Type: OperationalError Exception Value: attempt to write a readonly database Exception Location: C:\Users\parul\anaconda\envs\MyDjangoEnv\lib\site-packages\django\db

Re: Migration of database

2020-12-15 Thread Kasper Laudrup
On 15/12/2020 07.50, sakshi jain wrote: help me Hopefully you can find the relevant contact information for your country of origin here: https://togetherweare-strong.tumblr.com/helpline Best of luck with your issues, whatever they are. Kind regards, Kasper Laudrup -- You received this m

Re: Migration of database

2020-12-15 Thread sakshi jain
help me On Tue, Dec 15, 2020, 12:15 Omkar Parab wrote: > Check out this video. 👇 > https://youtu.be/6DI_7Zja8Zc > > On Tue, Dec 15, 2020, 12:09 PM Dhruvil Shah wrote: > >> I have already made my project in Django and used built-in database >> Sqlite and now I want

Re: Migration of database

2020-12-15 Thread Alessandro Madruga Correia
Em ter., 15 de dez. de 2020 às 03:40, Dhruvil Shah escreveu: > I have already made my project in Django and used built-in database Sqlite > and now I want it in production on heroku so how can I switch all data from > Sqlite database to Postgresql database? > > In the source

Re: Migration of database

2020-12-14 Thread Omkar Parab
Check out this video. 👇 https://youtu.be/6DI_7Zja8Zc On Tue, Dec 15, 2020, 12:09 PM Dhruvil Shah wrote: > I have already made my project in Django and used built-in database Sqlite > and now I want it in production on heroku so how can I switch all data from > Sqlite database to P

Migration of database

2020-12-14 Thread Dhruvil Shah
I have already made my project in Django and used built-in database Sqlite and now I want it in production on heroku so how can I switch all data from Sqlite database to Postgresql database? -- You received this message because you are subscribed to the Google Groups "Django users"

Re: How can you do a for loop with a database?

2020-12-14 Thread Peter T
ll() >>> } >>> >>> Then in the template: >>> {% for item in items %} >>> {{ item.text }} >>> {% endfor %} >>> >>> Here ‘text’ is the property on the database model you want to display. >>> >>> >>> Regard

Re: How can you do a for loop with a database?

2020-12-14 Thread Shahprogrammer
ds to be a dictionary. >> >> Something like this would work: >> context = { >> ‘items’: Model.objects.all() >> } >> >> Then in the template: >> {% for item in items %} >> {{ item.text }} >> {% endfor %} >> >> Here ‘text’ is the proper

Re: How can you do a for loop with a database?

2020-12-14 Thread Peter T
: > {% for item in items %} > {{ item.text }} > {% endfor %} > > Here ‘text’ is the property on the database model you want to display. > > > Regards, > > > Andréas > > 12 dec. 2020 kl. 17:11 skrev Peter T : > > Example: > > context = (database model) &

Re: How can you do a for loop with a database?

2020-12-13 Thread Andréas Kühne
The context needs to be a dictionary. Something like this would work: context = { ‘items’: Model.objects.all() } Then in the template: {% for item in items %} {{ item.text }} {% endfor %} Here ‘text’ is the property on the database model you want to display. Regards, Andréas > 12

How can you do a for loop with a database?

2020-12-12 Thread Peter T
Example: context = (database model) def index(request): render(index.html, context) HTML Template: {% for i in context %} { database.text } -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this grou

Re: How to save all fields in form in single row into the database.

2020-11-23 Thread Naresh Jonnala
For your reference: https://docs.djangoproject.com/en/3.1/ref/forms/api/#django.forms.Form.prefix On Monday, November 23, 2020 at 6:06:46 PM UTC+5:30 sali...@rohteksolutions.com wrote: > Hi, > > We are trying to save fields in html form into one row into a database. > > mode

How to save all fields in form in single row into the database.

2020-11-23 Thread Salima Begum
Hi, We are trying to save fields in html form into one row into a database. models.py class master(models.Model): STATUS = ( ('1', 'Active'), ('0', 'InActive'), ) question_code = models.IntegerField() question_descr

How get data from database to modal popup page in Django?

2020-11-01 Thread Fuad Suleymanov
Hi, I am new in Django, already ask my question in stackoverflow but don't get any answer, may be anyonecan help me. https://stackoverflow.com/questions/64628802/how-get-data-from-database-to-modal-popup-page-in-django Thanks in advance -- You received this message because you are subsc

Re: Fetching data from database

2020-10-29 Thread Derek
one, > > Iam stuck at a point ...I want to fetch a data from a database , where > data should be insert manually , plz help me how to do that how to fire a > queries in DB and how to use primary key and foreign key over here. > Please help me ,Iam new to Django . > > Than

Re: Fetching data from database

2020-10-29 Thread kern zhou
/#django.db.models.ForeignKey You can get these informations from the official Django doc. 在2020年10月29日星期四 UTC+8 上午2:43:02 写道: > Hi everyone, > > Iam stuck at a point ...I want to fetch a data from a database , where > data should be insert manually , plz help me how to do that how to fire a > querie

Re: Fetching data from database

2020-10-28 Thread Kiran Bangde
> > python manage.py shell > > is your friend, for manually manipulating data, including the database via > the Django ORM. > > This link to the Django docs > <https://docs.djangoproject.com/en/3.1/topics/db/models/> could provide a > good starting point, particularl

Re: Fetching data from database

2020-10-28 Thread David Nugent
You question isn't very specific, however I'll try to add a couple of touch-points that may provide some direction. Django manage.py can provide direct access to your models. python manage.py shell is your friend, for manually manipulating data, including the database via the

Re: Fetching data from database

2020-10-28 Thread Ashutosh Mishra
ta from a database , where > data should be insert manually , plz help me how to do that how to fire a > queries in DB and how to use primary key and foreign key over here. > Please help me ,Iam new to Django . > > Thanks in advance > > -- > You received this message because

Fetching data from database

2020-10-28 Thread Kiran Bangde
Hi everyone, Iam stuck at a point ...I want to fetch a data from a database , where data should be insert manually , plz help me how to do that how to fire a queries in DB and how to use primary key and foreign key over here. Please help me ,Iam new to Django . Thanks in advance -- You

Re: How to get logged in user location and save it in database

2020-10-11 Thread Ram
nmate.com > Best Regards, > Divyesh Khamele, > Pythonmate > > > On Thu, 1 Oct 2020, 9:59 am Ram, wrote: > >> Hi All, >> >> I'm looking for a way to capture location of logged in users in our Web >> App and save that location into our database. >>

Re: How to get logged in user location and save it in database

2020-10-11 Thread Dvs Khamele
g for a way to capture location of logged in users in our Web > App and save that location into our database. > > Basically if we could capture this location, we would like to use it > around members account features. > > Please let me know if you have suitable pointers for thi

Re: multiple database

2020-10-11 Thread Dvs Khamele
t; May Peace, Blessings & Mercy of Almighty God be on you! >> >> Kindly throw some light on what database you are using. Are you using >> SQLite (default available with Python) or any other RDBMS like >> MySQL/Oracle??? >> Awaiting your reply. >> Thanks in advance. >>

Re: Django multiple database tests won't start

2020-10-11 Thread Dvs Khamele
maintain one application based on Django. It controls Postgresql > database. Tests cover classes and methods. Everything had been working fine > and dandy. > > I added another Postgresql database and created model classes for its > tables. No problems with access to two databases. I di

Django multiple database tests won't start

2020-10-09 Thread Alexander Shalin
Hello forum, I maintain one application based on Django. It controls Postgresql database. Tests cover classes and methods. Everything had been working fine and dandy. I added another Postgresql database and created model classes for its tables. No problems with access to two databases. I

Re: multiple database

2020-10-09 Thread Chetan Ganji
of Almighty God be on you! > > Kindly throw some light on what database you are using. Are you using > SQLite (default available with Python) or any other RDBMS like > MySQL/Oracle??? > Awaiting your reply. > Thanks in advance. > > > God Bless You! > God Bless India!

Re: multiple database

2020-10-09 Thread Khaleel Ahmed H. M. Shariff
Hi Suhaib, May Peace, Blessings & Mercy of Almighty God be on you! Kindly throw some light on what database you are using. Are you using SQLite (default available with Python) or any other RDBMS like MySQL/Oracle??? Awaiting your reply. Thanks in advance. God Bless You! God Bless I

Re: multiple database

2020-10-09 Thread Kasper Laudrup
On 09/10/2020 09.28, Suhaib Ali wrote: Hello everyone, i have some doubt regarding django database. i want to create multiple database according to the user wish. for example i want to create a company so each and every company needs their own database while creating the company https

multiple database

2020-10-09 Thread Suhaib Ali
Hello everyone, i have some doubt regarding django database. i want to create multiple database according to the user wish. for example i want to create a company so each and every company needs their own database while creating the company -- You received this message because you are

Re: How to get logged in user location and save it in database

2020-10-01 Thread Andréas Kühne
You can use built in functionality for this. All you need is an up to date IP address database. You can find one here: https://www.maxmind.com/en/geoip2-services-and-databases The geoip handling in Django will then help you find where the IP address is: https://docs.djangoproject.com/en/3.1/ref

Re: How to get logged in user location and save it in database

2020-09-30 Thread RANGA BHARATH JINKA
>> Hi, >> >>Use javascript location api >>https://www.w3schools.com/html/html5_geolocation.asp >> >>All the best >> >> On Thu, Oct 1, 2020 at 9:59 AM Ram wrote: >> >>> Hi All, >>> >>> I'm looking for a

Re: How to get logged in user location and save it in database

2020-09-30 Thread Ram
#x27;m looking for a way to capture location of logged in users in our Web >> App and save that location into our database. >> >> Basically if we could capture this location, we would like to use it >> around members account features. >> >> Please let me know

Re: How to get logged in user location and save it in database

2020-09-30 Thread RANGA BHARATH JINKA
Hi, Use javascript location api https://www.w3schools.com/html/html5_geolocation.asp All the best On Thu, Oct 1, 2020 at 9:59 AM Ram wrote: > Hi All, > > I'm looking for a way to capture location of logged in users in our Web > App and save that location

How to get logged in user location and save it in database

2020-09-30 Thread Ram
Hi All, I'm looking for a way to capture location of logged in users in our Web App and save that location into our database. Basically if we could capture this location, we would like to use it around members account features. Please let me know if you have suitable pointers for this. T

Re: Wants to make webpage auto reload whenever database is update.

2020-09-19 Thread Unnati C
Hello Saurabh, Before 3 years I solved my problem using Ajax and Javascript. If you know some front end coding try to fetch the updated data from backend database. Don't try to push it from backend to front end. Hope you get your answer. On Sunday, September 20, 2020 at 7:49:54 AM UTC

Re: Wants to make webpage auto reload whenever database is update.

2020-09-19 Thread Saurabh Pandey
my web page automatically. >>> >>> Unnati >>> >>> On Saturday, November 25, 2017 at 10:32:51 PM UTC+5:30, yingi keme wrote: >>>> >>>> You can use channels. Check out channels in django. It is a websocket >>>> library and it w

Re: How Upload Image Html File To save DataBase

2020-09-16 Thread RANGA BHARATH JINKA
ges folder path in the database. > Don't store the images directly in db. > It is not a good practice. > Instead use aws for storing images. > > Follow this tutorial series. > > https://www.youtube.com/watch?v=inQyZ7zFMHM > > All the best > > On Wed, Sep 1

Re: How Upload Image Html File To save DataBase

2020-09-16 Thread RANGA BHARATH JINKA
Hi, Store the images in a folder. Store the images folder path in the database. Don't store the images directly in db. It is not a good practice. Instead use aws for storing images. Follow this tutorial series. https://www.youtube.com/watch?v=inQyZ7zFMHM All the best On Wed, Sep 16, 2020

Re: How Upload Image Html File To save DataBase

2020-09-16 Thread waqar khan
[image: s.JPG] Please Guys Reply Me . On Wed, Sep 16, 2020 at 1:36 PM waqar khan wrote: > *I am Using dataBase Sql* > > On Wed, Sep 16, 2020 at 1:21 AM kkwaq...@gmail.com > wrote: > >> *Problem :- I have Create table and add ImageField , i wanna upload_image &

Re: How Upload Image Html File To save DataBase

2020-09-16 Thread waqar khan
*I am Using dataBase Sql* On Wed, Sep 16, 2020 at 1:21 AM kkwaq...@gmail.com wrote: > *Problem :- I have Create table and add ImageField , i wanna upload_image > Front-end and save database.*. > > > html file: But Image Not save > *I am upload using database* > > >

How Upload Image Html File To save DataBase

2020-09-15 Thread kkwaq...@gmail.com
*Problem :- I have Create table and add ImageField , i wanna upload_image Front-end and save database.*. html file: But Image Not save *I am upload using database* [image: u.JPG] *models.py* [image: i.JPG] Html Coding file [image: j.JPG] *urls.py* [image: g.JPG] -- You received

Re: djngo unittest to use "real" database.

2020-09-06 Thread Mike Dewhirst
On 7/09/2020 3:27 pm, django-newbie wrote: > Hi All, > > I am currently writing test cases for views, Which eventually uses > database also. > By default a test database is being created and removed after test are > run. A refreshed database is most likely what you want for

djngo unittest to use "real" database.

2020-09-06 Thread django-newbie
Hi All, I am currently writing test cases for views, Which eventually uses database also. By default a test database is being created and removed after test are run. As the database itself is development database, I don't want my test to create a separate db but use exciting only. Also I

Re: Weird caching issue with database query

2020-09-04 Thread Michael Jensen
w. When I query the database directly I can see the data has > been updated, but on my page when I refresh it still doesn't show data > there. Any ideas what it could be? > > This is the structure of my views.py for that page: > > cursor = connection.cursor() >

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