Django-registration reset password templates not getting picked up

2013-08-31 Thread Vibhu Rishi
I am getting a bit of a problem with django-registration django-registration was installed in a venv using pip. I have version 1.0 of django-registration and 1.5.1 of Django . I have the templates/registration directory with the templates for the pages that are to display the different pages. logi

Re: MongoDB and Django

2013-08-31 Thread Christiano Anderson
It is not supported by default. Check django-nonrel and django-mongodb-engine projects. I am not sure if these projects are still available. On 31 August 2013 05:22, Timothy Makobu wrote: > Hi, > > Is MongoDB support coming to standard Django? > > regards, > Tim > > -- > You received this mess

Re: Django driving me nuts

2013-08-31 Thread Kelvin Wong
Try the Django IRC channel for faster answers https://code.djangoproject.com/wiki/IrcFAQ If you are learning Python at the same time learning Django then it can be a tough climb K On Saturday, August 31, 2013 5:50:19 AM UTC-7, Gerd Koetje wrote: > > Why is it so hard to get as a former php pr

Re: Form validation number and text only no space mac 4 numbers

2013-08-31 Thread Mike Dewhirst
On 1/09/2013 2:11am, Gerd Koetje wrote: to explain myself a bit more: gerd12 = should be valid gerd1234 = should be valid gerd 1234 = should not be valid %$$%%#$ = should not be valid gerd123456 - should not be valid You have just specified five cases for unit tests. Start there and experim

Re: New to Django and developing website based on a Framework. What is the best order to develop website?

2013-08-31 Thread Kelvin Wong
Add features as you need them. If you are going to launch in multiple languages I'd add that early on. Adding the stock authorization is pretty safe as well. Learn and use the testing framework as much as possible. K On Saturday, August 31, 2013 1:07:46 PM UTC-7, Mark Strickland wrote: > > I

Re: Why does the save form order make any difrance?

2013-08-31 Thread Gerd Koetje
anyone? -- 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 group, send email to django-users@googlegroups

verify before make changes?

2013-08-31 Thread Nkansah Rexford
def delete_item(request, item_id): item = get_object_or_404(Item, pk=item_id) return render(request, 'delete_item.html', {'item':item, 'item_id':item_id},) def delete_confirmed(request, item_id): query = get_object_or_404(Item, pk=item_id) query.delete()

New to Django and developing website based on a Framework. What is the best order to develop website?

2013-08-31 Thread Mark Strickland
I am starting to develop a website using django and I am wondering if I should add all the extra modules (authorization, mutliLanguages, comments), at the beginning, or should I develop the basic pages (apps) and then go back and add in the requirements for the modules I want to add. I am tryi

Re: Problems using django 1.6.x and uwsgi

2013-08-31 Thread Michael Radziej
Hi Rafael, Rafael Reuber writes: > I'm working on a project that needs a feature that it's only available on > the 1.6.x version. But I'm having problems when I run it using uswgi. > Apparently it could be a bug on 1.6.x because when I run the project using > 1.5.x the error doesn't appear. >

Re: Why does the save form order make any difrance?

2013-08-31 Thread Gerd Koetje
if u need to see any other code let me know -- 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 group, sen

Why does the save form order make any difrance?

2013-08-31 Thread Gerd Koetje
Hi, Why does this save sometimes not save all forms If i set form8 at the top it doesnt save form 8 When i set it at the bottom it does save form 8, but not any others without the form8 all works if request.POST: form = ProfielenForm(request.POST, instance=request.user.profile)

Re: JSON or YAML?

2013-08-31 Thread Floor Tile
Thanks for your input everybody! On Sat, Aug 31, 2013 at 10:16 AM, Agnese Camellini < agnese.camell...@gmail.com> wrote: > I'm using JSON becuase of it's compatibility with javascript and python > both. I never used YAML but i think the compatibility's problem are bigger > with YAML than json. >

Re: How to require selection of a M2M with intermediate table/model during admin record creation?

2013-08-31 Thread M Hill
Another application of the validation occurred to me: Since multiple rows can be added to the form, I would want to check for and reject multiple selections of the same Position title. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubs

Re: Form validation number and text only no space mac 4 numbers

2013-08-31 Thread Gerd Koetje
i gues im learning it the hard way atm. Just wanna convert my php application to python, but its hard when i miss out on some basic stuff. giving me headpains haha :D -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this grou

Re: Form validation number and text only no space mac 4 numbers

2013-08-31 Thread Gerd Koetje
yeah i really should do more python learning. and i will do :D -- 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

Re: Form validation number and text only no space mac 4 numbers

2013-08-31 Thread Gerd Koetje
stupid me, its almost like php if testdata == False: > fixed it Thanks alot for your help all. Appreciated -- 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: Form validation number and text only no space mac 4 numbers

2013-08-31 Thread Thomas Orozco
test(data) returns True if the string is acceptable, and False if it's not. But False is an object, it's not the the string "False" - I'd strongly recommend you start with a Python tutorial before moving on to your Django project. Cheers; On Sat, Aug 31, 2013 at 7:27 PM, Gerd Koetje wrote: > t

Re: Form validation number and text only no space mac 4 numbers

2013-08-31 Thread Gerd Koetje
think i fixed the true/false thing, return True was on the wrong indent it still doesnt trow the error , so i gues my if testdata us False: is wrong? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop rece

Re: Form validation number and text only no space mac 4 numbers

2013-08-31 Thread Thomas Orozco
Because the indentation is not correct, and doesn't correspond to what I sent you. `return True` should be 4 chars left of where it currently is. On Sat, Aug 31, 2013 at 7:23 PM, Gerd Koetje wrote: > it somehow keeps returning True on everything > > accepted = string.letters + string.digits > m

Re: Form validation number and text only no space mac 4 numbers

2013-08-31 Thread Gerd Koetje
it somehow keeps returning True on everything accepted = string.letters + string.digits max_numbers = 4 def test(word): numbers = 0 for c in word: if c.isdigit(): numbers += 1 if not c in accepted or numbers > max_numbers: return False retur

Re: Form validation number and text only no space mac 4 numbers

2013-08-31 Thread Gerd Koetje
like this? import string accepted = string.letters + string.digits max_numbers = 4 def test(word): numbers = 0 for c in word: if c.isdigit(): numbers += 1 if not c in accepted or numbers > max_numbers: return False return True # Create prof

Re: Form validation number and text only no space mac 4 numbers

2013-08-31 Thread Thomas Orozco
Oh, I thought you needed only 4 total chars. Using a regex probably is a bit overkill here: >>> import string >>> accepted = string.letters + string.digits >>> max_numbers = 4 >>> >>> def test(word): ... numbers = 0 ... for c in word: ... if c.isdigit(): ... numbers +

Re: Form validation number and text only no space mac 4 numbers

2013-08-31 Thread Gerd Koetje
im working with this code in my forms.py btw. I see some guys do it in models.py instead -- 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...

Re: Form validation number and text only no space mac 4 numbers

2013-08-31 Thread Gerd Koetje
to explain myself a bit more: gerd12 = should be valid gerd1234 = should be valid gerd 1234 = should not be valid %$$%%#$ = should not be valid gerd123456 - should not be valid etc etc -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsub

Re: Form validation number and text only no space mac 4 numbers

2013-08-31 Thread Gerd Koetje
> > same result still can input spaces weird chars and more then 4 numbers > -- 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...@googlegrou

Re: Form validation number and text only no space mac 4 numbers

2013-08-31 Thread Thomas Orozco
Oh, yes, we need to search for the end of the string: r'^[a-zA-Z0-9]{1,4}$' On Sat, Aug 31, 2013 at 6:03 PM, Gerd Koetje wrote: > that still allows space,weird chars and more then 4 numbers > > input: > dfdfdf565665&^^^ > got saved > > > > def clean_

Re: Form validation number and text only no space mac 4 numbers

2013-08-31 Thread Gerd Koetje
that still allows space,weird chars and more then 4 numbers input: dfdfdf565665&^^^ got saved def clean_profielnaam(self): data = self.cleaned_data['profielnaam'] if not re.match(r'^[a-zA-Z0-9]{1,4}', data): raise forms.V

Re: Form validation number and text only no space mac 4 numbers

2013-08-31 Thread Thomas Orozco
Change you regex to: r'^[a-zA-Z0-9]{1,4}' On Sat, Aug 31, 2013 at 5:41 PM, Gerd Koetje wrote: > Hi all, > > How do i valididate for this? > > - numbers and text only , no spaces > - max 4 number > > > > > def clean_profielnaam(self): > data = self.cleaned_data['profielnaam'] >

Form validation number and text only no space mac 4 numbers

2013-08-31 Thread Gerd Koetje
Hi all, How do i valididate for this? - numbers and text only , no spaces - max 4 number def clean_profielnaam(self): data = self.cleaned_data['profielnaam'] if not re.match(r'^[a-z][0-9]+', data): raise forms.ValidationError("Je mag alleen tekst en cijfers ge

Re: list(form) makes my form not safe anymore

2013-08-31 Thread Gerd Koetje
When i use it with list(form) It shows the form normally, but when i save the form, nothing gets saved, no errors also. im trying a difrant approach now: Im makking multiple forms on forms.py each with the fields i want in it. Code so far, seems to work only when i do for before form2 it wont

Re: list(form) makes my form not safe anymore

2013-08-31 Thread sbrandt
Ah, I see. Sorry. Applying list() to the form at the end of the function does not affect the form.is_valid() you're doing before or the form at all. So your problem must be another kind. So I must repeat what someone said in your other thread: Please describe your problem further. Why doesn't

Re: list(form) makes my form not safe anymore

2013-08-31 Thread Gerd Koetje
thats not what i trying todo Im seperating the entire form in difrant sections of the layout -- 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+unsubs

Re: list(form) makes my form not safe anymore

2013-08-31 Thread sbrandt
If you don't want a particular field to display, then don't include it into your form. Not showing it doesn't exclude it from form processing, so it's a security risk. You can exclude fields with the exclude attribute of the forms inner Meta class: https://docs.djangoproject.com/en/dev/topics/

Re: list(form) makes my form not safe anymore

2013-08-31 Thread Gerd Koetje
atleast not with this code to seperate it {% for field in form|slice:"1:8" %} -- 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...@googlegro

Re: list(form) makes my form not safe anymore

2013-08-31 Thread Gerd Koetje
without the list(form) part that doesnt seem to work -- 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 g

Re: list(form) makes my form not safe anymore

2013-08-31 Thread sbrandt
As far as I understand, you want to iterate over all form fields. Someone correct me if I'm wrong, but I've never seen anyone trying to achieve this via list(form). Anyway, forms are iterable, so you can iterate over them in the templates: {% for field in form %} {{ fi

Re: Django driving me nuts

2013-08-31 Thread Gerd Koetje
Hope anyone can tell me why it doesnt save th eform anymore when i use list(form) -- 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...@googl

Re: Django driving me nuts

2013-08-31 Thread Gerd Koetje
https://groups.google.com/forum/#!topic/django-users/fgGyE_UPWq0 -- 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 po

Re: Django driving me nuts

2013-08-31 Thread Sithembewena Lloyd Dube
Please describe your problem a bit more and/ or show code samples? We can help out if we understand the issue. On Sat, Aug 31, 2013 at 2:50 PM, Gerd Koetje wrote: > Why is it so hard to get as a former php programmer. > > I'm trying to cut my form in difrant sections , what seemed to work when i

Django driving me nuts

2013-08-31 Thread Gerd Koetje
Why is it so hard to get as a former php programmer. I'm trying to cut my form in difrant sections , what seemed to work when i use list(forms) But then my forms dont save anymore anyone willing to help me over this part? -- You received this message because you are subscribed to the Google

Re: db queries made twice

2013-08-31 Thread Marcin Szamotulski
Thanks, though disabling django_toolbar completely (removing the middleware, and the entry in INSALLED_APPS) did not helped. Regards, Marcin On 04:34 Sat 31 Aug , Tomáš Ehrlich wrote: > Other option is set SHOW_TEMPLATE_CONTEXT to False > in DEBUG_TOOLBAR_CONFIG. > > See https://github.com/d

Re: I really about to give up Django

2013-08-31 Thread Gerd Koetje
if u want someone else to understand use english -- 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 group

Re: db queries made twice

2013-08-31 Thread Tomáš Ehrlich
Other option is set SHOW_TEMPLATE_CONTEXT to False in DEBUG_TOOLBAR_CONFIG. See https://github.com/django-debug-toolbar/django-debug-toolbar#configuration Dne sobota, 31. srpna 2013 13:24:54 UTC+2 Tomáš Ehrlich napsal(a): > > Hi, > disable Template panel in debug_toolbar and try again. > > Debu

Re: db queries made twice

2013-08-31 Thread Tomas Ehrlich
Hi, disable Template panel in debug_toolbar and try again. Debug toolbar hits database when evaluating template context. Cheers, Tom Dne Sat, 31 Aug 2013 12:09:00 +0100 Marcin Szamotulski napsal(a): > Hello, > > I am using django-1.6.b2 on a localserver (./manage.py runserver) and > for e

db queries made twice

2013-08-31 Thread Marcin Szamotulski
Hello, I am using django-1.6.b2 on a localserver (./manage.py runserver) and for every request I have the chain of db lookups made twice. For example my log looks something like this (after enabling django.db.backands logger): # HERE VIEW IS CALLED (0.001) SELECT "django_session"."session_key",

Implementing Raw SQL in Models problem

2013-08-31 Thread Pepsodent Cola
### PART A Hello, in Python shell I run a Raw SQL and get a One-to-Many list output. $ python manage.py shell Python 2.7.3 (default, Apr 10 2013, 05:13:16) [GCC 4.7.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> >>> >>> from navi_po

Re: Script to move django 1.4.3 to 1.5.1

2013-08-31 Thread Some Developer
On 31/08/2013 02:14, Dan Gentry wrote: I've been using Django since v1.0, and when each major version is released, I run through the release notes to see what I need to change. Russell is correct that most things will work from one version to the next, but I like to keep as up to date as possib

MongoDB and Django

2013-08-31 Thread Timothy Makobu
Hi, Is MongoDB support coming to standard Django? regards, Tim -- 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 po

Re: JSON or YAML?

2013-08-31 Thread Agnese Camellini
I'm using JSON becuase of it's compatibility with javascript and python both. I never used YAML but i think the compatibility's problem are bigger with YAML than json. My 2 cents. Agnese 2013/8/31 Andre Terra > It depends on where your data is coming from. YAML has less cruft in it, > so if yo