Re: Getting response code 302 instead of 200 while testing a url

2017-07-27 Thread James Schneider
The problem here is that my test cased passed for the first 2 functions i.e. "test_post_list" and "test_post_create" but now working for other two test functions i.e "test_post_update" and "test_post_delete". What might be the problem ? The setup function that i made is supposed to create a

Re: Page Not Found

2017-07-27 Thread Samuel Brunel
Hi, Use http://localhost:8000/polls/ to view your page. First urls.py is project file : mysite/mysite/urls.py > urlpatterns = [ > url(r'^polls/', include('polls.urls')), > url(r'^admin/', admin.site.urls), > ] Django remove "http://localhost:8000/

Dos Modelos en un formulario django

2017-07-27 Thread Nelson Fernando Garcia Gomez
hola Buenas soy algo nuevo en django y me anima aprender cada vez mas,l bueno mi inquietud es la siguiente como puedo enlazar dos modelos a un formulario tengo como modelos usuarios y características y donde el modelo características tiene una relacion models.OneToOneField con usuarios,

Django Admin Inline Duplicate Queries , Slows view

2017-07-27 Thread Ravi Sethia
Hi, While displaying an object with human readable name in django admin view Debug_toolbar tells me that sql queries are being duplicated upto 100 times whenever a foreign key is part of the model and rendered in human readable format Eg this code renders admin panel slow if there are lot of

Page Not Found

2017-07-27 Thread Carrie Gardner
When I go to localhost:8000/ I get a 404 error. I've been following the intro tutorial, https://docs.djangoproject.com/en/1.11/intro/tutorial01/ and my django version is 1.11.3 mysite/polls/urls.py from . import views urlpatterns = [ url(r'^$', views.index, name='index'), ]

Re: DateField does not update the date provided by hand

2017-07-27 Thread Mike Dewhirst
On 27/07/2017 9:14 PM, pablochud wrote: Yeah, but I would like datepicker too. if I changed it to CharField I would loose datepicker True. Looks like you might have to dig into the javascript source for the widget and make your own datepicker which takes random user input and figures out

Getting response code 302 instead of 200 while testing a url

2017-07-27 Thread Mannu Gupta
I have a django named blog and trying to test the url. The code for testing is :- class PostTests(TestCase): def setUp(self): self.user = get_user_model().objects.create(username='some_user') self.title = "test-title" Post.objects.create(

Testing UpdateView in Django using Unittest

2017-07-27 Thread Mannu Gupta
I am writing a test case for my Django application named "blog". I am getting the following errors :- 1. I am testing my view function i.e PostUpdateview the code is class PostUpdateView(LoginRequiredMixin, UserOwnerMixin, UpdateView): model = Post form_class = PostModelForm

Re: forms.Form.to_div ? and how override forms.Boundfield.label_tag?

2017-07-27 Thread Dan Tagg
crispy forms is a good addition for form creation http://django-crispy-forms.readthedocs.io/en/latest/. It gives you a lot of control over layout and templating. Dan On 26 July 2017 at 13:02, threesixright wrote: > Hi All, > > Just started a few weeks ago with (v1.11)

Re: Django Group Models

2017-07-27 Thread Christian Ledermann
very roughly: User (player) table Game table table that has foreign keys to player and match and a number field that has a validator it is in [1,..,4] unique together constraint in that table for player, match, number that way you only have to change the validator when you have a match with

Re: Warning while upgrading Django to 1.11.3

2017-07-27 Thread Uri Even-Chen
Thank you Andréas, this is a bug! I didn't notice it. I'll remove it. Uri. *Uri Even-Chen* [image: photo] Phone: +972-54-3995700 Email: u...@speedy.net Website: http://www.speedysoftware.com/uri/en/

Re: Warning while upgrading Django to 1.11.3

2017-07-27 Thread Andréas Kühne
Hi, In your match urls file, you include urlpatterns twice. urlpatterns += [ url(r'^matches/', include('speedy.match.matches.urls', namespace='matches')), url(r'^', include('speedy.match.accounts.urls', namespace='accounts')), url(r'^admin/', admin.site.urls), url(r'^i18n/',

Warning while upgrading Django to 1.11.3

2017-07-27 Thread Uri Even-Chen
Hi friends, I upgraded Django from 1.10.7 to 1.11.3 and I got these warnings while running tests: speedy\match>manage.py test Creating test database for alias 'default'... System check identified some issues: WARNINGS: ?: (urls.W005) URL namespace 'about' isn't unique. You may not be able to

Re: DateField does not update the date provided by hand

2017-07-27 Thread pablochud
Yeah, but I would like datepicker too. if I changed it to CharField I would loose datepicker > > -- 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

Re: DateField does not update the date provided by hand

2017-07-27 Thread Mike Dewhirst
On 27/07/2017 6:41 PM, pablochud wrote: Hi, is it normal that DateField make me to pick a date from datepicker and do not let me update the field by hand? - when trying to set a date by hand it automatically changing to date selected on datepicker. How can I let User to choose date both way?

DateField does not update the date provided by hand

2017-07-27 Thread pablochud
Hi, is it normal that DateField make me to pick a date from datepicker and do not let me update the field by hand? - when trying to set a date by hand it automatically changing to date selected on datepicker. How can I let User to choose date both way? :) -- You received this message because