Re: Create table rows by an entered number

2018-03-09 Thread Jani Tiainen
Hi. Surely you can. Django template language has everything you need to create tables by arbitrary rows and columns. 9.3.2018 17.23 "Ondra Baumrt" kirjoitti: > Hi, > is there any possibility how to create a table with as many rows as is an > entered number. In example: I have in DB an integer

Re: Create table and load data

2012-10-13 Thread Larry Martell
I didn't even need to use the debugger. I just ran with --verbosity 3, and it showed me all the places it looked for fixtures files. Strangely, it did not look for a fixtures dir immediately off my app's main dir, but it looked for one everywhere else. My app is called motor, and it lives in /usr/l

Re: Create table and load data

2012-10-13 Thread Larry Martell
Thanks Kurtis. That's will save me a bit of time. I'm going to dig into it now. I'll let you know what I find. On Fri, Oct 12, 2012 at 2:25 PM, Kurtis Mullins wrote: > Whoops, sorry that was the master branch. Here you go: > https://github.com/django/django/blob/1.4.1/django/core/management/comma

Re: Create table and load data

2012-10-12 Thread Kurtis Mullins
Whoops, sorry that was the master branch. Here you go: https://github.com/django/django/blob/1.4.1/django/core/management/commands/syncdb.py On Fri, Oct 12, 2012 at 4:24 PM, Kurtis Mullins wrote: > Good luck to you! The code is here if you want to start crawling through > it for a good point to p

Re: Create table and load data

2012-10-12 Thread Kurtis Mullins
Good luck to you! The code is here if you want to start crawling through it for a good point to place a breakpoint: https://github.com/django/django/blob/master/django/core/management/commands/syncdb.py On Fri, Oct 12, 2012 at 3:30 PM, Larry Martell wrote: > On Fri, Oct 12, 2012 at 12:22 PM, Kurt

Re: Create table and load data

2012-10-12 Thread Larry Martell
On Fri, Oct 12, 2012 at 12:22 PM, Kurtis Mullins wrote: > On Fri, Oct 12, 2012 at 2:09 PM, Larry Martell > wrote: >> >> >> So my client decided to use xml. I created the file and put it in >> fixtures/initial_data.xml. On my development machine, which is a Mac, >> it worked fine - running syncdb

Re: Create table and load data

2012-10-12 Thread Kurtis Mullins
On Fri, Oct 12, 2012 at 2:09 PM, Larry Martell wrote: > > > So my client decided to use xml. I created the file and put it in > fixtures/initial_data.xml. On my development machine, which is a Mac, > it worked fine - running syncdb loaded the data. But on my client's > machine, which is running Cen

Re: Create table and load data

2012-10-12 Thread Larry Martell
On Thu, Oct 11, 2012 at 4:51 AM, Larry Martell wrote: > On Thu, Oct 11, 2012 at 1:37 AM, Joseph Wayodi wrote: >> On Thu, Oct 11, 2012 at 2:23 AM, Larry Martell >> wrote: >>> I'm having trouble getting django to read my fixture file. I created it in >>> yaml: >>> >>> - model: cdsem.fields >>>

Re: Create table and load data

2012-10-12 Thread Larry Martell
On Fri, Oct 12, 2012 at 3:44 AM, wrote: > Hi Larry, > Do you have PyYAML installed? If not install it first and retry or > alternatively you could just serialize your fixture in (my personal favorite) > JSON. The client decide to use XML. -- You received this message because you are subscrib

Re: Create table and load data

2012-10-12 Thread bb6xt
Hi Larry, Do you have PyYAML installed? If not install it first and retry or alternatively you could just serialize your fixture in (my personal favorite) JSON. Cheers! Abraham. -- Sent from my mobile device -- You received this message because you are subscribed to the

Re: Create table and load data

2012-10-11 Thread Larry Martell
On Thu, Oct 11, 2012 at 1:37 AM, Joseph Wayodi wrote: > On Thu, Oct 11, 2012 at 2:23 AM, Larry Martell > wrote: >> I'm having trouble getting django to read my fixture file. I created it in >> yaml: >> >> - model: cdsem.fields >>pk: 1 >>fields: >> name: data_file_id >> descrip

Re: Create table and load data

2012-10-11 Thread Joseph Wayodi
On Thu, Oct 11, 2012 at 2:23 AM, Larry Martell wrote: > I'm having trouble getting django to read my fixture file. I created it in > yaml: > > - model: cdsem.fields >pk: 1 >fields: > name: data_file_id > description: data_file_id > - model: cdsem.fields >pk: 2 >fields: >

Re: Create table and load data

2012-10-10 Thread Larry Martell
I'm having trouble getting django to read my fixture file. I created it in yaml: - model: cdsem.fields pk: 1 fields: name: data_file_id description: data_file_id - model: cdsem.fields pk: 2 fields: name: tool_id description: tool_id and so on. I put it in a file c

Re: Create table and load data

2012-10-04 Thread Jonathan Baker
You're welcome. Personally, I've found it's easiest to get the JSON formatted correctly by creating the model, syncing the DB, inserting some dummy records, running 'dumpdata' against the table, and then

Re: Create table and load data

2012-10-04 Thread Larry Martell
Thanks! I knew there had to be a way! On Thu, Oct 4, 2012 at 10:28 AM, Jonathan Baker wrote: > initial_data sounds like what you're looking for: > https://docs.djangoproject.com/en/dev/howto/initial-data/ > > On Thu, Oct 4, 2012 at 10:26 AM, Larry Martell > wrote: >> >> Is there some way to use

Re: Create table and load data

2012-10-04 Thread Jonathan Baker
initial_data sounds like what you're looking for: https://docs.djangoproject.com/en/dev/howto/initial-data/ On Thu, Oct 4, 2012 at 10:26 AM, Larry Martell wrote: > Is there some way to use manage.py to create a table and load data > into it (where the data is contained in the models.py)? > > I ha

Re: create table

2010-07-20 Thread pengbo xue
thanks for your help. 2010/7/20 Franklin Einspruch > cowboy, > > I think you're looking for this: > > http://docs.djangoproject.com/en/dev/ref/models/fields/#foreignkey > > Franklin > > 2010/7/20 Ian Lewis : > > Hi, > > > > On Tue, Jul 20, 2010 at 11:42 AM, pengbo xue > wrote: > >> how can I c

Re: create table

2010-07-20 Thread Franklin Einspruch
cowboy, I think you're looking for this: http://docs.djangoproject.com/en/dev/ref/models/fields/#foreignkey Franklin 2010/7/20 Ian Lewis : > Hi, > > On Tue, Jul 20, 2010 at 11:42 AM, pengbo xue wrote: >> how can I create tables and foreignkey as below information. >> >> create a user object "m

Re: create table

2010-07-19 Thread Ian Lewis
Hi, On Tue, Jul 20, 2010 at 11:42 AM, pengbo xue wrote: > how can I create tables and foreignkey as below information. > > create a user object "models.User" and include kewords like this, > > username: modify the max_length of username to 32,default is 30. > email: > password: > is_staff: fals