Re: survey form

2018-03-20 Thread Mike Dewhirst
On 21/03/2018 1:17 PM, sum abiut wrote: Hi, I am planning to build a survey app that allow the administator to add new questioner and the question to be answer by the users.But i am having trouble figuring how to get started. Just wondering if i need to have two models one for the answes and

survey form

2018-03-20 Thread sum abiut
Hi, I am planning to build a survey app that allow the administator to add new questioner and the question to be answer by the users.But i am having trouble figuring how to get started. Just wondering if i need to have two models one for the answes and another model to store the questions. I need

Re: Given a model, how can I get a widget for each field?

2018-03-20 Thread Bernd Wechner
Andréas and Andreas, I admit I smiled to see Andréas seconding Andreas' post ;-). One my best friends in primary school was an Andreas ;-). Given I have no form and don't want one, ModelForm in its declarative for seems undesirable. But your thinking is good and I realise in response and in

Re: Django 2.0 and AsgiRequest Error

2018-03-20 Thread Andrew Godwin
Hi - did you also open this issue on GitHub: https://github.com/django/channels/issues/981 ? In either case, your MIDDLEWARE setting would be useful, this looks like a middleware is not running. Andrew On Tue, Mar 20, 2018 at 2:47 PM, G Broten wrote: > Django Users: >

Django 2.0 and AsgiRequest Error

2018-03-20 Thread G Broten
Django Users: I've done a Google search on this error, but I haven't found anything relevant: AttributeError: 'AsgiRequest' object has no attribute 'user' So I'm hoping someone has an insight into its root cause and, maybe, a solution. The full error is shown below: 2018-03-20 15:40:31,079

Building a calculator

2018-03-20 Thread Abbad yeslem
Hello, I am new to Django and trying to learn using the framework as best as i can. I am trying to build an application that can calculate thickness for a vessel under two cases: internal or external pressure. I am really stuck trying to answer the following (Please Help): 1) How can i

Re: Get data from an external api into my database.

2018-03-20 Thread 'Tom Evans' via Django users
On Tue, Mar 20, 2018 at 10:23 AM, Mukesh Jha wrote: > I want to access a api from http://open-platform.theguardian.com/ or > https://newsapi.org/ and load it into my sqlite database. The data in these > site is in json format and I want them to get converted into my

Re: Get data from an external api into my database.

2018-03-20 Thread Jani Tiainen
Hi. Requests library will be your friend. ti 20. maaliskuuta 2018 klo 14.05 Mukesh Jha kirjoitti: > I want to access a api from http://open-platform.theguardian.com/ or > https://newsapi.org/ and load it into my sqlite database. The data in > these site is in json

Re: Trouble deploying Django/wagtail on Ubuntu 14.04

2018-03-20 Thread 'Tom Evans' via Django users
It is not looking for "home_page.html", it is looking for "base/home_page.html". On the error page it lists the locations it is searching for the template, and explicitly says the directories that are being searched. You say the file is at

Re: Sample of GeoDjanco websites

2018-03-20 Thread Christian Ledermann
https://schools.mapthe.uk/ On 20 March 2018 at 13:58, Jani Tiainen wrote: > Hi, > > libjasper sounds something that Django doesn't require. It needs GEOS, > gdal and proj4, pretty much same libs as PostGIS does. And to my knowledge > libjasper is for jpeg files. > > On Tue,

Re: Trouble deploying Django/wagtail on Ubuntu 14.04

2018-03-20 Thread drone4four
Thank you, Andreas. I added the python-path to my Apache ssl.conf and the Internal Server Error is gone now. It appears WSGI is serving my Django project perfectly. I adjusted ALLOWED_HOSTS just fine. But now Django is saying something about "TemplateDoesNotExist at /" in

Re: Default for varbinary in inspectdb

2018-03-20 Thread Kevin Olbrich
PS: After changing the field to BinaryField, read / write works beautiful. Am Dienstag, 20. März 2018 14:49:35 UTC+1 schrieb Kevin Olbrich: > > Hi, > > I just noticed a problem with varbinary fields and inspectdb. > When inspectdb processes all fields, it creates varbinary as CharField but > it

Re: Sample of GeoDjanco websites

2018-03-20 Thread Jani Tiainen
Hi, libjasper sounds something that Django doesn't require. It needs GEOS, gdal and proj4, pretty much same libs as PostGIS does. And to my knowledge libjasper is for jpeg files. On Tue, Mar 20, 2018 at 3:14 PM, lakeshow wrote: > Hi Jani. I wonder if you've ever had to

Re: how set image (dimension) upload height and weight in django models without from

2018-03-20 Thread Andréas Kühne
Hi, I use a plugin called easy thumbnails for things like this. It doesn't set what the user can upload, however it scales the uploads to the dimensions you need. See here : https://pypi.python.org/pypi/easy-thumbnails Regards, Andréas 2018-03-20 13:50 GMT+01:00 arvind yadav

Default for varbinary in inspectdb

2018-03-20 Thread Kevin Olbrich
Hi, I just noticed a problem with varbinary fields and inspectdb. When inspectdb processes all fields, it creates varbinary as CharField but it needs to be BinaryField. Using CharField it is impossible to store non-ASCII (non-text) content in these columns. I noticed that problem when I tried

Re: Sample of GeoDjanco websites

2018-03-20 Thread hunter.cur...@gmail.com
I've been using geodjango for a few years now and it's quite useful. I wrote some blog posts about setting up a server here: https://geoanalytic.github.io/ although some of the info is in need of an update it does discuss using leaflet on the front end. I'd also recommend checking out Geonode,

Re: Sample of GeoDjanco websites

2018-03-20 Thread lakeshow
Hi Jani. I wonder if you've ever had to push any geo-django involved apps to heroku's servers. I'm attempting this now and running into issues regarding libjasper.so.1. The community and documentation around geodjango seems quite thin.. On Tuesday, March 20, 2018 at 4:12:04 PM UTC+9, Jani

how set image (dimension) upload height and weight in django models without from

2018-03-20 Thread arvind yadav
class Member(models.Model): id = models.AutoField(db_column='ID', primary_key=True) name = models.CharField(db_column='NAME', max_length=255) member = models.CharField(db_column='MEMBER', max_length=255) sequence_num = models.IntegerField(db_column='SEQUENCE_NUM') img_url =

Re: serializtion

2018-03-20 Thread Andréas Kühne
Hi Siva, Checkout : http://www.django-rest-framework.org/api-guide/relations/#nested-relationships If you want to nest the relationship, for example: One author has many books. You will need to write your own update / create code then though. If you just want to add 2 models into one

Re: Given a model, how can I get a widget for each field?

2018-03-20 Thread Andréas Kühne
Hi, Like Andreas is saying the only way to define the default widgets is to use a form - and the simplest way to define a form is to use a ModelForm. When you use Django you should do best by trying to work WITH the framework instead of working against it. Forms are used for connecting templates

Re: Dealing with templates in an open source Django project?

2018-03-20 Thread 'Simon Connah' via Django users
Hi Etienne, Thank you for the reply. I think I get what you mean now. It would certainly solve a lot of issues so thank you for the idea. I'd have to rejig a few things to make sure it works correctly but I think once it is all configured it would be a much more stable system. I appreciate the

Geo-Django on Heroku throwing "No such file": libjasper.so.1

2018-03-20 Thread lakeshow
Heroku-16, Django==1.11.8 Any `heroku run python manage.py x` command will throw: OSError: libjasper.so.1: cannot open shared object file: No such file or directory According to this issue here: https://github.com/cyberdelia/heroku-geo-buildpack/issues/43, heroku-16 is without libjasper

Re: Given a model, how can I get a widget for each field?

2018-03-20 Thread Cictani
Without a form you can't get the Widget which is used by default. Are the fields always the same? If yes you could create a ModelForm on the fly and render the fields manually. Best regards, Andreas -- You received this message because you are subscribed to the Google Groups "Django users"

serializtion

2018-03-20 Thread siva.gatti
I am new to Django rest framework and don't know how to make two models into one serializer -- 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

Get data from an external api into my database.

2018-03-20 Thread Mukesh Jha
I want to access a api from http://open-platform.theguardian.com/ or https://newsapi.org/ and load it into my sqlite database. The data in these site is in json format and I want them to get converted into my database model format and store in it and later on use them as when queried. I am

Given a model, how can I get a widget for each field?

2018-03-20 Thread Bernd Wechner
Pulling my hair out again. I don't have a form, nor want a form, stunning really, but I just have the model. And I want the field widgets. I can't seem to find them anywhere. I know you can specify widget= on form fields when declaring the model, but can't find it anywhere in the data

Re: Trouble deploying Django/wagtail on Ubuntu 14.04

2018-03-20 Thread Cictani
You have to set the python-path too: WSGIDaemonProcess bakerydemo python-home=/home//.virtualenvs/wagtailbakerydemo/ python-path=/home//bakerydemo/ In the logs you see "No module named 'bakerydemo'" because you did not add the project directory to the python-path. Hope this works. Best

Re: Sample of GeoDjanco websites

2018-03-20 Thread Jani Tiainen
Hi, Unfortunately I can't show you any sites that are running GeoDjango but I've been working with GeoDjango apps last ~10 years. I can though help with all kind of a stuff. You can find me better on Django IRC-channel (#django on Freenode) but I read and write these groups occasionally. Apps

Re: Sample of GeoDjanco websites

2018-03-20 Thread Antonis Christofides
Hello, I think that much work is done on GeoDjango. I maintain 3 or 4 apps that use it, if not anything else to show points on a map. I don't claim to be an expert. I've concluded that GIS is a strange world. Not only blog posts and tutorials and references, there are also few books and they are

suggestions solicited for webm video in html5

2018-03-20 Thread Mike Dewhirst
What is the best way to upload video for display in a Django-based website? It appears FileField is one way to upload the video and html video elements the way to display it. I have used ImageField successfully and wonder if anyone is doing a VideoField? The djangopackages.org site