Re: Why I can't pass anything to my html? Django 2.1

2018-11-13 Thread Rookies DJ
Hi Omar Abou Mrad thanks for helping me, Please read the ones in red: What are you seeing? My Web page as I want but, i'm missing the key value form my database What errors do you get? no errors everything working fine in summary i'm not having any errors but i can't see anything form my

Re: Foreign key data saving issue

2018-11-13 Thread amit pant
could you share your progress then we can find what exactly you want. On Tue, Nov 13, 2018 at 6:14 PM mohit basantani < mohitbasantani1...@gmail.com> wrote: > Hello I am new to django i have two tables namely Mastertable and Partlist > > Partlist columns: > > 1. id > 2. partlist_name > > I am

Re: using a foreign key with multiple choices

2018-11-13 Thread Jani Tiainen
Well categoriederecette is a foereign key to your Categorie model. Your models don't make any real sense. If your categories are fixed you can remove foreign key and add charfield and definitions directly to Recette model. If you expect that categories are added, changed, created or deleted

Re: using a foreign key with multiple choices

2018-11-13 Thread amit pant
use dict in * LISTE_CHOIX.* On Tue, Nov 13, 2018 at 6:14 PM 'Christian' via Django users < django-users@googlegroups.com> wrote: > Hello > > I need to use a model form to create a new instance of Recette, using > multiple choices list instead of the foreign_key > > *class

Deploy Django with Apache on Windows

2018-11-13 Thread ANi
Hi, I come across a problem when I want to deploy Django using Apache on Windows. I separated some configurations into production.py and local.py, like database configurations. And each files will read the actual setting data from a another file config.json. I try to set the environment

Re: Channels group_send hangs in extrenal process

2018-11-13 Thread Yaro Kifor
I've ensured my consumer is setup properly, added a type field to the message and added a callback method for that type. My callback method isn't getting called. I've tested my callback method from a different source and it worked there. In my tested I noticed that redis MONITOR logs this: >

Re: Why does my Django project open the same home page irrespective or which url I type?

2018-11-13 Thread Alex Callaway
Thanks! On Monday, November 12, 2018 at 7:06:37 PM UTC-8, Jason wrote: > > you have an ending slash on your login urls, and no ending slash in your > links defined. try adding a trailing slash > -- You received this message because you are subscribed to the Google Groups "Django users"

Re: Channels + django-tenants

2018-11-13 Thread lorinkoz
I know this is not general, but maybe `get_user` could accept an optional function as second parameter, so that the function could wrap the inner content of the current `get_user`. django-tenants provides a regular middleware, but I think the async breaks any attempt to handle this through a

Re: Channels group_send hangs in extrenal process

2018-11-13 Thread Yaro Kifor
Huh that's weird. I've removed the async-to-sync stuff and now the script doesn't hang. I've checked redis MONITOR and I do see traffic now which nice, but for some reason my consumer isn't seeing any of it. Maybe I messed up the group_add method. Here's the redis MONITOR output.

Re: Channels + django-tenants

2018-11-13 Thread Andrew Godwin
What sort of hook would you be imagining? The DB connection stuff is deep inside Django itself, rather than in Channels, so I'm not sure what sensible top-level thing we could provide that would make sense. Andrew On Tue, Nov 13, 2018 at 2:16 PM wrote: > Django-tenants is a package to provide

Re: Channels group_send hangs in extrenal process

2018-11-13 Thread Andrew Godwin
I've never tried using the async-to-sync stuff with multiprocessing - first, I'd try removing that and see if it still works (just run from a management command or script directly). If it still fails, I'd suggest running a redis MONITOR to see if any traffic makes it to Redis at all. Andrew On

Channels + django-tenants

2018-11-13 Thread lorinkoz
Django-tenants is a package to provide multi-tenancy in Django through Postgres schemas (https://github.com/tomturner/django-tenants/) Django-tenants relies on setting the schema on the connection in order to make queries to the right Postgres schema. When you want to secure your consumers

Channels group_send hangs in extrenal process

2018-11-13 Thread Yaro Kifor
Hello, I am a little new to channels, but I can't seem to figure out this issue. I am trying to use group_send from an external process and I am using Redis as my channel backend. Here is what my process code looks like: from channels.layers import get_channel_layer from multiprocessing

Re: Django Admin Redesign

2018-11-13 Thread Zakriya Bilal
Thanks for the much-needed help! (: On Tuesday, November 13, 2018 at 9:15:39 AM UTC+5, Phako Perez wrote: > > If I remember correctly you can define your own templates under the > template directory > > Regards > > Sent from my iPhone > > On Nov 12, 2018, at 4:49 PM, Zakriya Bilal > wrote: > >

Re: Django Admin Redesign

2018-11-13 Thread Zakriya Bilal
Thanks for the much-needed help! (: On Tuesday, November 13, 2018 at 5:45:06 PM UTC+5, brian hopkins wrote: > > You can override them check out this page in the docs > > https://docs.djangoproject.com/en/2.1/ref/contrib/admin/ >

Re: Channels: Test case fails on async.sleep(X>0)

2018-11-13 Thread Andrew Godwin
Couple of points: - Did you install pytest-django? That should help the settings thing. - There's a default 1-second timeout on get_response; pass timeout=4 to it and you should see that error go away. We have a default timeout because otherwise we can't tell if an async app has died/crashed and

Re: Embedding pdfs in Django

2018-11-13 Thread gibsonal2026
great On Sunday, November 11, 2018 at 12:09:48 PM UTC-6, Vikas Sri wrote: > > I am preparing learning tutorial application in Django, which will contain > PDF's that I need to display in my templates. I tried , > etc but nothing worked. Do I need to install something to make it work? > --

Re: Embedding pdfs in Django

2018-11-13 Thread gibsonal2026
that is nice On Sunday, November 11, 2018 at 12:09:48 PM UTC-6, Vikas Sri wrote: > > I am preparing learning tutorial application in Django, which will contain > PDF's that I need to display in my templates. I tried , > etc but nothing worked. Do I need to install something to make it work? >

Re: Django Admin Redesign

2018-11-13 Thread Ezequiel Bertti
https://github.com/darklow/django-suit On Tue, Nov 13, 2018 at 10:44 AM ANi wrote: > Yes, you can redesign how it looks like, but I am not sure about how much > you can do. > You can check out the project Django JET. > > > -- > You received this message because you are subscribed to the Google

Re: Embedding pdfs in Django

2018-11-13 Thread Siim Märtmaa
> On Sunday, November 11, 2018 at 1:09:48 PM UTC-5, Vikas Sri wrote: >> >> I am preparing learning tutorial application in Django, which will contain >> PDF's that I need to display in my templates. I tried , etc >> but nothing worked. Do I need to install something to make it work? Here is

Re: Embedding pdfs in Django

2018-11-13 Thread C. Kirby
I'm pretty sure that you can't render pdf to the browser. You can either provide links for the users to download and view the pdfs, or extract the content from the pdfs and put that in your templates. You may be able to get what you want with javascript. I can't vouch for this, but I found it

Re: PDF extarcting

2018-11-13 Thread swathi2801 Yadhav
OK sure If u have code please send me On Tue, 13 Nov 2018, 7:05 p.m. Joel use pip3. > It would be nice if you could keep the non django discussion out of this > group. > > On Tue, 13 Nov, 2018, 6:47 PM swathi2801 Yadhav < > swathi2801yad...@gmail.com wrote: > >> pdf text tool not installing in

How to do arthimetic operations on database values in django

2018-11-13 Thread Mohan Goud
I have Prof:AssociateProf:AssistantProf = x:y:z in database and I have to do these operations x/(x+y+z) : y/(x+y+z) : z/(x+y+z) in django. Can anyone help me on this and models.py is class Show(models.Model) :Total = models.IntegerField(default = 0)Prof = models.IntegerField(default =

Re: PDF extarcting

2018-11-13 Thread Joel
use pip3. It would be nice if you could keep the non django discussion out of this group. On Tue, 13 Nov, 2018, 6:47 PM swathi2801 Yadhav pdf text tool not installing in this version what to do next? > > > On Tue, Nov 13, 2018 at 6:41 PM swathi2801 Yadhav < > swathi2801yad...@gmail.com> wrote: >

Re: PDF extarcting

2018-11-13 Thread swathi2801 Yadhav
pdf text tool not installing in this version what to do next? On Tue, Nov 13, 2018 at 6:41 PM swathi2801 Yadhav < swathi2801yad...@gmail.com> wrote: > please can ping me the code if u have done soo > > On Tue, Nov 13, 2018 at 6:30 PM m1chael wrote: > >> i recently achieved this by using

Re: PDF extarcting

2018-11-13 Thread swathi2801 Yadhav
please can ping me the code if u have done soo On Tue, Nov 13, 2018 at 6:30 PM m1chael wrote: > i recently achieved this by using pdf2text tool, and then using regular > expressions to parse out what I want. > > VERY DIFFICULT > > > > On Tue, Nov 13, 2018 at 6:45 AM swathi2801 Yadhav < >

Re: PDF extarcting

2018-11-13 Thread m1chael
i recently achieved this by using pdf2text tool, and then using regular expressions to parse out what I want. VERY DIFFICULT On Tue, Nov 13, 2018 at 6:45 AM swathi2801 Yadhav < swathi2801yad...@gmail.com> wrote: > by using resular we can only extract doc files but to for extracting the >

Re: Django Admin Redesign

2018-11-13 Thread ANi
Yes, you can redesign how it looks like, but I am not sure about how much you can do. You can check out the project Django JET. -- 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,

using a foreign key with multiple choices

2018-11-13 Thread 'Christian' via Django users
Hello I need to use a model form to create a new instance of Recette, using multiple choices list instead of the foreign_key /class Recette(models.Model):// //  ..// //    categoriederecette = models.ForeignKey(Categorie, on_delete=models.CASCADE) // / /class Categorie(models.Model)://

Foreign key data saving issue

2018-11-13 Thread mohit basantani
Hello I am new to django i have two tables namely Mastertable and Partlist Partlist columns: 1. id 2. partlist_name I am using the imort-export plugin to import the data in the mastertable where i have created a foreign key referred to partlist table, I want whenever i import any xls file

Re: I'm new in Django. please help me out

2018-11-13 Thread Joel
You're bound to be trolled if you post a question which clearly looks like an assignment, with zero effort on your part. Where's your code? What did you try? On Tue, 13 Nov, 2018, 3:38 PM Dheeraj Kumar if you guys do not help ,plz ignore it insist of trying to be over > smart.this is home work

Re: Django Admin Redesign

2018-11-13 Thread brian hopkins
You can override them check out this page in the docs https://docs.djangoproject.com/en/2.1/ref/contrib/admin/ Sent from my iPhone > On Nov 12, 2018, at 9:14 PM, Phako Perez <13.phak...@gmail.com> wrote: > > If I remember correctly you can define your own templates under the template >

Re: PDF extarcting

2018-11-13 Thread swathi2801 Yadhav
by using resular we can only extract doc files but to for extracting the data from pdf we need to import any package or not On Tue, Nov 13, 2018 at 10:33 AM Manjunath wrote: > I think regular expression would be a better option for your requirements. > If you provide some sample resume docs,

Re: I'm new in Django. please help me out

2018-11-13 Thread Dheeraj Kumar
if you guys do not help ,plz ignore it insist of trying to be over smart.this is home work or any thing else you are not authorized to comment like this. just stop it. On Tue, 13 Nov 2018 at 15:30, amit pant wrote: > sometimes > > On Tue, Nov 13, 2018 at 3:23 PM PASCUAL Eric wrote: > >>

Re: I'm new in Django. please help me out

2018-11-13 Thread amit pant
sometimes On Tue, Nov 13, 2018 at 3:23 PM PASCUAL Eric wrote: > > hey, you need to pay for that. > > > Seen quite frequently : some of the visitors of community groups such as > this one confuse them with "do_my_job_for_free.com" or "do_my_homework.com" >  > > > Eric >

Re: I'm new in Django. please help me out

2018-11-13 Thread PASCUAL Eric
> hey, you need to pay for that. Seen quite frequently : some of the visitors of community groups such as this one confuse them with "do_my_job_for_free.com" or "do_my_homework.com"  Eric From: django-users@googlegroups.com on behalf of amit pant Sent:

Re: I'm new in Django. please help me out

2018-11-13 Thread amit pant
hey, you need to pay for that. On Tue, Nov 13, 2018 at 2:55 PM wrote: > Hi All, > > can you please solve this. > > 1) Create a simple Category model using DRF with following fields : > Id,name,parent,is_featured,image,is_active,description > 2) Create CRUD APIs for the same. > 3) Validate input

I'm new in Django. please help me out

2018-11-13 Thread talkdkg
Hi All, can you please solve this. 1) Create a simple Category model using DRF with following fields : Id,name,parent,is_featured,image,is_active,description 2) Create CRUD APIs for the same. 3) Validate input at every event/API. 4) Implement ordering and filtering. 5) GET API should take params

Re: makemigrations makes migration even if no changes in model

2018-11-13 Thread Michał Redmerski
Thanks for Your response, The project is a part of our internal erp system. I'll try to make it executable on external enviornment and then provide a code. I have updated the gist to provide generated migrations. Regards, W dniu sob, 10.11.2018 o godzinie 15∶34 -0800, użytkownik Tim Graham

Re: Why I can't pass anything to my html? Django 2.1

2018-11-13 Thread Omar Abou Mrad
We would require more information; What errors do you get? What are you seeing? Either way, this is not correct: tank = tank_system.object.get(id(5)) It should be: tank = tank_system.object.get(id=5) I suggest going through the django tutorial if you haven't already. On Tue, Nov 13, 2018 at

Re: Why I can't pass anything to my html? Django 2.1

2018-11-13 Thread Rookies DJ
On Monday, 12 November 2018 21:26:48 UTC+8, Cuneyt Mertayak wrote: > > The content for the `render` method is supposed to be a dictionary: > https://docs.djangoproject.com/en/2.1/topics/http/shortcuts/#optional-arguments > > So change it to this render(requset, "FrounterWeb/body.html",{'tank':