django-registration ImportError

2013-07-20 Thread Mike
I just updated django-registration to 1.0 (from 0.8) and now I get an ImportError: ImportError: cannot import name activate /Users/mike/sieve-django/SIEVEENV/lib/python2.7/site-packages/registration_email/backends/default/urls.py in 1. from registration.views import activate,

Re: CSRF in javascript

2013-07-20 Thread Fred Stluka
Karl, You are calling render_to_response() wrong. See the docs at: https://docs.djangoproject.com/en/dev/topics/http/shortcuts/#render-to-response Instead of: variables = RequestContext(request, { 'bookmarks':[bookmark],

django-admin.py startproject mysite error

2013-07-20 Thread Jay Lozier
Using openSUSE 12.3 python 2.7.3 django 1.5.1 installed manually and verified When I enter "django-admin.py startproject mysite" at the command prompt I get the following traceback: Traceback (most recent call last): File "/usr/bin/django-admin.py", line 5, in

Re: File Log vs. Database Log

2013-07-20 Thread Javier Guerra Giraldez
On Sat, Jul 20, 2013 at 9:52 AM, Parin Porecha wrote: > My question is - Should I do it via file storage, or should I save it in > database ? neither. syslog is a great tool, often overlooked, but built specifically for this. not only it works right out of the box, but

Re: CSRF in javascript

2013-07-20 Thread Karl Arunachal
I am sorry, i am really new to this things. Could you please point me out as to where I should add it. *js file: *function bookmark_edit() { var item = $(this).parent(); var url = item.find(".title").attr("href"); item.load("/save/?ajax=" + escape(url), null, function () {

Re: CSRF in javascript

2013-07-20 Thread Fred Stluka
Karl, Since you already have a form, and are already submitting it as an Ajax request via JavaScript, the easiest way is to just put the {% csrf_token %} in the Django template for the page. We do that for our Ajax forms. If you are not using a Django template to generate the form, there are

CSRF in javascript

2013-07-20 Thread Karl Arunachal
Hi, In my users page, i have in place editing with ajax. And when i click edit, it works fine. But when i submit the form, it don't do anything. When i checked, this is the error: CSRF verification failed. Request aborted. So, how do I place {% csrf_token %} in my javascript? Please advice.

Re: Testing django views: RequestFactory and CSRF protection

2013-07-20 Thread Vladimir Ignatev
Well, looks like I've found workaround. At first we should test if a view have CSRF protection: def test_csrf_protected(self): request = RequestFactory().post('', data={}) response = views.register_form(request) self.assertEqual(response.status_code, 403) (fix me, it is

passing extra arguments formset save

2013-07-20 Thread Clement Poh
I have a bunch of inline formsets, which are related to two models. In this case I want to have a bunch of "Dealings" associated with a "Report" and a "Question". So I can associate them to one fairly easily. DealingFormset = inlineformset_factory(Report, Dealing, form = DealingForm) So to

Re: File Log vs. Database Log

2013-07-20 Thread Valder Gallo
:D http://django-audit-log.readthedocs.org/en/latest/usage.html On Sat, Jul 20, 2013 at 1:16 PM, Parin Porecha wrote: > django-logtailer looks a great app, but the last commit was 2 years ago. > Also, it's focused on admins. > Maybe the term 'logs' is confusing. So,

Re: Search from database

2013-07-20 Thread Satinderpal Singh
On Sat, Jul 20, 2013 at 8:48 AM, Kamal Kaur wrote: > Can we have a search module in django that can suggest resembling > spellings from mysql database? > I am not getting you, please expalin. -- Satinderpal Singh -- You received this message because you are subscribed

Re: File Log vs. Database Log

2013-07-20 Thread Parin Porecha
django-logtailer looks a great app, but the last commit was 2 years ago. Also, it's focused on admins. Maybe the term 'logs' is confusing. So, I'll change it to 'audit-data' ( stackoverflow suggestion ). I need audit data not system logs. Thanks Valder On Sat, Jul 20, 2013 at 9:02 PM, Valder

Project template for django 1.4+

2013-07-20 Thread Allisson
Here: https://github.com/allisson/django-project-template -- 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

Re: File Log vs. Database Log

2013-07-20 Thread Valder Gallo
Do you know django-logtailer ? https://github.com/fireantology/django-logtailer If you don't need search or modify the data. +1 for file storage :D On Sat, Jul 20, 2013 at 11:52 AM, Parin Porecha wrote: > Hi, > > I have a to-do list app ( using Django 1.5 and MySQL )

Re: create random string for username

2013-07-20 Thread Randy Baxley
The Django tutorial is not quite making it for me. This is a very complicated language and all the pieces seem to not match up for me. This I think is my fault and most of it seems to be in the use of the r hat for root and exactly how that points to views, models and dbs. I may get there but

Overriding the formset save method/ Inlineformsets with 2 related Models

2013-07-20 Thread Clement Poh
I have a bunch of inline formsets, which are related to two models. In this case I want to have a bunch of "Dealings" associated with a "Report" and a "Question". So I can associate them to one fairly easily. DealingFormset = inlineformset_factory(Report, Dealing, form = DealingForm) So to

File Log vs. Database Log

2013-07-20 Thread Parin Porecha
Hi, I have a to-do list app ( using Django 1.5 and MySQL ) in which a task can be shared with another user. Thus, a user can have personal tasks and shared tasks. Shared tasks will be a fraction ( i guess around 30% of total tasks of a user ) For shared tasks, I want to keep a log so that users

Re: create random string for username

2013-07-20 Thread Tim Chase
On 2013-07-18 20:53, Sivaram R wrote: > While saving these forms instance,is it possible to create a > random string for username field.How to do this,any sample would be > great choice. You can. Assigning random usernames isn't usually considered a very nice thing to do to users, but assuming