I am trying to run a function from views.py which carries some
Machine-Learning code. While I am loading ML model using Joblib from
sklearn It throws error related to tfidf.
Here is traceback: http://dpaste.com/1FPN16G
--
Thanks
Arshpreet Singh
Python Developer
Web Development/Data Science/Syste
Hello All,
On Django admin when I tried to update the existing data I’m getting an error,
AttributeError: 'str' object has no attribute '__iter__'
models.py
class SSPDrive(models.Model):
drive_year =
models.DateField(verbose_name='Drive year', null=True, b
I just found out on Django document, there's an example that's for
manytomany, using 'through' when defining the foreign key. I think this is
what i need.
Here's the example:
from django.db import models
class Person(models.Model):
name = models.CharField(max_length=128)
def __str__(s
I'm working with a legacy database so I have to set managed=False in the
model. Here's the 3 related tables:
class Branches(models.Model):
name = models.CharField(max_length=128)
branchpoint_str = models.CharField(max_length=255)
dev_lead_id = models.IntegerField(blank=True, null=Tru
Thanks Jani. I was able to solve my original issue using your suggestion.
On Friday, June 16, 2017 at 12:54:26 PM UTC-7, Jani Tiainen wrote:
>
> Yes, even there isn't real foreign keys in the database you can still
> join models.
>
> Have been doing that few times with legacy database. When defi
Hi all,
I'm facing a strange behavior when trying to create Django_rq queues
configuration dynamically from an environment variable.
my env var is :
CUSTOM_QUEUES=default:q1:q2
into my settings.py I have:
from getenv import env
# Cache
CACHES_DEFAULT = "redis://127.0.0.1:6379/1"
CACHES = {
On Tuesday, June 20, 2017 at 10:40:05 PM UTC-7, Scot Hacker wrote:
>
> One strategy might be to:
>
> 1) Bring in the data under a different column name ('old_id' ?)
> 2) In a single migration, drop the default ID column, rename old_id to
> id, and give it primary_key=True
>
I can't change the p
Your clue is in the word "variable" that you used. The "variables" for a
Django model are its fields; so what you are looking for is a value stored
in your model's field.
e.g.
service =
food.objects.get(restaurant-name__icontains='burger-place').values_list('type_of_service',
flat=True)
T
Hi,
User can't upgrade his group. It is your code that does it. And it is your
code responsibility to track changes etc.
User just may have a button on ui that invokes your code (view) but rest is
really up to you.
21.6.2017 11.24 "Mannu Gupta" kirjoitti:
> I meant that using your method i.e b
On Monday 19 June 2017 16:29:48 Thomas Hauk wrote:
> I am working on a project that uses Django 1.10.5 with Postgres 9.6
> (and Python 3.6.1).
>
> I am currently migrating historical data from an old system into the
> new system. This historical data has a table with a (non-primary key)
> "ID" col
I have a model with a manytomany field as follows:
contact = ChainedManyToManyField(
'contacts.Contact',
chained_field="practice",
chained_model_field="practice",
)
Within my admin I have the following for import/export:
contact = fields.Field(column_name='contact
On Tuesday 20 June 2017 18:08:02 James Schneider wrote:
> > And his problem is that it does *not* match. Not that it does.
>
> And for that I think my statement still stands that Django is
> stripping the last portion of the URL as a GET argument. I'm betting
> that
> requests.GET.get('abc') will
I meant that using your method i.e by making different groups .
When he upgrade the group .
How about making another table having user, his subscription level and
changed_at field(which traces when he /upgrade the group )
Just want to know your suggestion .
Mannu
On Jun 21, 2017 1:48 PM, "Jani T
Well its your code, so yes if you write code that does it.
It doesn't happen magically for you.
21.6.2017 11.15 "Mannu Gupta" kirjoitti:
> Hi ,
> Will I be able to trace if user upgrde the subscription level ?
>
> Manni
>
> On Wed, Jun 21, 2017 at 1:41 PM, Jani Tiainen wrote:
>
>> Hi,
>>
>> We
Hi ,
Will I be able to trace if user upgrde the subscription level ?
Manni
On Wed, Jun 21, 2017 at 1:41 PM, Jani Tiainen wrote:
> Hi,
>
> We have been using user groups for that. And then we check and filter out
> based on given group(s).
>
> 21.6.2017 10.45 "Mannu Gupta" kirjoitti:
>
>> I wan
Hi,
We have been using user groups for that. And then we check and filter out
based on given group(s).
21.6.2017 10.45 "Mannu Gupta" kirjoitti:
> I want to make a role based user in Django like the following :-
>
> User with Subscription level 0 will have some feature and some basic
> fields li
I want to make a role based user in Django like the following :-
User with Subscription level 0 will have some feature and some basic fields
like first name , last name etc.
User with Subscription level 1 will have some more feature and some extra
fields like tax-id , national id , nationalit
Hi,
https://github.com/stefanfoulis/django-phonenumber-field
You could probably use that library - it works against googles phonenumber
library, which is the library that is used on andoid phones as well.
Regards,
Andréas
2017-06-21 8:18 GMT+02:00 Santosh Yelamarthi :
> Hi All,
>
> Can anyone
18 matches
Mail list logo