Re: create a database

2011-05-18 Thread Shawn Milochik
Sure, you can do this. Just write a Python script that imports settings (it should be on your PYTHONPATH) and read the database config info, and do your thing. The Django settings file is just a Python script, and all the settings in it are just Python objects (dictionaries, tuples, etc

Re: create a database

2011-05-18 Thread refreegrata
ok, thanks i forget that the settings.py is just a python script. On 18 mayo, 11:02, Shawn Milochik wrote: > Sure, you can do this. > > Just write a Python script that imports settings (it should be on your > PYTHONPATH) and read the database config info, and do your thing. The >

Django Optimization: Database Access

2011-07-03 Thread Anand Agarwal
Hi All Recently we migrated from Django 1.1 to django 1.2 for our product BootStrapToday <http://bootstraptoday.com>. We had to do some changes to optimize database queries on django 1.2. Here are some of our learnings, which might be useful to the group. http://bit.ly/lfoab0 Regards Anan

Error with test database

2012-02-08 Thread xina towner
Hello, I've a problem, I have to created a script that makes my database in a specifically order but when I want to make test django do it in a different order. How can I solve this? because it can't create the database so I can't test my app. Can I change the order how djang

Translation inside the database

2012-02-08 Thread Thorsten Sanders
Hello, I have tables having translation like this: name_en,name_de,name_fr... With google I found 2 solutions which support that, but they dont allow to use those fields then with order,filter, values etc...so its kinda useless. With some trying arround, I came up with the following: from

Re: sqlite3 database error

2012-02-13 Thread Babatunde Akinyanmi
After specifying the path to where you want your sqlite database to be i.e db name setting, after your syncdb, the database will be created automatically if it doesn't already exist in the path you stated. On 2/13/12, Marcus Maximus wrote: > Hey guys, > > i am using sqlite3 for

Re: sqlite3 database error

2012-02-13 Thread ajohnston
': 'django.db.backends.sqlite3',  # Add > 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. >         'NAME': 'C:\Users\Maximus\Desktop\Webseite\Django\sqlite-shell- > win32-x86-3071000\test.db',  

Re: sqlite3 database error

2012-02-13 Thread ajohnston
Sorry. To be clearer, I should have said. In your db file name: C:\Users\Maximus\Desktop\Webseite\Django\sqlite-shell-win32- x86-3071000\test.db try changing the \ to / See: https://docs.djangoproject.com/en/dev/ref/settings/#name -- You received this message because you are subscribed to the

Re: sqlite3 database error

2012-02-13 Thread Stanwin Siow
Try this: >> DATABASES = { >> 'default': { >> 'ENGINE': 'django.db.backends.sqlite3', # Add >> 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. >>

Re: sqlite3 database error

2012-02-13 Thread ajohnston
Also 'Webseite' in your file path may be misspelled? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@goog

Re: sqlite3 database error

2012-02-13 Thread Tom Evans
On Mon, Feb 13, 2012 at 4:01 PM, Dennis Lee Bieber wrote: > On Mon, 13 Feb 2012 01:50:12 -0800 (PST), Marcus Maximus > wrote: > > >>        'NAME': 'C:\Users\Maximus\Desktop\Webseite\Django\sqlite-shell- >>win32-x86-3071000\test.db',                  

Re: Database test error

2012-02-14 Thread akaariai
On Feb 13, 11:09 am, xina towner wrote: > Hello, I still get this error: > The problem es the order that django creates the tables in the database. > Can I change this? Are you sure the problem is not that importing the tests will generate a query? The offending place seems to be: &

Database image from models

2012-02-14 Thread galgal
Is there any free app to generate database image schema from all models from all apps? I need image with tables and relations shown. Thanks for help. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the

load settings on database

2012-02-15 Thread Anderson Borges
Hey guys I am learning django and I have a question I have a table in my database call SettingsUser so how can I load this table to all views on my application? I do not want past and copy to each function in my view and I don't know if I can load just once before de view is call. thank

Re: Django database-api

2012-04-03 Thread Eugenio Minardi
Hi, Do you mean the SQL generated by your model? In this case you can use python manage.py sql APPNAME On Tue, Apr 3, 2012 at 8:45 AM, KasunLak wrote: > Hi all, > > I just wonder is there a way to browse/view the code of database api > methods generated? Is there any t

Re: Django database-api

2012-04-03 Thread KasunLak
Hi, No, sorry for not giving more details. What I am asking is once we syncdb the generated scripts (create table). Can we see the method implementation of database access api? For example: If we have created and deployed a model called Poll (tutorial example in django site) p

Re: Django database-api

2012-04-03 Thread akaariai
On Apr 3, 11:27 am, KasunLak wrote: > Hi, > > No, sorry for not giving more details. What I am asking is once we > syncdb the generated scripts (create table). Can we see the method > implementation of database access api? > > For example: If we have created and deploye

Re: Django database-api

2012-04-03 Thread KasunLak
(edit existing methods, add new methods..) the generated database api it would be good. Thanks again, Kasun On Apr 3, 1:41 pm, akaariai wrote: > On Apr 3, 11:27 am, KasunLak wrote: > > > Hi, > > > No, sorry for not giving more details. What I am asking is once we > > syn

Django Database Management App

2012-04-20 Thread dumb906
I've just upped my app to a relatively stable release though still beta. Check it out at https://github.com/dumb906/tiote or you can get from pip using the handle "tiote". It supports Database CRUD applications. If you ever knew Sqlbuddy and needed some sort of variant for your

django connect alternate database.

2012-05-25 Thread Min Hong Tan
hi, I have a situation. currently i have one default django 's database. but, i wound like to connect to mssql/other database. - how can i get connected to ms-sql/other database? - is it we have to create class in models? the database is for read only. Hope able to get the information. Re

Re: Tutorial database problem

2012-05-27 Thread Jirka Vejrazka
Hi, you're creating your database file in /usr/bin which is intended for system executable files, not databases etc. It's highly likely that you don't even have write permissions there (unless you work using the "root" account which is a big NO-NO). Set your database

Re: Tutorial database problem

2012-05-27 Thread phantom21
initially I'd created given the path as /home/mark/database/mark.db but that gave me the same error so I wanted to try creating it in the same place as sqlite3 existed, with the same results. Mark On May 27, 6:29 am, Jirka Vejrazka wrote: > Hi, > >   you're creating your da

Database Query in Shell

2012-05-27 Thread Sandeep kaur
I have a table Amounts which has 2 columns field and other_field. These columns are filled in such a way that either other_field is null or other_field = field. I want to make a database query such that if field == other_field : field = "OTHER" else: field = field That means the

Re: Tutorial database problem

2012-05-27 Thread Fadi Samara
Hi, I'm not creating it outside the project path, I create /u01/my-project and gave it 755 permission, and have use default path for the database file to be in the same directory of the manage.py file. I'm using a normal user (not root), but I think the Apache user does not have

Re: Tutorial database problem

2012-05-27 Thread Fadi Samara
so have you found any solution? On Sun, May 27, 2012 at 8:55 PM, phantom21 wrote: > initially I'd created given the path as /home/mark/database/mark.db > but that gave me the same error so I wanted to try creating it in the > same place as sqlite3 existed, with the same res

Re: Tutorial database problem

2012-05-27 Thread phantom21
found any solution? > > > > > > > > > > On Sun, May 27, 2012 at 8:55 PM, phantom21 wrote: > > initially I'd created given the path as /home/mark/database/mark.db > > but that gave me the same error so I wanted to try creating it in the > > same place as sqlite3 exi

Getting the Database Version

2012-05-27 Thread Vanessa Gomes
Hello, guys. Does anyone know where I can find the name / version of the database? For example, if I'm using PostegreSQL, want it returned something like "8.4.11 PostgreSQL, psycopg2 2.4.4." -- Vanessa Gomes de Lima Graduanda em Ciência da Computação - 2009.1 - Centro de Inf

Re: Tutorial database problem

2012-05-27 Thread phantom21
See above. Initially I had tried /home/mark/database/mark.db, but got the same error, so I tried it in the directory sqlite3 executable resides. Got THE SAME ERROR! The error has nothing to do with where the database resides it seems. The error seems to indicate some issue with the ENGINES line

Re: Tutorial database problem

2012-05-27 Thread ajohnston
What happens if you do: $ python manage.py shell ## at the bash prompt >> import django.db.backends.sqlite3 ## in the python shell If you get an error, you might try reinstalling django. But I'm not sure what the problem is/was. Your DATABASES code looks fine. -- You receive

Re: Tutorial database problem

2012-05-28 Thread Gelonida N
On 05/27/2012 05:38 AM, phantom21 wrote: I've tried to set up the database as sqlite3. I keep getting an error on the ENGINE line, but can't figure out why as it looks correct. Here is the database section: DATABASES = { 'default': { 'ENGINE'

Retrieve datas from database

2012-06-04 Thread by-neron
hi there, i'm new with Django. What i want is that retrieve some datas from db. First of all, i have a project called mysite and project has an application called blog. Project file has template/ directory which includes html files of site.Additionally, blog application has a model like that cl

Re: Tutorial database problem

2012-05-28 Thread phantom21
May 28, 4:57 am, Gelonida N wrote: > On 05/27/2012 05:38 AM, phantom21 wrote: > > > > > > > > > > > I've tried to set up the database as sqlite3.  I keep getting an error > > on the ENGINE line, but can't figure out why as it look

Retrieve Data from Database

2012-07-24 Thread Madhu
Hi! I am new in django, i want to get the table from one table also want the some content from another table. Can anybody tell me how it should be done? My module class structure is as below class A(models.Model): name =models.CharField(max_length=100) content = models.CharField(max_len

ContentType and multiple database

2012-08-01 Thread Àlex Pérez
Hello, I want to take objects of another project that i don't have installed. I can have the contenttype of the external object but I can't take the object I understand that, take the object remotly of a model thah you dosen't have have the class is not possible (I think...) but if i want only a

Populate database from views

2012-10-25 Thread Coulson Thabo Kgathi
is it possible to do this? i have data that i recieve into the view from my template and i want to save that data which is in an array in my view to a database anybody help or link to where i can learn a way to do that thanks a lot -- You received this message because you are subscribed to

Multi Database + Huge lookups

2012-11-19 Thread alexandre...@gmail.com
Hi I've a big project implemented in Delphi/C++/MSSQL that I want to migrate to the WEB and Python/Django is my choice. But I'm getting some dificulties probably due to the backgroud I came from. 1- I've have several databases One of them is for static tables like zipcodes Districts countrys, an

Re: Database Transaction Migration

2013-01-24 Thread Sandeep kaur
> I haven't used South for complex data migrations, but I think it's > most useful just after (or simultaneously to) doing the schema > of course, if both old and new applications are written with Django > and handle data via the Django ORM, then you can do things like: > > > import oldapp.models

Increase sqlite3 database size

2013-02-17 Thread Hiral Shah
Hi All, Thanks in advance for your help! I am working on back-end to fill the database tables with build related information. I am using Django framework with sqlite3. Somehow I am not able to add more data in database table after certain limit. I am not getting any error but database size is

Re: Database setup Issue

2013-03-21 Thread Antoni Aloy
You have to create first the database in Postgresql, give it a name and a password, and configure it to allow connections. Then you have to configure the database settings with the database name, ip, user and password. If you're doing the tutorial is much better to stay in sqlite3, so you&#x

SQLite database module name???

2013-04-21 Thread Kakar
I am in settings.py and using SQLite3, but when i run manage.py syncdb it tells me: " Value Error: Empty module name." Please help me with this, i didn't undesrtood this part. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe fro

Re: SQLite3 database error!!!

2013-04-21 Thread Brad Pitcher
Can you post the rest of the traceback? On Apr 21, 2013 7:06 AM, "Kakar" wrote: > I am in settings.py and using SQLite3. But when i execute manage.py > syncdb, it gives me error: "Value error: Empty module name" I didn't > understood this part. Plz help me guyz. > > -- > You received this message

Re: django's database system

2013-06-05 Thread mulianto
Hi Heni, Do you mean django database system is refer to the ORM django provide? You can use and tie with your desktop APP by using django REST service . With the REST service provided by django, any APP can Benefit it like mobile APP, desktop APP, web APP, third party APP via your REST api

Re: django's database system

2013-06-05 Thread Nikolas Stevenson-Molnar
Have you had a look at SQLAlchemy? http://www.sqlalchemy.org/ _Nik On 6/5/2013 3:29 AM, heni yemun wrote: > Hi, > I'm starting to develop some python program to address some database > needs- this is for desktop usage not on the web. So i was wondering if > django's

Re: django's database system

2013-06-06 Thread Amirouche Boubekki
op some python program to address some database > > needs- this is for desktop usage not on the web. So i was wondering if > > django's database system can be integrated to my program instead of > > writing the routing python database access api. I like django's easy >

Re: django's database system

2013-06-06 Thread Vernon D. Cole
> >> Have you had a look at SQLAlchemy? http://www.sqlalchemy.org/ >> >> _Nik >> >> On 6/5/2013 3:29 AM, heni yemun wrote: >> > Hi, >> > I'm starting to develop some python program to address some database >> > needs- this is for desk

Re: database -> model -> charting

2013-06-07 Thread Christian Schulz
When you have some experience with JS/Highcharts django-chartit might be interesting. Easy is relativ but I got it and I'm really not a django/JS pro. It's nice work, but dev progress seems fallen asleep. http://chartit.shutupandship.com/ I would like to hear peoples opinions on third part

Re: database -> model -> charting

2013-06-07 Thread tony gair
Been trying out a couple over the last few hours. I have to say, the one you mention seems streets ahead of anything else, and its documented really well, which is the clincher for me. Many thanks for that super helpful info! On Friday, 7 June 2013 11:33:07 UTC+1, Christian Schulz wrote: > > Whe

Re: database -> model -> charting

2013-06-07 Thread Jani Tiainen
On Fri, 7 Jun 2013 01:20:27 -0700 (PDT) tony gair wrote: > > > I would like to hear peoples opinions on third party django charting apps, > with various considerations. My primary consideration would ease of use by > a django noob. Thanks > You can quite easily use pretty much any JS chartin

Re: database -> model -> charting

2013-06-08 Thread tony gair
After trying this I find a problem with the types it can use. For example it does not seem to like BigIntegerField unless there is something else I am doing wrong. Thinking about it, maybe I am letting chartit do too much for me but I do like the idea of something doing the hard thinking for me

Re: database -> model -> charting

2013-06-10 Thread Christian Schulz
I installed with python2.7/1.4.5 some weeks ago , but I didn't use a BigIntegerField. What is your error message? After trying this I find a problem with the types it can use. For example it does not seem to like BigIntegerField unless there is something else I am doing wrong. Thinking about

Re: database -> model -> charting

2013-06-10 Thread tony gair
TypeError at /heating/chart/ __init__() got an unexpected keyword argument 'use_decimal' Request Method: GET Request URL: http://127.0.0.1:8000/heating/chart/ Django Version: 1.5.1 Exception Type: TypeError Exception Value: __init__() got an unexpected keyword argument 'use_decimal' Exception Loca

Re: database -> model -> charting

2013-06-10 Thread Christian Schulz
It could be a problem with the simpleson.dumps options in django 1.5 vs. the included simplejson. I remember there was something... Change: chartit/templatetags/chartit.py - from django.utils import simplejson +import simplejson TypeError at /heating/chart/ __init__() got an unexpected key

Re: database -> model -> charting

2013-06-10 Thread tony gair
I tried that on 1.5 and tried my code out in a 1.4 install. I get the same error. Interestingly in stack overflow they mention this problem at http://stackoverflow.com/questions/8644060/caught-typeerror-while-rendering-init-got-an-unexpected-keyword-argument and chartit in its own code seems to

Re: database -> model -> charting

2013-06-10 Thread tony gair
I have subsequently located the problem. I think where the chartit.py supplies a parameter saying use_decimal=true is wrong. I have removed that parameter and found that it works with that change. Do you know if this is because of updates to jquery? On Monday, June 10, 2013 12:38:02 PM UTC, to

Re: database -> model -> charting

2013-06-10 Thread Christian Schulz
Hmm , don't know I'm not so much a js/jquery guy. But here is something about this issue. https://github.com/django/django/commit/5003df3659 I have subsequently located the problem. I think where the chartit.py supplies a parameter saying use_decimal=true is wrong. I have removed that paramet

Re: Django + Database Connections

2014-11-11 Thread Russell Keith-Magee
jango actually looks at the > database (I'm not talking about Manager, Models or Querysets, but the > actual parts of Django that use the ORM's to get data from the database > itself). > > If a reason is required without going into detail on my current half-baked > idea,

Re: Django + Database Connections

2014-11-11 Thread Kakar Nyori
ect. While I >> understand how a lot of it works I can't wrap my head around how the actual >> DB querying is done specifically what part of Django actually looks at the >> database (I'm not talking about Manager, Models or Querysets, but the >> actual parts of Dja

Re: Django + Database Connections

2014-11-12 Thread Edward Armes
7;t find the link now) that if you use a model that doesn't use Django database layer the admin code doesn't work? if this is the case why so? - Secondly would I be correct in thinking that by having asynchronous models it would break the default forms and views lthat are included ike t

Re: Django + Database Connections

2014-11-12 Thread Edward Armes
at 12:30 AM, Edward Armes > wrote: > >> Hi there, >> >> I am currently looking at Django for a personal project. While I >> understand how a lot of it works I can't wrap my head around how the actual >> DB querying is done specifically what part of Django actu

Re: Django + Database Connections

2014-11-13 Thread Russell Keith-Magee
ng is correct the Django admin interface uses the model > layer? If so while learning Django I remember reading (although I can't > find the link now) that if you use a model that doesn't use Django database > layer the admin code doesn't work? if this is the case why so? >

Re: Database queries location

2014-12-18 Thread Lachlan Musicman
I usually put those functions in the view cheers L. On 19 December 2014 at 08:12, pythonista wrote: > I understand that functions can be placed in the models fille > > However if I have complex queries that receive post input does the > > > Query live in the model the views or an external module

Re: Database queries location

2014-12-19 Thread aRkadeFR
Depend exactly on what to compute for your post data. I would almost write no logic code in the views. I split every application as follow: - managers.py: All the logic as a table level (raw SQL, complex queries) - models.py: All logic as a row level / object level (python computing data) - form

Re: Database queries location

2014-12-20 Thread pythonista
Thank you for your response. Most of my data is complex raw sql. I had placed it in the views and it is working as expected I would like to migrate the raw sql to managers, Can you point me to one or more good examples of how the manager is coded and how the sql interacts with the views. Tha

Re: Database queries location

2014-12-22 Thread Collin Anderson
Hi, There's a good example of creating a custom manager here: https://docs.djangoproject.com/en/dev/topics/db/managers/#custom-managers Collin On Saturday, December 20, 2014 8:28:57 AM UTC-6, pythonista wrote: > > Thank you for your response. > > Most of my data is complex raw sql. > I had pla

Re: Database queries location

2014-12-23 Thread pythonista
Can this be used with a complex query in which multiple tables (classes) are being joined? I also have to pass multiple post values to the query. Thanks for the example On Monday, December 22, 2014 8:52:04 PM UTC-5, Collin Anderson wrote: > > Hi, > > There's a good example of creating a cust

Re: Database queries location

2014-12-26 Thread Collin Anderson
Hi, That should all be possible. from django.db import models class MyManager(models.Manager): def complex_query_with_multiple_tables(self, mutiple, post, values): # put your query here. Collin On Tuesday, December 23, 2014 12:49:49 PM UTC-6, pythonista wrote: > > Can this be used

Existing database - new project

2015-03-06 Thread Robert Daniels
I understand it is possible to use an existing database on a new Django project. As I see it, I have 2 choices. 1 - Use the existing database and deal with it in that fashion. or 2 - Create a new project to store the same type of data as if there were no existing database, Then write a

Maximum database connections exceeded

2015-03-20 Thread Hans Kristian Flaatten
My Django application is exceeding the maximum number of simultaneous database connections (100) to the Postgres database when running through Gunicorn with async eventlet workers. When the limit it exceeded it starts returning 500-errors until new connections can be established. Setting

Search user from Database

2015-03-26 Thread nobody
the user has already in the database? Thank you. -j -- 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 po

JSON to relational database

2015-04-20 Thread ankit . rana
Hi everyone, i had one json data like this to table say "data" { id:##, name:{fname:##,lname:##}, class:##, age:##, courses:[###,###,###,###] } How to map this json data to a relational database?? i understand that only two things are possible :make fname and lname as a column of dat

Re: Search from database

2013-07-20 Thread Satinderpal Singh
On Sat, Jul 20, 2013 at 8:48 AM, Kamal Kaur wrote: > Can we have a search module in django that can suggest resembling > spellings from mysql database? > I am not getting you, please expalin. -- Satinderpal Singh -- You received this message because you are subscribed to the Goog

Re: Search from database

2013-07-21 Thread Amirouche Boubekki
mysql database? > > -- > Kamaljeet Kaur > > Blog:http://kamalkaur188.wordpress.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 fro

Re: Search from database

2013-07-21 Thread Dao Luan
details? 在 2013年7月20日星期六UTC+8上午11时18分21秒,Kamal Kaur写道: > > Can we have a search module in django that can suggest resembling > spellings from mysql database? > > -- > Kamaljeet Kaur > > Blog:http://kamalkaur188.wordpress.com/ > -- You received this message becaus

Re: Search from database

2013-07-21 Thread Kamal Kaur
We can search from database using phonetic codes or queries. I want an advanced search module in my project. That can suggest similar spellings from database, if user enters something wrong, like if something is misspelled, it must tell that you might have entered something wrong, similar results

Re: Search from database

2013-07-23 Thread Amirouche Boubekki
Apache solr or ElasticSearch: yes Haystack: maybe Regex: no 2013/7/21 Kamal Kaur > We can search from database using phonetic codes or queries. I want an > advanced search module in my project. That can suggest similar > spellings from database, if user enters something wrong

Re: Search from database

2013-07-23 Thread Kamal Kaur
On Wed, Jul 24, 2013 at 5:15 AM, Amirouche Boubekki wrote: > Apache solr or ElasticSearch: yes > Haystack: maybe > Regex: no Thanks. Studying ElasticSearch currently. -- Kamaljeet Kaur kamalkaur188.wordpress.com facebook.com/kaur.188 -- You received this message because you are subscribed

Selecting values from database

2013-07-23 Thread Sandeep kaur
Suppose I have following table in my database : activity1 | activity2 | activity3 | activity4 | activity5 6| 7 | 5| 9 | 8 The first row are the field names and the second row are the data entries. How can I get 3 maximum values out of each row of this

Unable to open database.

2013-07-25 Thread Nigel Legg
I have just moved my project from Windows to Linux. I have maintained the folder structure, but am getting the message "Unable to open database file - sqlite3". Settings as follows: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3

Re: Search from database

2013-07-25 Thread Kamal Kaur
On Wed, Jul 24, 2013 at 5:15 AM, Amirouche Boubekki wrote: > Apache solr or ElasticSearch: yes Is this the right method for installation? What is the need to adduser? http://www.cubrid.org/wiki_tutorials/entry/install-apache-solr-on-ubuntu These commands don't extract the files: http://django-ha

Re: Search from database

2013-07-26 Thread Kamal Kaur
On Fri, Jul 26, 2013 at 12:10 PM, Kamal Kaur wrote: > These commands don't extract the files: > http://django-haystack.readthedocs.org/en/latest/installing_search_engines.html Installed with this: http://mirror.metrocast.net/apache/lucene/solr/4.4.0/solr-4.4.0.tgz -- Kamaljeet Kaur kamalkaur18

Test using different database

2013-07-26 Thread Antony
, Creating test database for alias 'default'... AttributeError: 'DatabaseOperations' object has no attribute 'geo_db_type' ---

no value in database

2013-09-30 Thread Harjot Mann
Here is the code to my view, http://tny.cz/57446220 After filing form when I click on submit button , I am getting this error "SsupenceEditJob matching query does not exist" and not getting any values in database. Help me please. -- Harjot Kaur Mann Blog: http://harjotmann.wordpress.

Django query from database

2013-10-11 Thread Kamal Kaur
Hello there, Hope you are doing well :) I have a problem regarding querying a list from two tables, the procedure goes like: Considering two tables from mysql database: 1. UserProfile table, with complete client details: First name, Last name, Address, email id, Contact number etc. 2

Re: Accessing database table

2014-01-08 Thread Lachlan Musicman
If it's in the app itself, try import .models? On 9 January 2014 15:27, Don Fox wrote: > In my manage.py shell I can load the following module: > from userprofile.models import NPIdata > > However inside a file of utility functions located in the userprofile app > the same import statement yiel

Encoding for test database

2014-01-25 Thread Carlos Aguilar
I have this settings for my database connection: DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME':

Creating database in windows

2014-02-14 Thread Nicholas Perez
Hello. I am currently using Django version 1.6.2 trying to learn to use Geodjango on a windows machine. My issue is that i have followed Geodjango installation for windows to the letter(everything is installed in the default directory). my geodjango folder is on my desktop As i follow the tutor

Creating database in windows

2014-02-16 Thread Vernon D. Cole
Django on Windows is a poor stepchild of the real thing. If you are serious about using django then you really need to learn Linux at some point in time. I am amazed that something as complex as geodjango will even run in Windows. You have two choices: Either learn to use Windows command line v

Django Logging database queries

2014-03-13 Thread Anju SB
Dear All, I am a newbie in Django programming and developing a web application using django 1.3 and postgresql. I want to log insert, update, delete and failed select queries in my daily log file. I configured 'django.db.backends' in the logger of the Logging dict in Settings.py. But I get

Re: database design problem.

2014-03-15 Thread Larry Martell
On Sat, Mar 15, 2014 at 9:38 AM, willy Hakizimana wrote: > First of all, this community is amazing at how fast questions are answered. > I have learned so much. > > > I am designing an app with models that look like this. > > Country(country_id(PK), country_name, gdp, gdp_growth, income_per_capita

Re: database design problem.

2014-03-15 Thread Alvin Lindstam
a > via table (the native m2m would create a table with _countryID_, > _productID_ foreign keys only; the via table lets you add data specific to > the relationship itself... An intersect table in older database > terminology) > > > > > > -- > Wulfraed

Re: database design problem.

2014-03-15 Thread willy Hakizimana
Thank you guys so much. You guys rock! On Saturday, March 15, 2014 10:38:03 AM UTC-5, willy Hakizimana wrote: > > First of all, this community is amazing at how fast questions are > answered. I have learned so much. > > > I am designing an app with models that look like this. > > Country(country_

Re: database design problem.

2014-03-15 Thread Lachlan Musicman
I would make the imports model an "intermediate model" - see here: https://docs.djangoproject.com/en/1.6/topics/db/models/#extra-fields-on-many-to-many-relationships L. On 16 March 2014 09:41, willy Hakizimana wrote: > Thank you guys so much. You guys rock! > > > On Saturday, March 15, 2014 10:

Re: Django bug database

2017-03-29 Thread Tim Graham
n projects I thought the Django bug > database would be a good source of data. Is it at all possible to download > a dump of the Django bug database for offline data-mining? > > Warm Regards, > Lelanthran Manickum > -- You received this message because you are subscribed to the G

Re: Django bug database

2017-03-29 Thread Lelanthran Manickum
On Wednesday, 29 March 2017 14:32:27 UTC+2, Tim Graham wrote: > > I think https://code.djangoproject.com/wiki/OpenData would help. > >> >> Thank you. You are too kind :-) Warm Regards Lelanthran Manickum -- You received this message because you are subscribed to the Google Groups "Django us

DATABASE DICTIONARY in Settings.py

2017-04-03 Thread alkhairohr
Hey everyone, I'm new to Django and web development overall so please bare with me. I may be asking an incredibly stupid question. In the DATABASES dictionary in settings.py: DATABASES = { 'default': { 'NAME': 'something', 'ENGINE': 'django.db.backends.mysql', 'USER

Django graceful database errors

2017-06-07 Thread Damian Myerscough
Hello, I have setup a Django project that is being served via Nginx + gunicorn, however, I would like to handle graceful database failures. For example, if the ORM cannot query the database I would like to return a custom error message. ==> gunicorn.log <== [2017-06-07 06:06:01 +000

Rendering DataBase Image File

2017-09-24 Thread yingi keme
Hello Ok i have a simple model that has an ImageField to store image files class Product(models.Model): category = models.ForeignKey('CatalogCategory', related_name='products') name = models.CharField(max_length=300) photo = models.ImageField(upload_to='Home/static/Home/img',

Pulling data from database

2017-11-02 Thread jay seattle
New to Django, coming from C# and I am totally confused how you pull data from a database. I have a Postgres DB with a table "customer" created, but have NO idea how to connect to it. I have read a bunch of stuff but they all seem to work from the Model creation to database (migratio

Re: partial database restoration

2016-03-09 Thread Bill Freeman
command, and that still suffers from the need to re-write at schema changes. On Wed, Mar 9, 2016 at 6:24 PM, Mike Dewhirst wrote: > I have a Django project oriented around lots of companies and each company > enters its own data. I need to produce a separate individual database > backup or

Re: partial database restoration

2016-03-09 Thread Mike Dewhirst
have a Django project oriented around lots of companies and each company enters its own data. I need to produce a separate individual database backup or dump for each company. It will be used on request to perform an individual restoration after user error has damaged a company&

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