Subquery and FieldError: Expression contains mixed types. You must set output_field.

2018-04-02 Thread Fabio Andrés García Sánchez
Hi! What I am trying to do is filtering using queryset, get a value when verified is true. It works fine when: mano_obra = HoraHojaTrabajo.objects.values('literal__proyecto__id_proyecto').annotate( cantidad_horas=ExpressionWrapper(Sum((F('cantidad_minutos') / 60)),

Infinite scrolling, Ajax, Phone or PC?

2018-04-02 Thread Jamaldin Pro
Hello. How can I make Infinite scrolling html? example: https://www.megacom.kg/hype/ru.html#instruction How can I go from first url to another without reloading the website? How can I know if the user is entering my website from phone or pc? If user is entering from phone it should

Re: Decoupling Postgres database credentials in django for deployment.

2018-04-02 Thread Cictani
Hi, You could rename your dev settings file to for example 'settings_dev.py' and only commit this file (add settings.py to .gitignore). On your Linux Server you could create a new directory in /etc like: /etc/django /etc/django/app1 /etc/django/app2 ... There you store your production

Templates and URL Mappings

2018-04-02 Thread Will Burchell
Hi all, I'm having some trouble understanding fairly basic URL mappings and how they rout through to templates. I have an app "stock" which is registered in my base admin.py. I have three classes in my app, stock\models.py listed below: from django.db import models class

Having trouble writing loop in Django template

2018-04-02 Thread shawnmhy
Hello guys I am currently working on django views and templates and met some problems. I have a model named 'metabolites', which contains: id, name, compartment, charge and formula 5 components. I have another model named 'Reactionsmeta', which contains: id(reactions), name, metabolie1,

Re: Infinite scrolling, Ajax, Phone or PC?

2018-04-02 Thread Julio Biason
Hi Jamaldin, Yeah, there is nothing to do with Django, except for a part in the infinite scrolling. For infinite scrolling, you'll keep loading more data from the server and adding it to the DOM when the page position reaches a certain point. Both of those can be done with jQuery, for example,

Error H10 while deploying Django project

2018-04-02 Thread prince gosavi
heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=miniprojectcc.herokuapp.com dyno= connect= service= status=503 bytes= protocol=http ^C(miniproject-wxhZ76U4) heroku ps -a miniprojectcc Free dyno hours quota remaining this month: 549h 30m (99%) === web (Free):

Re: Error H10 while deploying Django project

2018-04-02 Thread Andréas Kühne
Hi, You need to give us more information. You should be able to get logs from the python part of the application, because all this is saying currently is that there is an error in your code (or at least the way heroku expects the code to be). A 503 error (which you are getting) means that the

Re: Request Timed Out When Generating Huge Data

2018-04-02 Thread tango ward
I tried loading the site locally to see how long will it take to load a record of 1800 students. It took about a minute and a half locally. The request timed out problem occurs when I try to generate a CSV report and PDF. Both result to timed out even locally. On Tue, Apr 3, 2018 at 8:12 AM,

Re: Decoupling Postgres database credentials in django for deployment.

2018-04-02 Thread Mike Dewhirst
On 2/04/2018 7:59 PM, Cictani wrote: Hi, You could rename your dev settings file to for example 'settings_dev.py' and only commit this file (add settings.py to .gitignore). I wrote a tiny utility to read a file and retrieve credentials for any purpose but especially for keeping database

Re: Decoupling Postgres database credentials in django for deployment.

2018-04-02 Thread Mike Dewhirst
On 3/04/2018 8:49 AM, Mike Dewhirst wrote: On 2/04/2018 7:59 PM, Cictani wrote: Hi, You could rename your dev settings file to for example 'settings_dev.py' and only commit this file (add settings.py to .gitignore). I wrote a tiny utility to read a file and retrieve credentials for any

Re: Request Timed Out When Generating Huge Data

2018-04-02 Thread tango ward
Hi, SLR. At the moment, the largest number of students we have is 2000 in one campus. I haven't played around with the code but when I check it we're using a get_queryset function to get the data and filter it using Q. Then display it using get_context_data Code: class

Django bugfix releases: 2.0.4 and 1.11.12

2018-04-02 Thread Tim Graham
Details are available on the Django project weblog: https://www.djangoproject.com/weblog/2018/apr/02/bugfix-releases/ -- 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

Re: Templates and URL Mappings

2018-04-02 Thread Daniel Roseman
On Monday, 2 April 2018 12:00:31 UTC+1, Will Burchell wrote: > from django.conf.urls import url > from . import views > > app_name = 'stock' # Referenced by template, ie item in index.html > > urlpatterns = [ > # /stock/ > url(r'^$', views.index, name="index"), > # /stock/nnn/ >