Hi,
I'm trying to populate a table with 2 foreign keys using a csv file
and keep getting the following error :
Cannot assign "238": "PrizetoRestaurant.RestauranttId" must be a
"Restaurant" instance.
I tried to manually define the primary keys in those tables, and I'm
making sure I int() the data
d, id
The new update line now looks like this:
PrizetoRestaurant.objects.get_or_create(RestaurantId_id=int(row[0]),
PrizeId=prizedict[2], Date = row[10], Quantity = row[2])
I'm guessing I'm missing something, just not sure what
On Oct 14, 1:24 pm, Daniel Roseman wrote:
> On Friday,
nm, solved
On Oct 14, 1:54 pm, Guy Nesher wrote:
> Hi DR,
>
> Thanks, I've just started developing in Python/Django so I do
> apologize for the bad naming convention (I'll fix this once everything
> works, don't want to add additional errors before I sort this).
I have an odd problem tracking errors in a for loop
I assign a loop counter to each error and print them at the end of the
loop, but all the errors are numbered to the last iteration.
The code goes something like this :
error = [0,[]]
counter = 0
for row in reader:
counter +=1
try:
#
Thanks
On Oct 19, 3:57 pm, "J. Cliff Dyer" wrote:
> On 10/19/2011 10:49 AM, Guy Nesher wrote:
>
>
>
>
>
>
>
>
>
> > I have an odd problem tracking errors in a for loop
> > I assign a loop counter to each error and print them at the end of the
&
Hi,
I've started playing with Piston several days ago but I'm unable to
create XML attributes.
Do I need to create a special emitter for that ?
Guy
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-use
Thanks
On Oct 23, 9:17 pm, Masklinn wrote:
> On 2011-10-23, at 21:20 , Guy Nesher wrote:> Hi,
>
> > I've started playing with Piston several days ago but I'm unable to
> > create XML attributes.
> > Do I need to create a special emitter for that ?
>
>
Hi,
I've created a simple context processor which simply returns a
variable, however I'm unable to retrieve it from my template.
The context processor is quite simple :
def swiss_context_processors(request):
mytest = "aaa"
return mytest
and I am calling the context processor in my view
;
> 1) make sure the context processor is installed in your settings file.
> 2) context processors should return dicts. Try:
>
> def swiss_context_processors(request):
> added_context = { 'mytest': 'aaa', }
> return added_context
>
> On Jan 5, 1
Thanks,
Works perfectly now (and yeah I'm fairly new to Python/Django)
On Jan 5, 5:44 pm, Rainy wrote:
> On Jan 5, 12:38 pm, Rainy wrote:
>
>
>
>
>
>
>
>
>
> > On Jan 5, 12:35 pm, Guy Nesher wrote:
>
> > > Thanks,
>
> > > I
10 matches
Mail list logo