Re: Drop Down Menu in Django Forms not working.

2017-08-05 Thread lemme smash
name is a ForeignKey field? If not, you shouldn't use queryset attribute there. Use choices instead. If you want to render all available choices from db, you can get it like Model.objects.filter(...).values_list('name', flat=True) On Friday, August 4, 2017 at 8:07:24 PM UTC+3, Arun S wrote: > >

Re: a hard question about django ORM

2017-08-06 Thread lemme smash
what the problem here? you can get all your Feeds by feeds = Feed.objects.filter(user=me) and then all the comments for each feed comments = feed.comment_set.exclude(user=me) or what? if you want to get only comments, you can do comments = Comment.objects.filter(feed__in=feeds).exclude(user=me)

Re: module object has no attribute after using different version of Python

2017-08-06 Thread lemme smash
it's a very strange way of import. if your forms and models are in the same python module, you can do from . import models On Saturday, August 5, 2017 at 11:01:01 PM UTC+3, Prithviraj Mitra wrote: > > I have both versions python 2.7 and 3.4 installed. I am using some code > which is developed

Re: Drop Down Menu in Django Forms not working.

2017-08-06 Thread lemme smash
so, you can maybe show you models structure here? also, if it is a ForeignKey, why you trying to filter qs by string values? I mean Q(name = 'ACTIVE') it's shouldn't work On Sunday, August 6, 2017 at 5:22:21 AM UTC+3, Arun S wrote: > > Yes, name is a foreign key here. -- You received this mess

Re: Drop Down Menu in Django Forms not working.

2017-08-07 Thread lemme smash
name | varchar(32) | NO | UNI | NULL|| > | friendly_name | varchar(32) | NO | UNI | NULL|| > | description | varchar(255) | YES | | NULL|| > +---+--+--+-+-----++ &g

Re: Drop Down Menu in Django Forms not working.

2017-08-07 Thread lemme smash
t; On Monday, August 7, 2017 at 3:37:04 PM UTC+5:30, lemme smash wrote: >> >> i meant EvalState model >> if name attribute on it is a ForeignKey you should get corresponding >> queryset of model it links to >> if it's charfield, you should use text choice

Re: Can't install mysqlclient

2018-10-25 Thread lemme smash
you sure you have mysql server installed? also, if you plan to start development, i recommend you to seriously think about learning linux. it's a way more fit developers needs On Thursday, October 25, 2018 at 2:27:43 PM UTC+3, Rabil Abdullahi wrote: > > > > I received error message while trying

Re: ANYONE!!! Django ai working

2019-10-04 Thread lemme smash
wut? On Saturday, September 14, 2019 at 7:01:13 AM UTC+3, nitin kumar wrote: > > How does make application to understand a document! -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails fr

Re: Django bootstrap calendar

2019-10-04 Thread lemme smash
it's more about client, so you probably want to look for calendar libraries and then JUST make an api for it. On Tuesday, September 24, 2019 at 12:47:37 AM UTC+3, Perceval Maturure wrote: > > Is there anyone with a step by step procedure of doing this app in a > Django 2.1 environment For newbi

Re: creating school year

2019-10-04 Thread lemme smash
you probably may want to figure out what you actually need to do first On Tuesday, September 24, 2019 at 5:54:12 PM UTC+3, Rain wrote: > > i have a question how to create school year with start date and end date > all transaction must under this year. Thanks.. > -- You received this message bec

Re: Widgets not working for dynamically added formset forms

2019-10-04 Thread lemme smash
and you have no errors in browser console? On Tuesday, October 1, 2019 at 11:41:28 PM UTC+3, Dmitri S. wrote: > > I have a formset with fields with Select2 widgets and a calendar > (date-picker) from django app. > > And I use dynamic addition of formset forms. > > > When I render a template for t

Re: Widgets not working for dynamically added formset forms

2019-10-06 Thread lemme smash
okay, but what you actually mean by "widgets don't work"? also, from my experience I can say that when you have to work with some dynamic forms is't much better to use pure js on client and only validate it on backend On Tuesday, October 1, 2019 at 11:41:28 PM UTC+3, Dmitri S. wrote: > > I have

Re: Widgets not working for dynamically added formset forms

2019-10-08 Thread lemme smash
okay, i think i got it. you probably need to provide some snippet to reload list of choices to newly added form. try to look some examples of using django-select2 with formsets... by pure js i mean not necessarily vanila js, but pure client code, without rendering templates on server. all the p

Re: ListView from 2 model

2019-10-08 Thread lemme smash
you probably may want to implement `get_context_data` method like: def get_context_data(self): context = super(BlogView, self).get_context_data() context.update({ 'authors': Author.objects.filter(posts__isnull=False).distinct(), 'tags': Tag.objects.all()

Re: filter search from 2 models

2019-10-10 Thread lemme smash
suggestion: it's better to post code snippets as text (i.e. use `code` markup) about your question: what you mean by "i want to do a combination"? you what to display both filters and both lists on the same page? in that case you want to setup custom view. On Thursday, October 10, 2019 at 1:48:5

Re: Templates rendering problem

2019-10-10 Thread lemme smash
so, it's not reproducing when you run it locally? also, can you provide an example of string where you have "strange" character? most probably you store it in database. On Thursday, October 10, 2019 at 1:48:52 AM UTC+3, Boris Romero wrote: > > Hi! > > I recently update Django from 1.11 to 2.2.6

Re: filter search from 2 models

2019-10-11 Thread lemme smash
just create custom view and add those two querysets to context. if you want to do search by one input in both querysets, you'll need to create custom filter as well, or just filter it in a view by query from input On Thursday, October 10, 2019 at 1:48:52 AM UTC+3, sotiris moustogiannis wrote: >

Re: Micro Service Architecture

2019-10-12 Thread lemme smash
go ^^) On Friday, October 11, 2019 at 8:39:33 PM UTC+3, Uzama Zaid Mohammed Jaward wrote: > > Hi all > > What are the tech stack is good for micro service architecture in Django > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

Re: page redirecting only home page

2019-10-12 Thread lemme smash
why you have type="button" on anchor?) On Saturday, October 12, 2019 at 7:07:48 AM UTC+3, narendra thapa wrote: > > i have two template load_page.html and ask_questions.html while i am > linking a ask_questions.html through load_page.html via a anchor tag i am > not getting ask_questions.html bu

Re: Templates rendering problem

2019-10-16 Thread lemme smash
tabase encoding problem, it just >> involves the templates, because the same database, with diferents instances >> of the app (with the upload and without it) not make any differences. >> >> Thanks for the ideas! >> >> >> On Thursday, October 10, 2019 at

Re: Templates rendering problem

2019-10-16 Thread lemme smash
psycopg2, djangorestframework, and subdomains (using a pull request for > compatibility). > > The problems happens with DEBUG=False, and using nginx and uwsgi, using > the same configuration for django 1.11 and django 2.2.x > > Greetings! > > On Wednesday, October 16, 2019 at 8:5

Re: unable to validate and save modelform data into mysql database...

2019-10-21 Thread lemme smash
it's quite expected behavior. if you want to check if job exists, you better use Job.objects.filter(name=job_name).exists() On Monday, October 21, 2019 at 3:49:01 PM UTC+3, Gourab Mahapatra wrote: > > Traceback: > > File > "C:\Users\Admin\PycharmProjects\autotask\AutoTaskVenv\lib\site-packages\d

Re: Bug or Feature: Trailing Slash appended to two places in a URL

2019-10-21 Thread lemme smash
i'm not sure, but i can say that it's quite strange not to have trailing slash on `include` path. you want to have something like `api/v1case`? On Sunday, October 20, 2019 at 1:07:48 AM UTC+3, Conor wrote: > > Hi All, > > I'm not sure whether this is a feature or a bug, so I thought it best to >

Re: unable to validate and save modelform data into mysql database...

2019-10-22 Thread lemme smash
okay, man. seems like you need to read and repeat everything you know about python and django. i highly recommend you to go through django tutorial. On Monday, October 21, 2019 at 3:49:01 PM UTC+3, Gourab Mahapatra wrote: > > Traceback: > > File > "C:\Users\Admin\PycharmProjects\autotask\AutoTas

Re: DJANGO, MySQL, NGINX stack for a production hosting server in Digital Ocean droplet

2019-11-05 Thread lemme smash
i'm recommend you to consider docker setup like https://docs.docker.com/machine/examples/ocean/ https://testdriven.io/blog/dockerizing-django-with-postgres-gunicorn-and-nginx/#nginx On Tuesday, November 5, 2019 at 1:27:55 AM UTC+3, Ram wrote: > > Hi, > Please let me know if anyone has setup this s

Re: Django DEBUG magic, and a bizarre bug under django-extra-views

2019-12-16 Thread lemme smash
i feel for you, but from this description there is no way to figure out how to help. it's way too abstract. so you probably may want to provide code piece and traceback to get any kind of help here. On Saturday, December 7, 2019 at 2:08:41 AM UTC+3, Alaina Rowe wrote: > > I have not been able to

Re: How to request data from an open source website such as Reddit or Github and display on the Local Django Website ?

2019-12-27 Thread lemme smash
you've really did the great, but in order to receive data from reddit you'll need to research on their api and it's not very related to django. On Thursday, December 26, 2019 at 4:05:14 PM UTC+3, Shaurya Sharma wrote: > > Hey there , I am quite a newbie to Django and I am trying to understand >

Re: angular setup for django (routes not working)

2019-12-27 Thread lemme smash
you doing something strange. usually, when you want to setup angluar with django, you just using `ng serve` to handle all the interface, and just use django for data and api. it's not a good idea to render angular app with django On Thursday, December 26, 2019 at 4:05:14 PM UTC+3, nitish kumar w