Re: Deactivate the Child Objects when parent is deactivate.

2017-05-29 Thread James Schneider
On Sun, May 28, 2017 at 8:50 AM, pradam programmer < pradam.programm...@gmail.com> wrote: > from django.db.models import QuerySet > import attr > from attr.validators import instance_of > > @attr.s > class ChildDeactivate(object): > loca = attr.ib(validator=instance_of(QuerySet)) > > def d

Re: saving data from both a model and a derived model

2017-05-29 Thread James Schneider
On Fri, May 26, 2017 at 6:13 AM, wrote: > > James, > > As always, thank you for looking at this. > > Can you clarify for me? > > I though that setting UNIQUE meant that the database objects, i.e objects > already in the database had to be unique. From your response, my > understanding that unique

Class based view without rendering form

2017-05-29 Thread shivendra bind
Hi, I recently started learning Django. Please help me with following problem. Background: I am using Python 3.5 and Django 1.11.1. I have 2 model class, Album and Song. A song always references to an album. I am using class based views to perform CRUD operations. Problem: how to update singl

Please help me

2017-05-29 Thread Opeyemi Gabriel
Hello, Am name is Gabriel, please am a novice and am interested in learn django. Can you please put me through Thank you -- 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 em

Re: Please help me

2017-05-29 Thread Babatunde Akinyanmi
I'd love to but the problem is I don't have the time. I suggest you start by attempting to build something. The django community is very welcoming to beginners so if you encounter issues and you can't find the answer on stackoverflow.com, post a message to the mailing list. You can copy me also an

Please help two dependent list check boxes

2017-05-29 Thread farah_chaaban
I am a beginner with django. I don't have any idea how to create a two dependent list of check boxes. I mean when i check a box a second list on checkbox appears. When I click on a second checkbox a new list of checkbox appears. I didn't find anything related on google. I don't know how to creat

Re: Please help me

2017-05-29 Thread Oladipupo Elegbede
Have you tried the Django tutorial? Start with that and then try scaling up. There are couple of free tutorials out there and resources to find answers to your problems. Stackoverflow as mentioned above is one of them. If you still have problems, try your hands on Django documentation and then co

Re: Session Variables

2017-05-29 Thread Daniel Roseman
On Monday, 29 May 2017 06:04:02 UTC+1, James Schneider wrote: > > > On May 28, 2017 9:35 AM, > wrote: > > > tFetchData = users.objects.get(emailid = lEmailId) > > request.session['sPassword'] = tFetchData.userroles > request.session['sCompanyId'] = tFetchData.companyid > >

Re: Should I store offline calculation results in the cache?

2017-05-29 Thread Antonis Christofides
Hello, thanks to everyone who replied. Here are some conclusions of mine: Today's filebased-cache code seems to be suffering from the same problems it was suffering 7 years ago. Every time you .set() the cache it asks the OS to provide a list of files, just for counting them (for the purpose of c

Re: Please help two dependent list check boxes

2017-05-29 Thread Jani Tiainen
Actually this is not exactly Django problem. Well, model wise this is parent - child relation (first checkbox is a parent, second one is/are child(ren)) UI side is Javascript - more common way to do it is "dependent selects" but it could be done with checkboxes as well. Since you're beginne

Re: Please help me

2017-05-29 Thread Jani Tiainen
Hi, If you feel that Django tutorial is too compact, Django Girls do have much more verbose tutorial. And welcome to Django-world. On 29.05.2017 11:57, Opeyemi Gabriel wrote: Hello, Am name is Gabriel, please am a novice and am interested in learn django. Can you please put me through Thank

Bug? makemigrations doesn't recognize table names generated by metaclasses

2017-05-29 Thread Wolph
Hi guys, It seems that I may have stumbled upon a bug or at the very least, strange behaviour. For easier reading in the database I use the following table name structure: spam_eggs_foo_bar for an app called spam and a model called EggsFooBar, these names are automatically generated using the

Re: Please help me

2017-05-29 Thread Opeyemi Gabriel
Django girls, am a guy On May 29, 2017 13:20, "Jani Tiainen" wrote: > Hi, > > If you feel that Django tutorial is too compact, Django Girls do have much > more verbose tutorial. > And welcome to Django-world. > > On 29.05.2017 11:57, Opeyemi Gabriel wrote: > > Hello, Am name is Gabriel, please a

Re: Please help me

2017-05-29 Thread Karen Tracey
On Mon, May 29, 2017 at 8:52 AM, Opeyemi Gabriel < gabriel.futionl...@gmail.com> wrote: > Django girls, am a guy > > No worries, I expect you will still be able to follow it. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from t

Re: Please help me

2017-05-29 Thread Marlysson Silva
The important it the content. Em segunda-feira, 29 de maio de 2017 10:07:58 UTC-3, gabriel.futionlabs escreveu: > > Django girls, am a guy > > On May 29, 2017 13:20, "Jani Tiainen" > > wrote: > >> Hi, >> >> If you feel that Django tutorial is too compact, Django Girls do have >> much more verbo

Re: testing in django

2017-05-29 Thread Marlysson Silva
If you are using the sqlite database to dummy test , you can in a test case class submit the post to sign up form ( and store at database ) and in other class retrieve the user created previously and performs the login . Em terça-feira, 23 de maio de 2017 04:07:29 UTC-3, Akash Tomar escreveu: >

formfield_for_manytomany exclude

2017-05-29 Thread carlos
Hello, I am trying to exclude several categories from a m2m, but when I see the widget in my form all still appear, I put the code that I execute when I load the form, the id that I place are the categories that I do not want to appear def formfield_for_manytomany(self, db_field, request, **kwargs

Re: Please help two dependent list check boxes

2017-05-29 Thread carlos
maybe this app https://github.com/digi604/django-smart-selects help you see the js work dependent selects cheers On Mon, May 29, 2017 at 6:18 AM, Jani Tiainen wrote: > Actually this is not exactly Django problem. > > Well, model wise this is parent - child relation (first checkbox is a > parent

How to render a HTML template in App2 from App1

2017-05-29 Thread Yeddu Prasad
Dear Experts, Please can you help me with this issue. I spent a lot of time on this but not able to solve this basic issue. My need is as below. Sincere apologies if I am asking for too much in that you have to read this whole code. Please try and help me. I have a project called ella that has

How to render a HTML template in App2 from App1

2017-05-29 Thread Daniel Roseman
Sorry, you should immediately delete all this code. It is horribly unsafe; you​ are storing passwords in plain text editor you must **never** do. Django already includes a secure and extendable authentication framework, which you​ should use instead. (For the record, the problem is that you ren

Re: Please help me

2017-05-29 Thread m712 - Developer
You just made my day. On 05/29/2017 12:52 PM, Opeyemi Gabriel wrote: > Django girls, am a guy > > On May 29, 2017 13:20, "Jani Tiainen" > wrote: > > Hi, > > If you feel that Django tutorial is too compact, Django Girls do > have much more verbose tutorial. >

Re: Please help me

2017-05-29 Thread Carlos Andre
https://docs.djangoproject.com/pt-br/1.11/intro/tutorial01/ 2017-05-29 17:58 GMT-03:00 m712 - Developer : > You just made my day. > > On 05/29/2017 12:52 PM, Opeyemi Gabriel wrote: > > Django girls, am a guy > > On May 29, 2017 13:20, "Jani Tiainen" wrote: > >> Hi, >> >> If you feel that Django

Re: Class based view without rendering form

2017-05-29 Thread Fred Stluka
Shivendra, If you want to have an effect at the server without leaving the current page, you'll find that Django itself does not do that. Instead, you'll have to do one of: - Use _javascript_ in the page to make an Ajax or WebSockets    call to the server (handl

ModuleNotFoundError: No module named 'models'

2017-05-29 Thread jinghui yang
ModuleNotFoundError: No module named 'models' How to fix this error? -- 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.

Re: ModuleNotFoundError: No module named 'models'

2017-05-29 Thread Dylan Reinhold
Well simple fix is make sure you have a module named models. Without the code no one is going to know what you did wrong. On Mon, May 29, 2017 at 4:42 PM, jinghui yang wrote: > ModuleNotFoundError: No module named 'models' > > How to fix this error? > > -- > You received this message because

Re: Is it possible to swap 1.8 and 1.10/1.11 Admin static files

2017-05-29 Thread Mike Dewhirst
Cancel this question. We will force the user to comply with our reality. Cheers Mike On 16/05/2017 5:42 PM, Mike Dewhirst wrote: I have a user who is keen to revert to the "old" 1.8 look and feel for his company now that we have upgraded to 1.10. First question is it even possible? I have t

Re: ModuleNotFoundError: No module named 'models'

2017-05-29 Thread VC
from django.db import models # Create your models here. class Student(models.Model): fname = models.CharField(max_length=50, null=True, blank=True) def __str__(self): return self.fname please try this On Mon, May 29, 2017 at 7:42 PM, jinghui yang wrote: > ModuleNotFoundError: No module named

Re: ModuleNotFoundError: No module named 'models'

2017-05-29 Thread m712 - Developer
How do you expect us to understand your problem if you give us no context at all? For all I know this error could be a file system corruption. On May 30, 2017 2:42 AM, jinghui yang wrote:ModuleNotFoundError: No module named 'models'How to fix this error? -- You received this message because yo