Extract Date-From and Date-To in DateRangeField django

2017-02-16 Thread RON MICHAEL
Hi! In my database I have a DateRangeField. What I want to do is get the date-from and the date-to and store them in a separate variable like example: date_from =DateRangeField(date_from) date_to =DateRangeField(date_to) of course that code won't work. My data is like this: 'date_range':

Re: OpenFace Integration with Django

2017-02-16 Thread RON MICHAEL
Great! I've tried logging stuff but it doesn't seem to work when uploading it to a webserver. When running on my localhost server there was a log about a depreciation, then when it was doing training, then when it has finished training. But I can't seem to see it in the webserver terminal :/

Multiple app css,html, javascript,img

2017-02-16 Thread Kazi Atik
Hi Everyone, I am having multiple app in my project so i want to make globally these css, js,img folder because every time making css,js,img folder very difficult and slowing my development of my project please give me solution myfb users/ __init__.py models.py

Re: How to integrate a python algorithm in a Django website

2017-02-16 Thread phep
Hi, Le 16/02/2017 à 13:30, david ekchajzer a écrit : How could I use the data from my website database on a python algorithm? As Shawn pointed out, it seems what you're looking for are Django custom commands : https://docs.djangoproject.com/en/1.10/howto/custom-management-commands/ Such

Re: create unmanaged model to oracle view/synonym

2017-02-16 Thread Sunil Naik
Thanks Collin, it worked for me. On Monday, January 5, 2015 at 12:56:33 AM UTC+5:30, Collin Anderson wrote: > > Hi, > > What happens when you try Shai's suggestion? > > class MyUnManagedModel(models.Model): > # ... > # fields > # ... > class Meta: > managed = False >

Re: How to integrate a python algorithm in a Django website

2017-02-16 Thread david ekchajzer
Hello, first thank you. My question would be: How could I use the data from my website database on a python algorithm? Should I put my python algorithm on a server? How good I access these data? Or is there a way with Django to use the data ? -- You received this message because you are

Hello. Users, permissions, etc.

2017-02-16 Thread lex . for . free
Good day, I faced with a problem. Any database with the information. DB is filled with the site. It is necessary to make several groups with different rights to add / edit information from site. The first logical step - to make it in the administrative part. But the right to work only in the

Re: How to integrate a python algorithm in a Django website

2017-02-16 Thread david ekchajzer
Hello, first thank you. My question would be: How could I use the data from my website database on a python algorithm? Should I put my python algorithm on a server? How good I access these data? Or is there a way with Django to use the data ? -- You received this message because you are

Re: Hello. Users, permissions, etc.

2017-02-16 Thread ludovic coues
Have you looked at that ? https://docs.djangoproject.com/en/1.10/topics/auth/default/#topic-authorization 2017-02-16 13:32 GMT+01:00 : > Good day, I faced with a problem. > Any database with the information. DB is filled with the site. It is > necessary to make several

Error using url in django template language

2017-02-16 Thread xyron
Hey there, I'm searching since more than 12 hours for a solution for my problem and I'm kinda frustrated. I want to use a form and define the action link using django template language in a html-file: {% extends "base/header.html" %} {% block content %} Enter Youtube-Link I get

Django template language resolve url

2017-02-16 Thread xyron
Code hier eingeben... Hey there, I'm searching since more than 12 hours for a solution for my problem and I'm kinda frustrated. I want to use a form and define the link using django template language in a html-file: {% extends "base/header.html" %} {% block content %} Enter

Append to models.JSONField on POST

2017-02-16 Thread chris jess
Can anyone let me know the best way to append to a models.JSONField on HTTP POST? I would prefer to simply append to the existing JSONField as opposed to updating the values in it. Is it possible to do this without first loading that object? Thanks. -- You received this message because you

Re: get_or_create IntegrityError

2017-02-16 Thread Vijay Khemlani
As far as I know Postgres uses "sequences" for generating the model IDs. If you set the id manually I think you are bypassing the sequence, which doesn't autoincrement. So when you use the sequence the next time the ID clashes. pgAdmin should auto generate the id if you leave the field blank.

Append to models.JSONField on POST

2017-02-16 Thread chris jess
Can anyone let me know the best way to append to a models.JSONField on HTTP POST? I would prefer to simply append to the existing JSONField as opposed to updating the values in it. Is it possible to do this without first loading that object? Thanks. -- You received this message because you

get_or_create IntegrityError

2017-02-16 Thread Matthew Pava
This is a fascinating issue, fellow Django users. I have a model called Lookups that is basically just an auto-generated pk and a name. I added some data to that table using pgAdmin 3 since I'm using a PostgreSQL backend. One of my users then filled out a form that ran some code that would

Re: Append to models.JSONField on POST

2017-02-16 Thread ludovic coues
If there is one, I've never heard of it. But I'm not an heavy user of postgres or its JSONField. Maybe someone else know better than me :) 2017-02-16 17:30 GMT+01:00 chris jess : > Thanks. > > Was hoping there was a method for appending to a JSON array stored in a > JSONField

Re: Append to models.JSONField on POST

2017-02-16 Thread chris jess
Thanks. Was hoping there was a method for appending to a JSON array stored in a JSONField without fetching the whole record first. On Thursday, 16 February 2017 16:24:06 UTC, ludovic coues wrote: > > You can't. > > There is 7 value types in JSON. > 3 of them are constant, true, false and

Re: Append to models.JSONField on POST

2017-02-16 Thread ludovic coues
You can't. There is 7 value types in JSON. 3 of them are constant, true, false and null. Appending to them make no sense. You could append to number, but then you change its value. String are double quote delimited. You can't append to it, you need to insert before the closing double quote. aka

Re: Django template language resolve url

2017-02-16 Thread ludovic coues
First, I would make sure all namespace are unique. Then I would try {% url "ytlinks:save_ytlink" %} In 'links.views.save_ytlink', I have no idea what links or views are. You might also want to re-read the documentation on urls namespace and included urlconfs

RE: Error using url in django template language

2017-02-16 Thread Matthew Pava
In your urls.py, you have the url name as “ytlinks” with an s. But your url tag doesn’t have the s. Try this: {% url ‘ytlinks.ytlinks’ %} From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of xyron Sent: Thursday, February 16, 2017 9:35 AM To: Django users

Re: Multiple app css,html, javascript,img

2017-02-16 Thread Jani Tiainen
Hi, You need to put static files under static directory within app. Now you have static resources at your app root. So layout should be: users/ static/ css/ style.css On 17.02.2017 08:15, Kazi Atik wrote: Hi Everyone, I am having multiple app in my project so i