Re: How to fix: Django forms: {{ form }} is not working in a dynamic html page

2019-06-06 Thread Joe Reitman
Update. You can do this by hard coding the HTML form in the template. If you want to gather the data a user enters, each form will have to be uniquely identifiable and your view will have to determine which form its getting post data from. You can put the card index number in the button value

Re: Deployments

2019-06-06 Thread Soumen Khatua
In this tutorial I think they are covering about a how we can create new project in digital ocean but I have already one project in my local machine. How I can upload that project into server?? Thank you for your support. On Fri, 7 Jun 2019, 01:24 Chetan Ganji, wrote: > > https://www.digitaloce

Re: How to fix: Django forms: {{ form }} is not working in a dynamic html page

2019-06-06 Thread Joe Reitman
Interesting problem. It won't display because the form is inside a for-loop. Django Template language looks at variables inside a for-loop differently. Basically it looks for a collection. Since {{ form }} is not a collection, it just ignores it. I'm not sure how you can create multiple forms l

Is it possible to check the existence of Group in Django Channel ?

2019-06-06 Thread Arean Bbay
I would like to make a channel to be able to check if a group exists, so that it can join. -- 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

How to fix: Django forms: {{ form }} is not working in a dynamic html page

2019-06-06 Thread Majid Rafiee
I've created a form in Django: #forms.py from django import forms class ContactForm(forms.Form): name = forms.CharField() number = forms.FloatField() eail_user = forms.EmailField() and imported in in views.py #views.pyfrom django.shortcuts import renderfrom .models imp

Re: Import circular

2019-06-06 Thread Fabio O da silva
not [image: Mailtrack] Remetente notificado por Mailtrack 06/06/19, 06:28:46 PM On Thu, Jun 6, 2019 at 5:

Re: Multitentant login

2019-06-06 Thread Chetan Ganji
Oh yes, this one is possible. Do you want to know if this is possible or how to actually implement it?? I have implemented a solution to solve exactly the same problem. Let me know if you want to know the one that I implemented. Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http

Re: Import circular

2019-06-06 Thread 'Alex Mesias Diaz Toro' via Django users
Hi Fabio, Did you solve this problem? Ty El jue., 6 jun. 2019 a las 12:12, Fabio O da silva () escribió: > urls.py > > > > [image: Mailtrack] > > Remetente > notificado por > Mailtrack >

Re: Deployments

2019-06-06 Thread Chetan Ganji
https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04 Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Thu, Jun 6, 2019 at 10:33 PM Soumen Khatua wrote: > Hi Folks, > > I develope one project

Re: user Form error

2019-06-06 Thread Chetan Ganji
Hi Anchal PFA https://stackoverflow.com/questions/9061846/attributeerror-at-registration-userform-object-has-no-attribute-save .save() method is available on forms.ModelForm; not on forms.Form Regards, Chetan Ganji +91-900-483-4183 ganji.che...@gmail.com http://ryucoder.in On Fri, Jun 7, 2019

Re: user Form error

2019-06-06 Thread terry frank
Hello, from which repos ? On Thu, Jun 6, 2019 at 7:50 PM anchal agarwal wrote: > Hello, > I am making a simple user form but my form data is not saving.It is > showing this error > 'UserForm' object has no attribute 'save' > Here is my code. Please tell me where i am wrong > views.py > class Us

user Form error

2019-06-06 Thread anchal agarwal
Hello, I am making a simple user form but my form data is not saving.It is showing this error 'UserForm' object has no attribute 'save' Here is my code. Please tell me where i am wrong views.py class UserFormView(View): form_class=UserForm template_name='music/registration_form.html' #display blan

Re: Import circular

2019-06-06 Thread Fabio O da silva
urls.py [image: Mailtrack] Remetente notificado por Mailtrack 06/06/19, 02:11:53 PM On Thu, Jun 6, 2019 a

Deployments

2019-06-06 Thread Soumen Khatua
Hi Folks, I develope one project using django in my localhost. Now how I can deploy that project into digital ocean and what are changes I need to do in my project for moving to production server. Please help I have no idea regarding this matter. Thank You. Regards, Soumen -- You received this

Django, integration of code and sigma compatibility

2019-06-06 Thread trizalvi
Hello, I'm new at this subject. I have html/javascript codes using sigma.js and I was thinking about starting to use Django. I would like to know if I can integrate my code easily into Django and if it is compatible with sigma.js. Thank you in advance! Have a nice day ^^ -- You received t

Re: Annotations as models fields

2019-06-06 Thread Chetan Ganji
Yes Olivier, You are right :P If I understand the problem correctly this time, you want the field available on django model, but does not want the python to do the calculation. You want the database to compute the value. If yes, you could use a row level trigger i.e after create and after update

Re: Import circular

2019-06-06 Thread Joe Reitman
Can you post your views.py, urls.py and template? On Thursday, June 6, 2019 at 9:18:22 AM UTC-5, Fabio O da silva wrote: > > django.core.exceptions.ImproperlyConfigured: The included URLconf > 'simplemooc.urls' does not appear to have any patterns in it. If you see > valid patterns in the file t

Re: Orm Query for this type of situation

2019-06-06 Thread Devender Kumar
Account /Lead Model account_name contact m2m realtion contact Model name phone No calls Model caller no # person phone no who is calling agent no # person who is picking the call (CRM user) status timestamp duration calls model is populated with so

Import circular

2019-06-06 Thread Fabio O da silva
django.core.exceptions.ImproperlyConfigured: The included URLconf 'simplemooc.urls' does not appear to have any patterns in it. If you see valid patterns in the file then the issue is probably caused by a circular import. -- You received this message because you are subscribed to the Google Gr

Re: Annotations as models fields

2019-06-06 Thread Olivier Dalang
Thanks Chetan for trying to help, but please read carefully the issue, as you didn't understand what I'm trying to do. In the meantime, and for the record, I found this, which works for simple cases. https://github.com/schinckel/django-computed-field On Thu, 6 Jun 2019 at 14:57, Chetan Ganji wr

Re: Annotations as models fields

2019-06-06 Thread Chetan Ganji
I think this would solve your problem. Whatever calculations needs to be done, you can do it manually before saving the Sales instance. Preferably after checking if form.is_valid() in case of django and in the function perform_create() in case of django rest framework. class Sales(models.Model):

Re: mod_wsgi problem

2019-06-06 Thread Kasper Laudrup
On June 6, 2019 4:51:49 AM GMT+02:00, Davin Pore wrote: >how able to resolve this issue. I tried to install the mod_wsgi on >manual >procedure. > >[image: mod_wsgi.jpg] > >-- >You received this message because you are subscribed to the Google >Groups "Django users" group. >To unsubscribe from th

Re: mod_wsgi problem

2019-06-06 Thread Joel Mathew
Always read installation README and github README before installing anything. It seems you dont even have a basic compiler installed. For Debian based systems, install: `sudo apt install build-essential` Sincerely yours, Joel G Mathew On Thu, 6 Jun 2019 at 17:09, Davin Pore wrote: > how ab

Re: Django unable to write to an NFS share

2019-06-06 Thread Win Thor
In case anyone else runs into this. You can fix this by using NFSv4. There are issues with file locking and if you don't have statd running with NFSv3 to help manage lock status for files then you'll run into these types of issues. I was having this same issue and had to update my NFS server to

mod_wsgi problem

2019-06-06 Thread Davin Pore
how able to resolve this issue. I tried to install the mod_wsgi on manual procedure. [image: mod_wsgi.jpg] -- 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 djan

Re: Annotations as models fields

2019-06-06 Thread Olivier Dalang
Thanks for the answer. As said, the @property + python method wouldn't work for my use case, as I need to be able to use the field in the queryset to filter/order (plus my actual computed field use aggregates expressions). Cheers, Olivier On Thu, 6 Jun 2019 at 12:36, Chetan Ganji wrote: > I ha

Re: Orm Query for this type of situation

2019-06-06 Thread Chetan Ganji
Right now its an open ended question. If you post code for your models here, someone can help you. On Thu, Jun 6, 2019, 4:38 PM Devender Kumar wrote: > Hi, > I am working on CRM project and stuck with REPORTING part. > > I have Accounts , Lead , contact, Calls ,Concern modules > account/Lead ca

Re: How to migrate MySQL -> PostgreSQL?

2019-06-06 Thread Devender Kumar
Simple scripts : Dump data python manage.py dumpdata # this will whole database to single json python manage.py loaddata filename # this will populate the database with that json again On Tuesday, June 4, 2019 at 12:50:59 AM UTC+5:30, Victor Porton wrote: > > How to migrate a production datab

Orm Query for this type of situation

2019-06-06 Thread Devender Kumar
Hi, I am working on CRM project and stuck with REPORTING part. I have Accounts , Lead , contact, Calls ,Concern modules account/Lead can have multiple contacts contacts have multiple calls and concerns calls have different status like Incoming outgoing missed call etc Question I need to create

Re: using single view function or class for multiple types of users

2019-06-06 Thread Harsh Gundecha
thank you this perfectly makes sense On Tuesday, June 4, 2019 at 9:32:23 PM UTC+5:30, RyuCoder wrote: > > RE: "slight change in output" > First of all define what it really means. What needs to be changed and how. > > RE " is it a good idea to use same URL for both and serve by checking user > ty

Re: Annotations as models fields

2019-06-06 Thread Chetan Ganji
I had a similar need in one of my clients project, I ended up using @property and a python method. AFAIK, AnnotationField is absent from django models. If you would like to write one, below is the material you need to refer. https://docs.djangoproject.com/en/2.2/howto/custom-model-fields/ Regard

Annotations as models fields

2019-06-06 Thread Olivier Dalang
Dear list, I was wondering whether there's a package or pattern to define annotations as model fields, so that they could really be used as database-side computed fields. Currently, I do something like this (not tested, it's a simplified case): class SalesManager(models.Manager): def get_queryse

Watch "Django on pythonanywhere." on YouTube

2019-06-06 Thread Alex Kimeu
https://youtu.be/3B2yALSpqFg -- 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 djan

Re: Handling two forms at different pages.

2019-06-06 Thread Chetan Ganji
This is front end task. You combine the two different pages into a single page. Page 1 and page 2 would become step 1 and step 2. You can use concept of tabs to implement this. Both the tabs would be under the same form. When you hit the save button, data from both the steps would be saved. Re

Regarding to trying to make Django rest Api for eCommerce project.

2019-06-06 Thread RONAK JAIN
Dear All, *Note: trying to make Django rest Api for eCommerce project.* I am working drf eCommerce project. I am trying to make product rating and review Django Rest Api. *Models.py* class Product_review(models.Model): user_id = models.ForeignKey(User_registrations, on_delete=models.CASCAD