Re: Use an external REST API in django admin

2018-07-16 Thread mathieu mickael
ok thank you very much 2018-07-17 4:15 GMT+02:00 mottaz hejaze : > even REST API needs a database managments system like postgre or mysql > > so the lowest layer is postgre or mysql or mongodb > > the upper layer on top of any one of them , your backend REST API > > read about DMS and REST API >

Re: I can't see my models in MySQL db

2018-07-16 Thread A. Azimzadeh
Greetings! Dears, please help me. Thanks a lot On Sun, Jul 15, 2018, 21:09 A. Azimzadeh wrote: > Any help !? > > > On Sat, Jul 14, 2018, 15:23 ali reza wrote: > >> Hi all, >> >> I attached my Django project as a ZIP file. >> please help me to find and fix the root cause of issue. >> Link: >>

Re: Use an external REST API in django admin

2018-07-16 Thread mottaz hejaze
even REST API needs a database managments system like postgre or mysql so the lowest layer is postgre or mysql or mongodb the upper layer on top of any one of them , your backend REST API read about DMS and REST API On Mon, 16 Jul 2018, 20:44 Vijay Khemlani, wrote: > django rest framework

Model formset not saving

2018-07-16 Thread cbparker
I'm using Django 2.0.3 on Ubuntu 16.04. Any idea what would cause a model formset to return None when calling save()? Here is the relevant code: RepairFormSet = modelformset_factory(Repair, form=RepairForm, exclude=[]) form = RepairFormSet(request.POST) if form.is_valid(): form.save() retur

RE: trying to learn custom validators

2018-07-16 Thread Matthew Pava
What I would do in that situation is add a custom field to the model form that holds the item number. Then, in the save method, convert that to the Item object. class AddItem(forms.ModelForm): item_number = IntegerField() class Meta: model = ItemsTestCollection fields

trying to learn custom validators

2018-07-16 Thread clavierplayer
I have a legacy database that we want to replace, and Django is still new to us. There are some 40,000 items in the old db, and each item has an item_number that is not necessarily the primary key; that way, the users can maintain their own sku number system and we can maintain data integrity w

Re: help with get_form_kwargs

2018-07-16 Thread clavierplayer
Ah, thank you for the link; it put me on the right track, I think, with custom validators. As an example of why I need to customize the item fetching: I have an item that has an item_number of '515874'. That number is how the users interact with the item. However, the primary key for Item '515

Re: Use an external REST API in django admin

2018-07-16 Thread Vijay Khemlani
django rest framework would be your best bet http://www.django-rest-framework.org/ On Mon, Jul 16, 2018 at 10:16 AM micka wrote: > Hello, > > I wish I could use the data from an external API in the administration of > Django. I wish I could list, read, edit and create objects but instead of > u

Re: Django Channels: long running async function and where to save ORM object

2018-07-16 Thread Sebastian Haase
Thanks for the reply. Should I still use async code inside that worker process ? While developing I simply do arun_serveron the command line -- then I would always have to do arun_worker in addition -- right ? -Sebastian On Mon, Jul 16, 2018 at 7:05 PM, Andrew Godwin wrote: >

Re: multiple django websites

2018-07-16 Thread mottaz hejaze
thanks ryan and andreas . ill cjlheck that and see On Mon, 16 Jul 2018, 18:10 Andréas Kühne, wrote: > This is more of a webserver configuration thing than configuration of > django. > > You can have multiple django instances running on the same server - just > add the code in several directories

RE: help with get_form_kwargs

2018-07-16 Thread Matthew Pava
This StackOverflow question may help you: https://www.google.com/search?q=django+clean_fields+not+called&oq=django+clean_field+not+&aqs=chrome.1.69i57j0.7599j0j4&sourceid=chrome&ie=UTF-8 Basically this: For any field, if the Field.clean() method raises a ValidationError, any field-specific cleani

Google map tracking

2018-07-16 Thread Jeff_dev
Hello guys I'm trying to integrate a tracking system in my app with google maps. Any Useful suggestion would be appreciated -- 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

Re: Django Channels: long running async function and where to save ORM object

2018-07-16 Thread Andrew Godwin
You are correct in that you could store the model instance on "self" but this would result in caching issues, as that instance would not be updated after the initial socket connection. If you want to run "background routines", I would discourage you from doing these as random orphaned tasks launch

Re: help with get_form_kwargs

2018-07-16 Thread clavierplayer
I would actually prefer to override clean(), but CreateView doesn't appear to have a clean() method that I can override. I did make a ModelForm to use with the CreateView, but the clean_item method I defined there never gets called--breakpoints and print statements are all skipped, so I don't ev

Re: multiple django websites

2018-07-16 Thread Andréas Kühne
This is more of a webserver configuration thing than configuration of django. You can have multiple django instances running on the same server - just add the code in several directories - also with the virtualenvironments for each. Then you need to configure your webserver to point to the correc

RE: help with get_form_kwargs

2018-07-16 Thread Matthew Pava
I would alter user input in the clean methods. https://docs.djangoproject.com/en/2.0/ref/forms/validation/ From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of clavierpla...@gmail.com Sent: Monday, July 16, 2018 10:28 AM To: Django users Subject: help with get_

help with get_form_kwargs

2018-07-16 Thread clavierplayer
I have a CreateView in which I need to alter the user input. I may have found a way to do so using get_form_kwargs, but I'm puzzled by a couple of things: I know that kwargs['data'] is a QueryDict, which is immutable. So I tried the doc's QueryDict.copy() recommendation: def get_form_kwargs(s

Live Streaming Video With WebCam

2018-07-16 Thread Pravin Yadav
Hello Guys, I'm developing the website using the *Python 3.6 and Django 2.0. *I want to integrated the *Live Streaming Video* through *WebCam*. If anyone know about this functionality kindly help me. *Thanks, in Advance.* Pravin Kumar -- You received this message because you are subscribed t

Re: problem with instaling django

2018-07-16 Thread Ashok Ramesh
sys.setdefaultencoding('latin-1') try this in settings instead of sys.setdefaultencoding('utf-8') On Mon, Jul 16, 2018 at 7:47 PM Shay Hershko wrote: > i tried to install django and for some reson it dosent work i have > followed the instructions on the website and on thie video ( > https://www

Re: problem with instaling django

2018-07-16 Thread mr 2mato
Use this commands to solve ur problem: “Python manage.py makemigrations” Then “Python manage.py migrate” When you add new file such as static files & adding new app You have to use this 2 commands. > On Jul 16, 2018, at 6:47 PM, Shay Hershko wrote: > > i tried to install django and for some r

Re: problem with installing django

2018-07-16 Thread Shay Hershko
i tried looking in the files and for some reson it says i dont have django -- You received this message because you are subscribed to the Google Groups "Django users" g

problem with instaling django

2018-07-16 Thread Shay Hershko
i tried to install django and for some reson it dosent work i have followed the instructions on the website and on thie video (https://www.youtube.com/watch?v=MEcWRk9w0t0) and this is what i get

Re: how-to-fix-the-field-error-issue-in-django

2018-07-16 Thread SACHIN CHAVAN
Try this Modify your urls.py file with path('/', TaskDetailView.as_view(), name='detail'), On Mon, Jul 16, 2018 at 5:47 PM, Jason wrote: > you need to provide some value in the URL to match to an instance. Detail > views say "I have this URL to a specific identifier, show the content of >

problem with installing django

2018-07-16 Thread Shay Hershko
i tried instaling djagno for a few times and for some reson its not working i followed instructions on the site and on this video (https://www.youtube.com/watch?v=MEcWRk9w0t0),and this is what i am geting at the end

Use an external REST API in django admin

2018-07-16 Thread micka
Hello, I wish I could use the data from an external API in the administration of Django. I wish I could list, read, edit and create objects but instead of using a postgres database, I would use a REST API. Do you know a module to do it or resources that could help me? Thank you ! -- You re

Re: App structure : "One file - One object" - Is there a better way ?

2018-07-16 Thread C. Kirby
While you are thinking about this I would urge you to also consider your future developing in python. If you are using the structure you describe in personal/pet projects then that may be alright. If you want to work somewhere that develops in python than the direction you are going is a non st

trouble with forms/CreateView

2018-07-16 Thread clavierplayer
I seem to be having trouble understanding some of how form validation works, resulting in two problems. I am trying to write a CreateView in which a user can type in an item number, and the program will use that instead of the item's primary key to perform the lookup. The docs appear to reco

Re: DEBUG_TOOLBAR

2018-07-16 Thread robert anthony perez araujo
listo solo coloque en el settings de mi proyecto la siguiente configuración. DEBUG_TOOLBAR_CONFIG = { 'JQUERY_URL': '', } El 16 de julio de 2018, 9:36, robert anthony perez araujo < io.perez.rob...@gmail.com> escribió: > Buenas amigos, alguien me puede ayudar con algo de DEBUG_TOOLBAR necesito

DEBUG_TOOLBAR

2018-07-16 Thread robert anthony perez araujo
Buenas amigos, alguien me puede ayudar con algo de DEBUG_TOOLBAR necesito que no utilice el Jquery que trae por defecto... Espero me puedan ayudar con eso, he leido sobre una configuracion pero donde debo hacerla? -- You received this message because you are subscribed to the Google Groups "Dja

Re: Admin CSS Not Working in Opera or UC Browser

2018-07-16 Thread Jason
sorry, that's not the case. take a look in web dev history about ie6 and all the special things that had to be done to make sites work because microsoft decided to go their own way with standards. -- You received this message because you are subscribed to the Google Groups "Django users" gr

Re: multiple django websites

2018-07-16 Thread mottaz hejaze
ryan do you have a guide for this .. i found one but its outdated i think On Mon, 16 Jul 2018, 14:53 Ryan Nowakowski, wrote: > Yes > > On July 16, 2018 6:50:37 AM CDT, mottaz hejaze > wrote: >> >> >> hello friends , >> >> is it possible to host multiple django websites on a single VPS ?? >> >>

Re: Connection refused by Unix socket file

2018-07-16 Thread Ryan Nowakowski
I think you've got 2 different uwsgi commands below. One uses the ini file with the Unix socket and the other listens on port 8123. It looks like your nginx config is looking for the Unix socket so make sure you run uwsgi with the ini option so it'll listen on the Unix socket. On July 16, 2018

Re: multiple django websites

2018-07-16 Thread Ryan Nowakowski
Yes On July 16, 2018 6:50:37 AM CDT, mottaz hejaze wrote: >hello friends , > >is it possible to host multiple django websites on a single VPS ?? > >i mean real production websites all go live in the same time from the >same >VPS like digitalocean VPS > >thx all > >-- >You received this message b

Re: Admin CSS Not Working in Opera or UC Browser

2018-07-16 Thread mottaz hejaze
if it worked with Explorer , it should work with all browsers !! On Mon, 16 Jul 2018, 14:15 Jason, wrote: > If this works in standard browsers like chrome, firefox, or IE/Edge, then > my guess is Opera and UC are doing non-standard things which break > rendering and/or requests. So I'd suggest

Re: Tutorial part 3 help: bulleted-list

2018-07-16 Thread premalatha balan
Thank you so much. I have corrected the return including the context dict now. Thank you. It has solved it. Thank you again. On Monday, 16 July 2018 13:13:08 UTC+1, Jason wrote: > > two problems: you're just returning a string in your response, not the > template. > Nor are you using the contex

Re: how-to-fix-the-field-error-issue-in-django

2018-07-16 Thread Jason
you need to provide some value in the URL to match to an instance. Detail views say "I have this URL to a specific identifier, show the content of it" You're passing in everything *but* that identifier, so django doesn't know how to handle it and throws an error. -- You received this message

Re: Admin CSS Not Working in Opera or UC Browser

2018-07-16 Thread Jason
If this works in standard browsers like chrome, firefox, or IE/Edge, then my guess is Opera and UC are doing non-standard things which break rendering and/or requests. So I'd suggest you look for those specific browser issues since this doesn't seem like a Django issue at all. On Sunday, July

Re: Tutorial part 3 help: bulleted-list

2018-07-16 Thread Jason
two problems: you're just returning a string in your response, not the template. Nor are you using the context dict anywhere. Look at the example in the tutorial: https://docs.djangoproject.com/en/2.0/intro/tutorial03/#a-shortcut-render How does your index method differ from what's there? --

Re: Tutorial part 3 help: bulleted-list

2018-07-16 Thread premalatha balan
Hi, I am having the same problem that it does not display bulleted list, but I do not have a typo. Below is what I have got. *mysite>>polls>>view.py* from django.http import HttpResponse from django.template import loader from .models import Question def index(request): latest_question_list

Re: Static images are working but static CSS is not working SS attached

2018-07-16 Thread Param Saini
On Friday, 13 July 2018 20:37:48 UTC+5:30, Param Saini wrote: > > Static Images are working perfectly in Django .. but when i try to use > static CSS or evev open Django admin panel . CSS is not implemented there > > please help on priority > -- You received this message because you are subsc

multiple django websites

2018-07-16 Thread mottaz hejaze
hello friends , is it possible to host multiple django websites on a single VPS ?? i mean real production websites all go live in the same time from the same VPS like digitalocean VPS thx all -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: how-to-fix-the-field-error-issue-in-django

2018-07-16 Thread mottaz hejaze
i dont use class based views , but in function based views , my url would be like this urls.py path(' ', views.list , name='list'), path('', views.detail , name='detail') views.py def list(request): ... def detail(request, id) ... On Mon, 16 Jul 2018, 13:37 gomathi subramanian,

how-to-fix-the-field-error-issue-in-django

2018-07-16 Thread gomathi subramanian
Hi Django people, Kindly help me to resolve this issue. https://stackoverflow.com/questions/51336451/how-to-fix-the-field-error-issue-in-django Thanks, Gomathi Subramanian -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from th

Re: Django "pub_date" error

2018-07-16 Thread mottaz hejaze
i dont know .. did you import the Question Class from models.py ?? On Mon, 16 Jul 2018, 05:25 Dylan Reinhold, wrote: > Without your code no one can help you (they will just be guessing). Post > your models.py and the exact traceback error. > > > On Sun, Jul 15, 2018 at 7:52 PM, Daniel Tobi Onipe

multiple django websites

2018-07-16 Thread mottaz hejaze
hello friends , is it possible to host multiple django websites on a single VPS ?? i mean real production websites all go live in the same time from the same VPS like digitalocean VPS thx all -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Accessing Django through ssh tunneling and error to get status

2018-07-16 Thread Melvyn Sopacua
On maandag 16 juli 2018 08:56:06 CEST Dikus Extrange wrote: > Not Found: /http:/127.0.0.1:8000/status > Etc,etc... > > > I wonder why the protocol has only a slash (http:/ rather http://). Could it > be a wrong message? This looks like a wrongly configured status monitor of some sorts, like for