Simple Login Problem

2014-11-27 Thread Rootz
I have a django app but I having problems with my login views and logout views. I do not have a html template designated to handle user login/logout view. Django project is configured as follows: INSTALLED_APPS se

Re: Does Django offers a way to generate data grid from database table like web2py

2014-11-27 Thread Sarbjit singh
What web2py GRID does is, that it takes the SQL table/query as argument, and return the records satisfying the query. Records which are returned are seen in bootstrap enabled table with features having pagintation, sorting, search, ability to edit/delete/view individual record, add new record

Re: Test client to a redirect requiring a login doesn't set redirect_chain properly?

2014-11-27 Thread Tim Chase
On 2014-11-27 20:15, Tim Chase wrote: > However my test fails with: > > AssertionError: Response redirected to > 'http://testserver/admin/common/region/add/', expected > 'http://testserver/accounts/login/?next=/admin/common/region/add/' > > Where am I going wrong? Do admin pages not have @

Test client to a redirect requiring a login doesn't set redirect_chain properly?

2014-11-27 Thread Tim Chase
I have a view that can redirect to /admin/common/region/add/ but that url (being an admin page) should require login (right?). My test that logs-in works as expected. However, when I try to do an assertRedirects() without logging in first, the assertRedirects() doesn't seem to follow through to t

Re: strange question when i access related object

2014-11-27 Thread James Schneider
Try throwing in an event.save() after creating the eventdate_date. The event.dates.all() is spawning a new query, and you are trying to list changes that haven't yet been committed to the database. -James On Nov 27, 2014 6:32 AM, "daedae11" wrote: > My EventDate model has a ForeignKey to Event s

i want to know how to use SlugField with slugify to generate url for detail_blog page without using get_absolute_url

2014-11-27 Thread Kanchan Prasad
my model.py is class BlogPost(models.Model): title= models.CharField(max_length=100) text = models.TextField() created_on = models.DateTimeField(auto_now_add=True,auto_now=False) updated_on = models.DateTimeField(auto_now_add=False,auto_now=True) submitted_by

Re: not thread-safe function can break a django application?

2014-11-27 Thread Fabio Caritas Barrionuevo da Luz
Collin, Thanks for the explanation. Em segunda-feira, 24 de novembro de 2014 20h01min55s UTC-3, Collin Anderson escreveu: > > > > On Saturday, November 22, 2014 4:46:56 AM UTC-5, Fabio Caritas Barrionuevo > da Luz wrote: >> >> I was trying to answer a question in a Brazilian forum about django.

Newbie help - running django-admin.py produces empty mysite folder

2014-11-27 Thread David Pride
Title says it all really. Have just installed Django 1.8, can test django version and get correct response so am *fairly* happy it's installed correctly. I have had Python 2.7 installed and been using perfectly for several months. Altered the PATH variable as discussed so it points to correct

Re: Does Django offers a way to generate data grid from database table like web2py

2014-11-27 Thread Avraham Serour
maybe you'll get a better chance of responding if you explained what this web2py feature does exactly currently you have a very low chance of getting a response because you need from someone knowledgeable in both django and web2py. What do you need? an html table with database data? On Thu, Nov

strange question when i access related object

2014-11-27 Thread daedae11
My EventDate model has a ForeignKey to Event shown as follows: class EventDate( models.Model ): # {{{1 """ stores dates for events """ eventdate_name = models.CharField( _( u'Name' ), blank = False, null = False, max_length = 80, help_text = _( "Example:

Re: Re: How to make database queries that “filters” results according to tuples of values?

2014-11-27 Thread Vijay Khemlani
Remember that |= is just a shorthand for query = query | ... rest of parameters So in the end it is just an "or" like you say, nothing magical about that Glad I could help Regards! On Thu, Nov 27, 2014 at 4:56 AM, wrote: > Hi Vijay, > > thank you very much. I have not known, that |= also cou

Re: Newbie: How to implement a app/module, which I can include from my html?

2014-11-27 Thread Mario Gudelj
https://docs.djangoproject.com/en/dev/howto/custom-template-tags/#inclusion-tags here you go chief On 27/11/2014 8:04 pm, "ThomasTheDjangoFan" < stefan.eichholz.ber...@googlemail.com> wrote: > Oh ok. > > so it would be something like: > > in home.html > {% include 'category-list.html' %} > > in ca

Re: Newbie: How to implement a app/module, which I can include from my html?

2014-11-27 Thread ThomasTheDjangoFan
Oh ok. so it would be something like: in home.html {% include 'category-list.html' %} in category-lists.html {% load those_categories %} ? Am Donnerstag, 27. November 2014 09:55:50 UTC+1 schrieb James Bennett: > > The usual way would be to write a custom template tag that fetches the > objec

Re: Newbie: How to implement a app/module, which I can include from my html?

2014-11-27 Thread James Bennett
The usual way would be to write a custom template tag that fetches the objects and puts them into the template context. -- 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 ema

Newbie: How to implement a app/module, which I can include from my html?

2014-11-27 Thread ThomasTheDjangoFan
Hi guys, I want to display a block of category-links in various places of the website. Those links are populated by making a Category.objects.all request in a view. So right now it seems like each view that should contain those links needs to put the "Category" Model in its context. Now I woul