Quantcast
Channel: User Ciprian Tarta - Stack Overflow
Browsing all 31 articles
Browse latest View live

Comment by Ciprian Tarta on in django import error occurred as module not found

Updated my response. Let me know if you still have issues

View Article


Comment by Ciprian Tarta on Get all objects of a relation

What do you mean by get all persons, do you have a model Person for that? Is it related to Lab?

View Article


Comment by Ciprian Tarta on Django modelform integrate the fields for the...

If this answers your question, please mark it as the correct answer :)

View Article

Comment by Ciprian Tarta on different values of a django session variable in...

My understanding was that the search would not be an ajax call, only the filtering after the list is returned. If that's not the case, then see bellow

View Article

Comment by Ciprian Tarta on compare dates and validate] in django

ah sorry, it should be self.cleaned_data['fromdate'] I believe

View Article


Comment by Ciprian Tarta on disabled field is not passed through - workaround...

Nice, but what do you do in case of checkboxes. Ho do you distinguish between a checkbox being disabled or unchecked.

View Article

Comment by Ciprian Tarta on Django app - Virtualenv upgrading my package with...

It sounds to me that you need some sort of a bash script to help you with packing and unpacking your app. Or a git hook if you are using git.

View Article

Comment by Ciprian Tarta on Remove item[i] from jQuery each loop

the question was how to remove it from a loop.

View Article


Comment by Ciprian Tarta on Running a Python file with Flask, nginx and uWSGI...

Correct, forgot to escape __. @KevinKromjong, the correct package identifier for Python 2 is __init__.py For Python 3, there's no need for an __init__.py file.

View Article


Comment by Ciprian Tarta on How do I run inspectdb against different schemas...

The question was how to inspect schemas in Oracle, not Postgresql.

View Article

Comment by Ciprian Tarta on Angular 2 binding seems to be removed after an...

Done, but that code is very trivial.

View Article

Comment by Ciprian Tarta on Angular 2 binding seems to be removed after an...

@GünterZöchbauer you are correct about change detection failing. I've used the ChangeDetectorRef and manually triggered detectChanges() and the template updates correctly. This is a bit of a hack, but...

View Article

Comment by Ciprian Tarta on Angular 2 binding seems to be removed after an...

I've marked this as the correct answer. Also +1 @Günter since his input helped on figuring this out.

View Article


Comment by Ciprian Tarta on Django - best way of storing data created on the...

showroom_devices.append({"before": device, "after": completed_device_name})

View Article

Django transfer uploaded file

I'm trying to upload a file via django forms, then send it to an API.Here's the encoding function:#FYI, requestFile = request.FILES['file']def EncodeFile(self, requestFile, fields = []): BOUNDARY =...

View Article


Answer by Ciprian Tarta for Django transfer uploaded file

Apparently this line of code causes the problem:'Content-Disposition: form-data; name="file"; filename="%s"' % requestFile.name,The correct line would be instead:'Content-Disposition: form-data;...

View Article

Rails routing resource in namespace starting with a parameter

I have 2 namespaces, api and v1I have accounts and users as resources.I want to map the routing as follows for all my resources:/api/v1/:account_id/:resource/:idi.e:/api/v1/1/users/2In the example 1...

View Article


Answer by Ciprian Tarta for Rails filtering resource one to many through a...

This appears to be the only way I found this to be working if anyone is interested.CheckItem.joins(:item => {:category => :restaurant}).where('category.uuid=? and restaurant.id=?', 123123, 1)

View Article

Rails filtering resource one to many through a joint table

I have the following resources:- restaurant- category- item- check itemRelationship:class Restaurant < ActiveRecord::Base has_many :items has_many :categories has_many :check_itemsclass Category...

View Article

Answer by Ciprian Tarta for python django - csv file not getting downloaded...

Try this:csv_name = urllib.urlencode({'filename':'"results.csv"'}) #this is if you really really want the double quotes, otherwise just use cvs_name = 'results.csv'response = HttpResponse(csv_content,...

View Article
Browsing all 31 articles
Browse latest View live