Re: How to implement a ManyToManyField with a View

2016-05-27 Thread Bruce Whealton
I have that in the contacts/views.py However, I don't know if it needs the context dictionary to have something which would connect a contact to many categories. Thanks, Bruce -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from

EDMS (Electronic Document Management System )

2016-05-27 Thread Jorge Maciel
Hi, I'm developing a EDMS (Electronic Document Management System ) for small business. I am in doubt about the infrastructure should I use to create this system . I think he should be SAAS , Each company has several departments and multiple users and they can share documents with each other.

Re: Django Models

2016-05-27 Thread Ken Edem
Wow, Derek what a great link. Thanks very much. Ken On Friday, May 27, 2016 at 4:47:56 PM UTC+2, Derek wrote: > > There a number of designs for similar situations online; a quick Google > showed me: > > * http://www.databasedev.co.uk/student_courses_data_model.html > * http://databaseanswers.org

Database router hints

2016-05-27 Thread Mike Q
Hi, I'm implementing a database router and I need to make use of the model instance which appears in the hints dict. I particularly need the db_for_read() and db_for_write() methods to select the db based on the value of an instance's field I have found that the instance is in the dict when I

Re: UpdateView not saved

2016-05-27 Thread Dariusz Mysior
Yes it help :), thanks! W dniu piątek, 27 maja 2016 16:29:37 UTC+2 użytkownik Dariusz Mysior napisał: > > I try update my photo in avatar field but it not save changes, please look > on it > > update_form.html > > {% extends 'base.html' %} > {% block title %}Edycja profilu{% endblock %} > > > {%

Re: UpdateView not saved

2016-05-27 Thread Ricardo Daniel Quiroga
add enctype="multipart/form-data" param in you html form tag :) 2016-05-27 11:29 GMT-03:00 Dariusz Mysior : > I try update my photo in avatar field but it not save changes, please look > on it > > update_form.html > > {% extends 'base.html' %} > {% block title %}Edycja profilu{% endblock %} > > >

Re: Django Models

2016-05-27 Thread Derek
There a number of designs for similar situations online; a quick Google showed me: * http://www.databasedev.co.uk/student_courses_data_model.html * http://databaseanswers.org/data_models/ And I am sure there are more... If this is your first project. I would not be too fussed about making it

UpdateView not saved

2016-05-27 Thread Dariusz Mysior
I try update my photo in avatar field but it not save changes, please look on it update_form.html {% extends 'base.html' %} {% block title %}Edycja profilu{% endblock %} {% if user.is_authenticated %} {% block top_menu %} {{ user.username }} Wyloguj się {% endblock %} {% block

Re: how to upload file with pjango

2016-05-27 Thread Ricardo Daniel Quiroga
Hello, add enctype="multipart/form-data" param in you html form see more info https://docs.djangoproject.com/es/1.9/topics/http/file-uploads/ 2016-05-27 6:45 GMT-03:00 meInvent bbird : > how to upload file with pjango ? > > -- > You received this message because you are subscribed to the Goo

Re: How to select undetermined field(s) in django model?

2016-05-27 Thread Jianshu Hu
This is exactly what I need!! Thank you! And thank you for mentioning injection. Bests, -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...

Re: get all columns as a list

2016-05-27 Thread Larry Martell
Just FYI, they did not want that change. They did not feel it added any value. But in reality, they probably just didn't want me spending time on it so I could do other things. On Wed, May 25, 2016 at 9:35 AM, Larry Martell wrote: > I am the OP. I was implementing what my customer asked for. But

Nested selects in django queries

2016-05-27 Thread Amir Meirbekov
Hi everyone! How can I do nested SELECTs in django queries, like in the following SQL? SELECT anon_1.timestamp AS anon_1_timestamp, max(anon_1.users) AS users, max (anon_1.servers) AS servers FROM ( SELECT datediff_hours(:datediff_hours_1, statistics.time) AS timestamp, sum(statistics.users)

why blank page when load a list or dictionary into web to display a list

2016-05-27 Thread meInvent bbird
https://drive.google.com/file/d/0Bxs_ao6uuBDUYkRIdlZfbEFLV3c/view?usp=sharing http://x.x.x.x/reg/approval.html -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to d

how to upload file with pjango

2016-05-27 Thread meInvent bbird
how to upload file with pjango ? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to

Re: Django Beginner

2016-05-27 Thread Derek
For OOP concepts, have a look at: http://learnpythonthehardway.org/book/ex40.html (The whole book is online and is useful even for reminding yourself about things you may already know something about e.g. dictionaries; and it is good at explaining - honestly, how many CS books have headers like

Re: with django, how to write a grdview or table to show information and add a button or link in each row for approval?

2016-05-27 Thread meInvent bbird
currently the error is dictionary update sequence element #0 has length 5; 2 is required def post_detail(request): posts = [] with open('/home/martin/Downloads/site1/site1/reg/newusers.csv', 'rb') as csvfile: reader = csv.DictReader(csvfile) for row in reader: if len(ro

Re: Django Live video streaming from ffserver

2016-05-27 Thread Jahan Balasubramaniam
Thanks. However dint try this because solution provided by Stefano was simple and easy to implement and dint affect the performance much. On Thursday, 26 May 2016 19:48:27 UTC+8, Javier Rivera wrote: > > You can try to use a proxy. Maybe not the most performance-wise idea in > the world, but it

Re: Django Live video streaming from ffserver

2016-05-27 Thread Jahan Balasubramaniam
Thanks. This worked like charm.. It was so easy and simple to setup. On Thursday, 26 May 2016 21:51:39 UTC+8, Stefano Probst wrote: > > Hi, > eventual something like X-Accel-Redirect can help to do this without a > performance penalty. See > https://wellfire.co/learn/nginx-django-x-accel-redirec

Re: with django, how to write a grdview or table to show information and add a button or link in each row for approval?

2016-05-27 Thread meInvent bbird
after changed to return render(posts, 'approval.html') got error 'list' object has no attribute 'META' def post_detail(request): posts = [] with open('/home/martin/Downloads/site1/site1/reg/newusers.csv', 'rb') as csvfile: reader = csv.DictReader(csvfile) for row in reader:

Re: with django, how to write a grdview or table to show information and add a button or link in each row for approval?

2016-05-27 Thread meInvent bbird
i write with this method, but nothing is displayed, only blank page, however there are data shown in console where is wrong? {% block content %} {% for post in posts %} post.project post.company {% endfor %}

with django, how to write a grdview or table to show information and add a button or link in each row for approval?

2016-05-27 Thread jorrit787
Sounds like Formsets is what you are looking for. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this grou

Re: Reverse for 'reg/{{post.pk}}/' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []

2016-05-27 Thread ludovic coues
You have a query string when you do GET request. The form is sending a POST request, with the data in the body of the request. 2016-05-27 4:47 GMT+02:00 meInvent bbird : > i succeed to save to csv, > > i use post instead of request > > but it is quite odd, it do not have request in query string in