Re: Getting one single entry from model via ajax

2019-01-14 Thread ANi
You need to make it iterable, so there are two ways to do it. One is to let it become a list with single object while another one is to use filter so the result will be a QuerySet. In your case will be the first one. Stéphane Manguette於 2019年1月15日星期二 UTC+8上午9時26分14秒寫道: > > Hello Django community

Re: keep getting an error on there is no module

2019-01-14 Thread Saeed Pooladzadeh
در یکشنبه 13 ژانویهٔ 2019، ساعت 7:28:11 (UTC-8)، Saeed Pooladzadeh نوشته: > > :In my Django project while I have made an app named employee. And have > registered it in my apps but I keep getting this error: > > No module named 'employee' > > Leading to the app not being able to run properly. >

Getting one single entry from model via ajax

2019-01-14 Thread Stéphane Manguette
Hello Django community, I'm pretty new to Django and I'm getting stuck on the following issue. I have a model defined as follows : class temp_db(models.Model): date = models.DateTimeField() tempext = models.DecimalField(max_digits=4, decimal_places=2) tempeau = models.DecimalField(max_digits=4,

Re: migrate failed due to Permission

2019-01-14 Thread ANi
Okay, > > *those queries that you're executing in module scope should go into > functions and methods that you only call when you actually need that data.* This is enough to me. lol I did query outside the functions, I didn't notice that it would be a problem. Thank you very much. ANi於 2019年1月

Re: how handle high incoming data and sending throttled data to web sockets in django-channels

2019-01-14 Thread Andrew Godwin
You'll have to design your own consumption architecture if you want to reliably handle 100 messages a second - since it's UDP, channels won't be handling it natively so you'll need to terminate and process the UDP yourself. I'd recommend either getting a UDP loadbalancer if you have messages coming

Re: Where do you place your application code in production

2019-01-14 Thread PASCUAL Eric
Hi, It depends on the type of deployment you use. The options I use are : * for deployment on a "bare server", I create a standard user which id is used for running the application, and the application code is stored under the home dir of this user. This solves the security problem of r

Re: keep getting an error on there is no module

2019-01-14 Thread Saeed Pooladzadeh
When I register my app in installed apps in setting I get an error message. *When I run the server or make the migration. My Django version is 2.1.5*. What is the problem? Saeed On Sun, Jan 13, 2019 at 12:03 PM Nebojsa Hajdukovic < nebojsa.zero...@gmail.com> wrote: > when you get this error, w

Re: working fine with sqllite but not showing result in mysql

2019-01-14 Thread Danylo K.
if you change the code to this, it will work: post = get_object_or_404(Post, slug=post, status='published', publish__year=year) # publish__month=month, # publish__day=day) On Mo

Re: Django UserForm Help Texts

2019-01-14 Thread Alex Kimeu
from django.shortcuts import render, redirect from django.contrib.auth.decorators import login_required from .forms import UserRegisterForm, UserUpdateForm, ProfileUpdateForm from django.contrib import messages from .models import Profile from quiz.models import Question def register(request):

Storing SSN and other PII in Django

2019-01-14 Thread cpyle
Hey all, My company requires us to store a user's SSN to report business on his or her behalf. I'll admit that I've never built out a django production app, so I'm not sure the best practices for storing PII. Is there any way to encrypt the information on the backend so even the admins like me

Re: working fine with sqllite but not showing result in mysql

2019-01-14 Thread Danylo K.
I have the same issue. In MySQL, search works fine by the *year part*, but not by the *month* and *day* *parts*. Cheers! On Mon, Jan 14, 2019 at 1:54 PM Alex Kimeu wrote: > Have you configured MySQL correctly? > > On Mon, Jan 14, 2019 at 9:07 PM tribhuvan kishor < > tribhuvankishor...@gmail.com

Re: Django UserForm Help Texts

2019-01-14 Thread Nebojsa Hajdukovic
can you show your views.py? пон, 14. јан 2019. у 19:52 kimeualexis је написао/ла: > Hello, guys. > > Anyone with an idea how to hide help texts in Django User Registration > Form? > > Regards. > > [image: Screenshot from 2019-01-14 21-48-53.png] > > -- > You received this message because you are

Re: working fine with sqllite but not showing result in mysql

2019-01-14 Thread Alex Kimeu
Kindly post your urls mappings. On Mon, Jan 14, 2019 at 10:22 PM tribhuvan kishor < tribhuvankishor...@gmail.com> wrote: > yes all things are working fine like post list are working fine > > from django.shortcuts import render, get_object_or_404 > from django.core.paginator import Paginator, Empt

Re: working fine with sqllite but not showing result in mysql

2019-01-14 Thread tribhuvan kishor
yes all things are working fine like post list are working fine from django.shortcuts import render, get_object_or_404 from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.views.generic import ListView from .models import Post def post_list(request): object_lis

Re: working fine with sqllite but not showing result in mysql

2019-01-14 Thread Alex Kimeu
Have you configured MySQL correctly? On Mon, Jan 14, 2019 at 9:07 PM tribhuvan kishor < tribhuvankishor...@gmail.com> wrote: > this view is retrieving data with SQlite but not fetching data in > MySQL saying no data found. > > > def post_detail(request, year, month, day, post): > post = get_o

Django UserForm Help Texts

2019-01-14 Thread kimeualexis
Hello, guys. Anyone with an idea how to hide help texts in Django User Registration Form? Regards. [image: Screenshot from 2019-01-14 21-48-53.png] -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiv

working fine with sqllite but not showing result in mysql

2019-01-14 Thread tribhuvan kishor
this view is retrieving data with SQlite but not fetching data in MySQL saying no data found. def post_detail(request, year, month, day, post): post = get_object_or_404(Post, slug=post, status='published', publish__year=year,

Re: template not exist error snap in attechment

2019-01-14 Thread tribhuvan kishor
thanks shiva . thanks alot i think a lack of concentration On Sat, Jan 12, 2019 at 1:32 PM shiva kumar wrote: > It's not detail it's details.html > > On Sat 12 Jan, 2019 12:42 pm tribhuvan kishor < > tribhuvankishor...@gmail.com wrote: > >> even list.html is in the same place and its accessible

Re: migrate failed due to Permission

2019-01-14 Thread Michal Petrucha
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On Sun, Jan 13, 2019 at 11:49:44PM -0800, ANi wrote: > Hello. > > I want to migrate all tables into new database but bumped into an error > that it said "auth_permission" is not found. > Then I searched for the possible causes, it turned out that i

Re: Set default value in field dependant on another model?

2019-01-14 Thread Michal Petrucha
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On Mon, Jan 14, 2019 at 04:05:27PM +1100, Lachlan Musicman wrote: > We have two models: Resources and Quota > > Resources model instances include: > - red things > - yellow things > - blue things > > Quota have two fields, one is a FK to a Resource

Re: Can a class which inherits from factory.DjangoModelFactory use Django TestCase asserts?

2019-01-14 Thread Michal Petrucha
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On Sat, Jan 12, 2019 at 03:59:59PM +0200, אורי wrote: > Hi, > > I have a problem with tests. We defined a class called DefaultUserFactory > which inherits from factory.DjangoModelFactory, and I want to use asserts > in this class such as assertEqual

Re: integrating themes in django

2019-01-14 Thread Jani Tiainen
Hi, Django is web development framework, in other words it's more a low level library that you use when programming web sites rather than CMS like wordpress is and thus there isn't really concept of themes in Django. What Django can do is to render for example HTML and link it to CSS for styling

Re: part time or full time job opportunity for Django developers

2019-01-14 Thread Sankalp Saxena
Freelancer profile for any technology attached On Mon, Jan 14, 2019 at 8:00 PM Muhammad Mahir wrote: > Hi there Atul, > > Is it fine for you if the candidate will work remotely? > > On Mon, Jan 14, 2019 at 12:30 PM Atul Anand > wrote: > >> Hi All, >> >> I am in search for Django developer for a

how handle high incoming data and sending throttled data to web sockets in django-channels

2019-01-14 Thread Sahil Mangotra
I am facing a problem in my django web server. We are using python3, django2, django-rest-framework3.8 and channels2.x Scenario is we are receiving DATA from a UDP connection at very fast rate (~100 messages per second). The data revived is in proto format (you can say we are receiving byte d

Re: integrating themes in django

2019-01-14 Thread Out Reach
Hi I'm Looking for a theme like that https://www.couponsmith.com in Django framework please tell me where can I find these types of themes. On Thursday, May 10, 2018 at 9:10:58 AM UTC+5, Hitesh Goyal wrote: > > Hi team, I am new to Django. > How can i integrate ready-made website themes in a djan

Re: part time or full time job opportunity for Django developers

2019-01-14 Thread Muhammad Mahir
Hi there Atul, Is it fine for you if the candidate will work remotely? On Mon, Jan 14, 2019 at 12:30 PM Atul Anand wrote: > Hi All, > > I am in search for Django developer for a project. > > Interested candidate may share his/her resume with you at > atul.anand.n...@gmail.com > > > Regards, > A

Where do you place your application code in production

2019-01-14 Thread vineeth sagar
Hi, This is not concerned with django itself, but I would love to get the general consensus here, In my college days while deploying a php application all the tutorials pointed to place my code in /var/www or something of that sort. For my django applications I tend to put it in /home//services/.

Re: order_by function gets error if the field name or json key, has a dash.

2019-01-14 Thread Bill Freeman
At least on 2.7, python has no trouble with this: d={'x-y': 4} >>> import json >>> json.dumps(d) '{"x-y": 4}' >>> So that leave's Django's parsing of the order_by string, or just possibly the database connector. It probably won't work, but you could try: MyTable.objects.all().order_by("'myfiel

Re: how to connect mysqlclient on my pc

2019-01-14 Thread ANi
https://medium.com/@bencleary/django-mysql-for-windows-528272b3169b As easy as this goes. DIPU SARKER於 2019年1月13日星期日 UTC+8上午11時03分06秒寫道: > > hello i use windows10.How i use mysql in my django project and how to > install mysqlclient in my pc. > -- You received this message because you are sub

Re: DJANGO-POLLS

2019-01-14 Thread Kuber Sodari
I am glad to be helpful. Your welcome! On Monday, 14 January 2019 15:48:00 UTC+5:45, Tarık Kantar wrote: > > THANK YOU VERY MUCH İT WORKS! :) > > Kuber Sodari >, 14 Oca 2019 Pzt, 10:59 > tarihinde şunu yazdı: > >> I see the problem is with >> >> >> *class Choice(models.Model) question = mode

Re: DJANGO-POLLS

2019-01-14 Thread Tarık Kantar
THANK YOU VERY MUCH İT WORKS! :) Kuber Sodari , 14 Oca 2019 Pzt, 10:59 tarihinde şunu yazdı: > I see the problem is with > > > *class Choice(models.Model) question = models.ForeignKey(Question) * > Update it as this > > *class Choice(models.Model) question = > models.ForeignKey(Question,

Re: DJANGO-POLLS

2019-01-14 Thread Kuber Sodari
I see the problem is with *class Choice(models.Model) question = models.ForeignKey(Question) * Update it as this *class Choice(models.Model) question = models.ForeignKey(Question, on_delete=models.CASCADE) * *CASCADE: *What this does it, when you delete the related object of Question

Re: DJANGO-POLLS

2019-01-14 Thread Kuber Sodari
I see the problem is with *class Choice(models.Model) question = models.ForeignKey(Question) * Update it as this *class Choice(models.Model) question = models.ForeignKey(Question, on_delete=models.CASCADE) * On Monday, 14 January 2019 15:38:09 UTC+5:45, tarikk...@gmail.com wrote: > >

Re: DJANGO-POLLS

2019-01-14 Thread tarikkantar25
This my screenshut of models.py 14 Ocak 2019 Pazartesi 10:43:32 UTC+1 tarihinde tarikk...@gmail.com yazdı: > > Hi everyone! > Could you please help me why I cant see this part below when I run this > command, python manage.py makemigrations polls,? > > <<< > 0001_initial.py: > - Create mode

Re: DJANGO-POLLS

2019-01-14 Thread Kuber Sodari
Can you screenshot and paste the Model Class for that? The one with Foreign Key on Polls. It should have on_delete=models.SET_NULL or on_delete =models.CASCADE On Monday, 14 January 2019 15:28:32 UTC+5:45, tarikk...@gmail.com wrote: > > Hi everyone! > Could you please help me why I cant see this

Re: DJANGO-POLLS

2019-01-14 Thread Tarık Kantar
No, how should I do? On 14 Jan 2019 Mon at 10:47 Kuber Sodari wrote: > Did you import the Model changes on init file of Model?? > > On Monday, 14 January 2019 15:28:32 UTC+5:45, tarikk...@gmail.com wrote: >> >> Hi everyone! >> Could you please help me why I cant see this part below when I run th

Re: DJANGO-POLLS

2019-01-14 Thread Kuber Sodari
Did you import the Model changes on init file of Model?? On Monday, 14 January 2019 15:28:32 UTC+5:45, tarikk...@gmail.com wrote: > > Hi everyone! > Could you please help me why I cant see this part below when I run this > command, python manage.py makemigrations polls,? > > <<< > 0001_initial.

DJANGO-POLLS

2019-01-14 Thread tarikkantar25
Hi everyone! Could you please help me why I cant see this part below when I run this command, python manage.py makemigrations polls,? <<< I saw just that screen shut. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe fro

part time or full time job opportunity for Django developers

2019-01-14 Thread Atul Anand
Hi All, I am in search for Django developer for a project. Interested candidate may share his/her resume with you at atul.anand.n...@gmail.com Regards, Atul -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and s