Re: Unit testing - self.assertEqual("Break it!", resp.content)

2014-07-06 Thread Mitesh Patel
Hi, You are trying to compare break it! with the complete HTML returned. Instead of assertEqual, use assertIn. self.assertIn("Break it!", resp.content) Regards, Mitesh On 7 Jul 2014 01:44, "Pepsodent Cola" wrote: > When I run this unit test to make it break so it

Re: Using django-ratings; need help

2014-07-06 Thread Sapa S
> > Were you able to get it to work? I want to use a rating app and > django-ratings seems to be the most actively used. And similar to you, I > don't know how to write the template. If you were able to get it working, > could you share your experience? Thanks. > -- You received this

Re: Django newbie issues

2014-07-06 Thread Mike Dewhirst
Janelle Your quickest solution is to reveal your location and ask for someone to help out on a short-term basis. There are heaps of Django people everywhere and many inhabit this list. What you are asking for is possibly quite easy but can defeat you if you are unfamiliar with the

Re: Tango with Django chapter 7 Exercises

2014-07-06 Thread Dean
When changing the model, it can help to drop the relevant tables in the db and sync. It kinda flushes things out. That's what I'm finding anyway :-/ I'm only a chapter 5 guru atm, so apologies for my probably unhelpful comments. Maybe you need to restart your server too - have you tried

Re: Old Django database on Ubuntu

2014-07-06 Thread Lachlan Musicman
Most likely the info will be stored in a DB behind Django - MySQL for instance. If you look in /setting.py you should see the relevant section "Databases" You can then access the data in the database using that user/password. If it's mysql, you can try phpmyadmin if you can't get the Django

Re: Lookup Fields

2014-07-06 Thread Dean
Spot on DR - thanks - for pointing me in the right direction :-) -- 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

Old Django database on Ubuntu

2014-07-06 Thread Janelle O'Dea
Hi all, At work we have an old Django app/database running on Ubuntu. The creator isn't still around. Can we still get this information somehow? In the little work I've done with Django, it seems the content would be password-protected. Even if I had his passwords, though, I don't know how to

Django newbie issues

2014-07-06 Thread Janelle O'Dea
Hi all, I have two separate Django questions. One: I am trying to learn how to use Django on my computer (Mac OS, Mavericks) and was first getting the error "unable to open database" when running "python manage.py syncdb." To fix it, I followed instructions from here:

Re: Problem to access admin url in server production

2014-07-06 Thread Lucas Simon Rodrigues Magalhaes
Nginx.conf and gunicorn.conf are int this link [1]. And I use Django - 1.6.5 https://gist.github.com/lucassimon/0b982d228490bbd263ce Em domingo, 6 de julho de 2014 21h39min28s UTC-3, Lucas Simon Rodrigues Magalhaes escreveu: > > > > Hi, > > I has a problem when I access the admin

Problem to access admin url in server production

2014-07-06 Thread Lucas Simon Rodrigues Magalhaes
Hi, I has a problem when I access the admin url the nginx redirect my domain to https://xxx.com.br/admin. I can't fix this error, I try everything. So, How to disable it ? Forbidden (403) CSRF verification failed. Request aborted. Help Reason given for failure: Referer checking

Re: [Django-admin] Popup for inline model

2014-07-06 Thread Aeh. ABID
Thanks for your reply. StackedInline would be cumbersome when we have more than two childs to edit, that is why having a detached window will help a lot. On Monday, July 7, 2014 12:18:49 AM UTC+1, Russell Keith-Magee wrote: > > Hi, > > This isn't a builtin feature. It might be possible to add

strange problem when throung official tutorial

2014-07-06 Thread Jerry Wu
Hi, all, I think I follow every step on tutorial 05 'The Django Test Client' part with shell. When I created a new Poll with questions "Who is your favorite beatles?" and save, some thing should came when I called response.content. But it still told me "No Polls are available". I have

Re: [Django-admin] Popup for inline model

2014-07-06 Thread Russell Keith-Magee
Hi, This isn't a builtin feature. It might be possible to add as an extension in your own code, but I can't point you at a simple set of instructions for how to do this. If you've got a problem with the number of fields in your TabularInline causing horizontal scrolling, perhaps you might think

Re: DateTimeField always returns None

2014-07-06 Thread Russell Keith-Magee
Date isn't *disallowed* as a field name: http://dev.mysql.com/doc/refman/5.5/en/reserved-words.html#table-reserved-words-new-5.5 As long as it's quoted, it's an allowed name. However, it's *really* not recommended. This isn't for database related reasons - it's the Python side that is

Lookup Fields

2014-07-06 Thread Daniel Roseman
Sounds like you want a ForeignKey to "self". -- DR. -- 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-users+unsubscr...@googlegroups.com. To post to this

How to install Django on Windows - pip, command prompt.

2014-07-06 Thread Daniel Roseman
You can't have been following that documentation very closely, as there is a whole section on how to install pip before the bit that you quote. -- DR. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: How to making a query which filtters objects having a Null field

2014-07-06 Thread Mario Gudelj
something__null=True On 07/07/2014 6:31 am, "Utkarsh Dixit" wrote: > I have a datetime field in my model. Initially when an object is created > of this model the datetime field is set as NULL (I've defined Null=True and > blank=True) > > Now I want to change make a

How to making a query which filtters objects having a Null field

2014-07-06 Thread Utkarsh Dixit
I have a datetime field in my model. Initially when an object is created of this model the datetime field is set as NULL (I've defined Null=True and blank=True) Now I want to change make a query which filters all the objects having Null in this field.. and changing their datetime to current

Unit testing - self.assertEqual("Break it!", resp.content)

2014-07-06 Thread Pepsodent Cola
When I run this unit test to make it break so it can output a bunch of html data. self.assertEqual("Break it!", *resp.content*) test.py # Reset password no login def test_Reset_no_login(self): self.assertTrue(isinstance(self.user, User)) login =

Tango with Django chapter 7 Exercises

2014-07-06 Thread Martin Spasov
I am doing the exercises in chapter 7 and I have to create an add page link on every category page that would take the users to a new page on which they can enter name and url to add to certain category if the category in

NameError name 'lang' is not defined, corresponds to name 'polls' is not defined,

2014-07-06 Thread gintare
I am trying to create a project "lang" according Django documentation part 1-4 tutorial. Folder structure: Scripts\lang\lang\_init_.py Scripts\lang\lang\settings.py Scripts\lang\lang\urls.py Scripts\lang\langu\_init_.py Scripts\lang\langu\admin.py Scripts\lang\langu\models.py

[Django-admin] Popup for inline model

2014-07-06 Thread Aeh. ABID
In the inline models when using TabularInline, is it possible to use a popup to add/edit an item when we have a number of fields that can't hold in the page without horizontal scrolling ? -- You received this message because you are subscribed to the Google Groups "Django users" group. To