RE: How do you populate an update form in a Bootstrap Modal?

2017-03-03 Thread Michael Chenetz
Matt... thanks for that. Do you have sample code you can share. That would be extremely helpful. Mike -- 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-u

Re: django angular

2017-03-03 Thread mohamed shawky
> hello andrea > you are right about json format i reeeally done and make it json api the problem is when angular make post function how i receve the data on database im working on django+angular+mongodb thank you in advance -- You received this message because you are subscribed to the G

RE: How do you populate an update form in a Bootstrap Modal?

2017-03-03 Thread Matthew Pava
I see. We are using Bootbox for our modals, but I’m sure the concept is the same. We have a separate template of the form that we include when we initialize the page. We have an event listener on the modal button, so that when it is clicked, it replaces the HTML inside the form with the HTML

Re: How do you populate an update form in a Bootstrap Modal?

2017-03-03 Thread Michael Chenetz
Thanks... I do use the instance variable. I think it has more to do with the modal itself. I see some sites that indicate and ajax call is needed. Not sure what to do there. On Friday, March 3, 2017 at 3:10:40 PM UTC-5, Michael Chenetz wrote: > > I am trying to figure out how to populate the upd

RE: How do you populate an update form in a Bootstrap Modal?

2017-03-03 Thread Matthew Pava
Hi Mike, Make sure you are setting the instance argument when you instantiate the form. Typically, you would pass in a pk to the view. def my_update_view(request, pk): obj = get_object_or_404(MyModel, pk=pk) form = MyForm(request.POST or None, instance=obj) …. I hope this helps you. Best wishes,

How do you populate an update form in a Bootstrap Modal?

2017-03-03 Thread Michael Chenetz
I am trying to figure out how to populate the update model form in a Bootstrap Modal. I can add to a form no problem but update does not seem to pre-populate the form when it is viewed. I need to understand what i need to do in the view/template to get this done. Any help would be greatly appre

Re: Issue using django-admin

2017-03-03 Thread Kyle
I am running into the same situation as described above. How does symlinking solve my problem? That is, where do I symlink to, and how does that tell my computer where django-admin is? On Monday, September 19, 2016 at 6:09:29 AM UTC-5, Bharathi Raja wrote: > > As said in docs >

Re: Having trouble with Django tutorial

2017-03-03 Thread Vijay Khemlani
Starting from the project root (the directory that contains your manage.py file), that project's main url file should be in learning_python/urls.py also, there should be only two urls.py in your project directory, the one for the project and the other inside the polls app. On 3/3/17, Yves S. Gar

Re: Having trouble with Django tutorial

2017-03-03 Thread Yves S. Garret
Is this learning_python/urls.py or learning_python/learning_python/urls.py? On Friday, March 3, 2017 at 10:04:32 AM UTC-5, Vijay Khemlani wrote: > > You should import the polls urls as it appears in the tutorial > > url(r'^polls/', include('polls.urls')), > > On 3/3/17, Yves S. Garret > wrote:

Filtering using viewsets in django rest framework

2017-03-03 Thread Benjamin Smith
Please consider these three models: class Movie(models.Model): name = models.CharField(max_length=254, unique=True) language = models.CharField(max_length=14) synopsis = models.TextField() class TimeTable(models.Model): date = models.DateField() class Show(models.Model): day

Re: Having trouble with Django tutorial

2017-03-03 Thread Yves S. Garret
This is what I have: from django.conf.urls import include, url from django.contrib import admin urlpatterns = [ url(r'^polls/', include('polls.urls')), url(r'^admin/', admin.site.urls), ] I'm still encountering the same problem. On Friday, March 3, 2017 at 10:04:32 AM UTC-5, Vijay Khemlani

Re: Having trouble with Django tutorial

2017-03-03 Thread Vijay Khemlani
You should import the polls urls as it appears in the tutorial url(r'^polls/', include('polls.urls')), On 3/3/17, Yves S. Garret wrote: > Like this: > > from django.conf.urls import include, url > from django.contrib import admin > > urlpatterns = [ > url(r'^polls/', urls), > url(r'^admin/',

Re: Having trouble with Django tutorial

2017-03-03 Thread Yves S. Garret
Like this: from django.conf.urls import include, url from django.contrib import admin urlpatterns = [ url(r'^polls/', urls), url(r'^admin/', admin.site.urls), ] Is there a way to print out strings to indicate where the problem is? On Friday, March 3, 2017 at 8:35:47 AM UTC-5, Vijay Khemlani

Re: Having trouble with Django tutorial

2017-03-03 Thread Vijay Khemlani
How does your learning_python.urls look like? On 3/3/17, Yves S. Garret wrote: > Yes. > > On Thursday, March 2, 2017 at 11:09:58 AM UTC-5, Vijay Khemlani wrote: >> >> Did you do this step? >> >> The next step is to point the root URLconf at the polls.urls module. In >> mysite/urls.py, add an impo

Re: Having trouble with Django tutorial

2017-03-03 Thread Yves S. Garret
Yes. On Thursday, March 2, 2017 at 11:09:58 AM UTC-5, Vijay Khemlani wrote: > > Did you do this step? > > The next step is to point the root URLconf at the polls.urls module. In > mysite/urls.py, add an import for django.conf.urls.include and insert an > include() >

Re: USING graphs in django admin

2017-03-03 Thread Luvpreet Singh
Can we link this with a template and a view in django ? On Friday, March 3, 2017 at 4:17:08 PM UTC+5:30, Lachlan Musicman wrote: > > You could try > > ggplot http://ggplot.yhathq.com/ > > alternatively there's D3 > > https://d3js.org/ > > Cheers > L. > > -- > The most dangerous phrase in the

django-mongodb-engine support

2017-03-03 Thread Husain Pansoliwala
Hi, I am accessing multiple database through django and facing one issue. That issue is explained in detail at below link: http://stackoverflow.com/questions/42412218/while-using-django-restframework-multiple-database-serializer-is-valid-always/42508704#42508704 Can I use django-mongodb-engi

Re: USING graphs in django admin

2017-03-03 Thread Lachlan Musicman
You could try ggplot http://ggplot.yhathq.com/ alternatively there's D3 https://d3js.org/ Cheers L. -- The most dangerous phrase in the language is, "We've always done it this way." - Grace Hopper On 3 March 2017 at 21:22, Luvpreet Singh wrote: > I want to display graphs in django admi

Re: Advice: django deploy vps error 502

2017-03-03 Thread Antonis Christofides
Hi, No, the first message says it works with 6k requests, of which 350 are concurrent, and doesn't work with 10k requests, of which 350 are concurrent. I merely made some back-of-the-napkin calculation with some very crude assumptions that 350 concurrent requests means you have a total of 100k use

USING graphs in django admin

2017-03-03 Thread Luvpreet Singh
I want to display graphs in django admin. Is there any tool to display them in django admin site ? I have tried django-admin-tools-stat , but I don't want to create a different dashboard for the graphs. I want the queries on the models to be displayed with the help of those graphs. -- Y

Re: Advice: django deploy vps error 502

2017-03-03 Thread ludovic coues
First message clearly state that the site is running fine with 6,000 visitors but have issues with 10,000 and more. I'm most intrigued by the error message from MySQL on bad value for user agent. On 2 Mar 2017 9:18 p.m., "Antonis Christofides" < anto...@djangodeployment.com> wrote: > 350 concurr

Re: django angular

2017-03-03 Thread Andreas Kuhne
Hi Mohamed, I would start by looking at some of the tutorials for django rest framework - because you will need to have a format like json to communicate from angular to the database. Checkout : http://www.django-rest-framework.org/ I would also recommend looking at the tutorials on angular : htt

Re: How to keep track of online users?

2017-03-03 Thread Michal Petrucha
On Fri, Mar 03, 2017 at 01:19:18AM +0100, Melvyn Sopacua wrote: > On Thursday 02 March 2017 14:47:30 Branko Zivanovic wrote: > > I need to know online status for each user. How do I do that? > > from importlib import import_module > from django.conf import settings > from django.contrib.auth impor

Re: Django context translations with dynamic variables

2017-03-03 Thread Uri Even-Chen
Thank you Melvyn and Jani! Uri. *Uri Even-Chen* [image: photo] Phone: +972-54-3995700 Email: u...@speedy.net Website: http://www.speedysoftware.com/uri/en/