Re: rich text editor

2013-07-18 Thread Kakar Arunachal Service
Thank you so much!!! I will try it for sure! Thanks again!


On Fri, Jul 19, 2013 at 12:15 AM, Andre Terra <andrete...@gmail.com> wrote:

> It seems you are asking two completely unrelated questions:
> 1. to allow users to add some form of tags into their code for richer
> submissions.
> 2. to have a different css for each user
>
> One possible answer to #1 is BBCode, as I described. Question #2 is
> something altogether. Do you want each user message to appear differently?
> Is that supposed to be customizable to the degree of css? Are you just
> switching colors? How much are you going to let the user style their
> messages? BBcode should be anough to allow them to add bold, italics,
> links, pictures, etc. If you just want that, there's no need to have a
> separate css for each user. Instead, just follow my instructions below.
>
> I'm not sure how django-bbcode styles the rendered text, but my
> step-by-step investigation would be:
>
> 1. Install django-bbcode
> 2. Make sure you have a view somewhere with an input and go to that URL.
> This would possibly be a very simple view with a textarea where you'd type
> something in and see the rendered output.
> 3. Send the textarea back to the template in a variable (called, say,
> stuff) and render it with {% bbcode stuff %} in the template.
> 4. Use firebug, google chrome's inspector/developer tools to inspect the
> css that's applied to the rendered text
> 5. Make changes to yourcurrentcssfile.css to include styling for the
> BBCode.
> 6. GOTO 2
> 7. ???
> 8. Profit!!!
>
> I hope I understood your question well enough. Good luck!
>
> Cheers,
> AT
>
> On Thu, Jul 18, 2013 at 2:56 PM, Kakar Arunachal Service <
> kakararunachalserv...@gmail.com> wrote:
>
>> Thanks a lot! Was waiting for an answer. Just one more question though, I
>> didnt understood much in the link you gave me. Its that, suppose I included
>> it where users can post, will each post require another css, or something
>> else. Please explain.
>>  Liked "Impossible is nothing™"
>>
>>
>> On Thu, Jul 18, 2013 at 10:44 PM, Andre Terra <andrete...@gmail.com>wrote:
>>
>>> Impossible is nothing™, but I don't see the benefits of combining rich
>>> text with social networking. Things like BBCode[0] usually offer a better
>>> trade-off between flexibility/usability/maintenance. Based on a quick
>>> google search, it seems there are solutions tailored for use with Django
>>> [1][2]
>>>
>>> [0] http://en.wikipedia.org/wiki/BBCode
>>> [1] https://github.com/marcinn/django-bbcode full solution
>>> [2] http://djangosnippets.org/snippets/853/ old (0.96!), but should be
>>> a place to start in case you want to rollout your own.
>>>
>>>
>>>  Cheers,
>>> AT
>>>
>>> On Thu, Jul 18, 2013 at 7:24 AM, Kakar Arunachal Service <
>>> kakararunachalserv...@gmail.com> wrote:
>>>
>>>> Hello,
>>>> Just a thought, can a rich text editor be integrated to a social
>>>> networking site. Or should every user have a css each? Its just a thought,
>>>> was just wondering but would be glad if any of you could advice me how to
>>>> if its possible.
>>>> Thank you.
>>>>
>>>> --
>>>> 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.com.
>>>> Visit this group at http://groups.google.com/group/django-users.
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>
>>>>
>>>>
>>>
>>>  --
>>> 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.com.
>>> Visit this group at http://groups.google.com/group/django-users.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>
>>  --
>> 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
>> em

Re: rich text editor

2013-07-18 Thread Kakar Arunachal Service
Thanks a lot! Was waiting for an answer. Just one more question though, I
didnt understood much in the link you gave me. Its that, suppose I included
it where users can post, will each post require another css, or something
else. Please explain.
 Liked "Impossible is nothing™"


On Thu, Jul 18, 2013 at 10:44 PM, Andre Terra <andrete...@gmail.com> wrote:

> Impossible is nothing™, but I don't see the benefits of combining rich
> text with social networking. Things like BBCode[0] usually offer a better
> trade-off between flexibility/usability/maintenance. Based on a quick
> google search, it seems there are solutions tailored for use with Django
> [1][2]
>
> [0] http://en.wikipedia.org/wiki/BBCode
> [1] https://github.com/marcinn/django-bbcode full solution
> [2] http://djangosnippets.org/snippets/853/ old (0.96!), but should be a
> place to start in case you want to rollout your own.
>
>
>  Cheers,
> AT
>
> On Thu, Jul 18, 2013 at 7:24 AM, Kakar Arunachal Service <
> kakararunachalserv...@gmail.com> wrote:
>
>> Hello,
>> Just a thought, can a rich text editor be integrated to a social
>> networking site. Or should every user have a css each? Its just a thought,
>> was just wondering but would be glad if any of you could advice me how to
>> if its possible.
>> Thank you.
>>
>> --
>> 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.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>  --
> 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.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




rich text editor

2013-07-18 Thread Kakar Arunachal Service
Hello,
Just a thought, can a rich text editor be integrated to a social networking
site. Or should every user have a css each? Its just a thought, was just
wondering but would be glad if any of you could advice me how to if its
possible.
Thank you.

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




django statics

2013-07-14 Thread Kakar Arunachal Service
Hello,
I read the django docs, but my still confused. How do i use the static
files, for css?
Thank you.

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Display error message

2013-07-13 Thread Kakar Arunachal Service
Hi,
I have a site, that has a submit form, but one must be logged in for that.
And if the user is not logged in, it redirects it to the login page. And
this all fine. My question is, what do I do to display the error message,
"You must be logged to submit.", if the user is not logged in and tries to
submit the form, but has to display the normal login page if not.
Thank you.

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: 'SimpleLazyObject'

2013-07-13 Thread Kakar Arunachal Service
Yes, you are right.


On Sat, Jul 13, 2013 at 7:07 PM, Victor Rocha  wrote:

> This is a wild guess but I do not see the login_required decorator on your
> view. I think you are getting this error because you are trying to save an
> Bookmark object passing an anonymous user as one of your arguments. An
> anonymous user is a SimpleLazyObject; it is a user but there is no
> reference to it on your databases. The Bookmark foreign key expects to
> point to user instance on the users table.
>
> Thank you,
> Victor Rocha
> www.RochApps.com
>
>
>
> On Friday, July 12, 2013 2:45:00 PM UTC-4, Kakar wrote:
>>
>> I've got a TypeError:
>>
>> int() argument must be a string or a number, not 'SimpleLazyObject'
>>
>>
>> Here's my view:
>>
>> def bookmark_save_page(request):
>> if request.method == 'POST':
>> form = BookmarkSaveForm(request.POST)
>> if form.is_valid():
>> # Create or get link.
>> link, dummy = Link.objects.get_or_create(
>> url=form.cleaned_data['url']
>> )
>> # Create or get bookmarks.
>> bookmark, created = Bookmark.objects.get_or_**create(
>> user = request.user,
>> link = link
>> )
>> # Update bookmark title.
>> bookmark.title = form.cleaned_data['title']
>> # If the bookmark is being updated, clear old tag list.
>> if not created:
>> bookmark.tag_set.clear()
>> # Create new tag list.
>> tag_names = form.cleaned_data['tags'].**split()
>> for tag_name in tag_names:
>> tag, dummy = Tag.objects.get_or_create(**name=tag_name)
>> bookmark.tag_set.add(tag)
>> # Save bookmark to database.
>> bookmark.save()
>> return HttpResponseRedirect(
>> '/user/%s/' %request.user.username
>> )
>> else:
>> form = BookmarkSaveForm()
>>
>> variables = RequestContext(request, {'form': form})
>> return render_to_response('bookmark_**save.html',variables)
>>
>> I really don't know what's going on here. Please guide me.
>>
>  --
> 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.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: 'SimpleLazyObject'

2013-07-13 Thread Kakar Arunachal Service
No, it wont do, it loads another error. But my problem is solved. I just
needed to log in. Thanks anyway.


On Sat, Jul 13, 2013 at 10:42 AM, Babatunde Akinyanmi
<tundeba...@gmail.com>wrote:

> How about changing this:
>
> Bookmark.objects.get_or_create(
> user = request.user,
> link = link
> )
>
> To this:
> Bookmark.objects.get_or_create(
> user = request.user.id,
> link = link
> )
>
> Sent from my Windows Phone
> ----------
> From: Kakar Arunachal Service
> Sent: 7/12/2013 8:46 PM
> To: django-users@googlegroups.com
> Subject: Re: 'SimpleLazyObject'
>
> Here's the traceback info:
>
> Environment:
>
>
> Request Method: POST
> Request URL: http://localhost:8000/save/
>
> Django Version: 1.5.1
> Python Version: 2.7.5
> Installed Applications:
> ('django.contrib.auth',
>  'django.contrib.contenttypes',
>  'django.contrib.sessions',
>  'django.contrib.sites',
>  'django.contrib.messages',
>  'django.contrib.staticfiles',
>  'bookmarks')
> Installed Middleware:
> ('django.middleware.common.CommonMiddleware',
>  'django.contrib.sessions.middleware.SessionMiddleware',
>  'django.middleware.csrf.CsrfViewMiddleware',
>  'django.contrib.auth.middleware.AuthenticationMiddleware',
>  'django.contrib.messages.middleware.MessageMiddleware')
>
>
> Traceback:
> File "C:\Python27\lib\site-packages\django\core\handlers\base.py" in
> get_response
>   115. response = callback(request,
> *callback_args, **callback_kwargs)
> File "C:\Users\Kakar\web\django_bookmarks\bookmarks\views.py" in
> bookmark_save_page
>   63. link = link
> File "C:\Python27\lib\site-packages\django\db\models\manager.py" in
> get_or_create
>   146. return self.get_query_set().get_or_create(**kwargs)
> File "C:\Python27\lib\site-packages\django\db\models\query.py" in
> get_or_create
>   470. return self.get(**lookup), False
> File "C:\Python27\lib\site-packages\django\db\models\query.py" in get
>   379. clone = self.filter(*args, **kwargs)
> File "C:\Python27\lib\site-packages\django\db\models\query.py" in filter
>   655. return self._filter_or_exclude(False, *args, **kwargs)
> File "C:\Python27\lib\site-packages\django\db\models\query.py" in
> _filter_or_exclude
>   673. clone.query.add_q(Q(*args, **kwargs))
> File "C:\Python27\lib\site-packages\django\db\models\sql\query.py" in add_q
>   1266. can_reuse=used_aliases,
> force_having=force_having)
> File "C:\Python27\lib\site-packages\django\db\models\sql\query.py" in
> add_filter
>   1197. connector)
> File "C:\Python27\lib\site-packages\django\db\models\sql\where.py" in add
>   71. value = obj.prepare(lookup_type, value)
> File "C:\Python27\lib\site-packages\django\db\models\sql\where.py" in
> prepare
>   339. return self.field.get_prep_lookup(lookup_type, value)
> File "C:\Python27\lib\site-packages\django\db\models\fields\related.py" in
> get_prep_lookup
>   143. return self._pk_trace(value, 'get_prep_lookup',
> lookup_type)
> File "C:\Python27\lib\site-packages\django\db\models\fields\related.py" in
> _pk_trace
>   216. v = getattr(field, prep_func)(lookup_type, v, **kwargs)
> File "C:\Python27\lib\site-packages\django\db\models\fields\__init__.py"
> in get_prep_lookup
>   322. return self.get_prep_value(value)
> File "C:\Python27\lib\site-packages\django\db\models\fields\__init__.py"
> in get_prep_value
>   555. return int(value)
>
> Exception Type: TypeError at /save/
> Exception Value: int() argument must be a string or a number, not
> 'SimpleLazyObject'
>
> Please help.
>
>
> On Sat, Jul 13, 2013 at 12:30 AM, Sithembewena Lloyd Dube <
> zebr...@gmail.com> wrote:
>
>> What does the trace information say in your browser (or shell)? The trace
>> should be giving more information - such as, in which line number of which
>> file is the error showing up?.
>>
>>
>> On Fri, Jul 12, 2013 at 8:45 PM, Kakar Arunachal Service <
>> kakararunachalserv...@gmail.com> wrote:
>>
>>> I've got a TypeError:
>>>
>>> int() argument must be a string or a number, not 'SimpleLazyObject'
>>>
>>>
>>> Here's my view:
>>>
>>> def bookmark_save_page(request):
>>> if request.method == 'POST':
>>> fo

Re: 'SimpleLazyObject'

2013-07-12 Thread Kakar Arunachal Service
Here's the traceback info:

Environment:


Request Method: POST
Request URL: http://localhost:8000/save/

Django Version: 1.5.1
Python Version: 2.7.5
Installed Applications:
('django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'bookmarks')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware')


Traceback:
File "C:\Python27\lib\site-packages\django\core\handlers\base.py" in
get_response
  115. response = callback(request, *callback_args,
**callback_kwargs)
File "C:\Users\Kakar\web\django_bookmarks\bookmarks\views.py" in
bookmark_save_page
  63. link = link
File "C:\Python27\lib\site-packages\django\db\models\manager.py" in
get_or_create
  146. return self.get_query_set().get_or_create(**kwargs)
File "C:\Python27\lib\site-packages\django\db\models\query.py" in
get_or_create
  470. return self.get(**lookup), False
File "C:\Python27\lib\site-packages\django\db\models\query.py" in get
  379. clone = self.filter(*args, **kwargs)
File "C:\Python27\lib\site-packages\django\db\models\query.py" in filter
  655. return self._filter_or_exclude(False, *args, **kwargs)
File "C:\Python27\lib\site-packages\django\db\models\query.py" in
_filter_or_exclude
  673. clone.query.add_q(Q(*args, **kwargs))
File "C:\Python27\lib\site-packages\django\db\models\sql\query.py" in add_q
  1266. can_reuse=used_aliases,
force_having=force_having)
File "C:\Python27\lib\site-packages\django\db\models\sql\query.py" in
add_filter
  1197. connector)
File "C:\Python27\lib\site-packages\django\db\models\sql\where.py" in add
  71. value = obj.prepare(lookup_type, value)
File "C:\Python27\lib\site-packages\django\db\models\sql\where.py" in
prepare
  339. return self.field.get_prep_lookup(lookup_type, value)
File "C:\Python27\lib\site-packages\django\db\models\fields\related.py" in
get_prep_lookup
  143. return self._pk_trace(value, 'get_prep_lookup',
lookup_type)
File "C:\Python27\lib\site-packages\django\db\models\fields\related.py" in
_pk_trace
  216. v = getattr(field, prep_func)(lookup_type, v, **kwargs)
File "C:\Python27\lib\site-packages\django\db\models\fields\__init__.py" in
get_prep_lookup
  322. return self.get_prep_value(value)
File "C:\Python27\lib\site-packages\django\db\models\fields\__init__.py" in
get_prep_value
  555. return int(value)

Exception Type: TypeError at /save/
Exception Value: int() argument must be a string or a number, not
'SimpleLazyObject'

Please help.


On Sat, Jul 13, 2013 at 12:30 AM, Sithembewena Lloyd Dube <zebr...@gmail.com
> wrote:

> What does the trace information say in your browser (or shell)? The trace
> should be giving more information - such as, in which line number of which
> file is the error showing up?.
>
>
> On Fri, Jul 12, 2013 at 8:45 PM, Kakar Arunachal Service <
> kakararunachalserv...@gmail.com> wrote:
>
>> I've got a TypeError:
>>
>> int() argument must be a string or a number, not 'SimpleLazyObject'
>>
>>
>> Here's my view:
>>
>> def bookmark_save_page(request):
>> if request.method == 'POST':
>> form = BookmarkSaveForm(request.POST)
>> if form.is_valid():
>> # Create or get link.
>> link, dummy = Link.objects.get_or_create(
>> url=form.cleaned_data['url']
>> )
>> # Create or get bookmarks.
>> bookmark, created = Bookmark.objects.get_or_create(
>> user = request.user,
>> link = link
>> )
>> # Update bookmark title.
>> bookmark.title = form.cleaned_data['title']
>> # If the bookmark is being updated, clear old tag list.
>> if not created:
>> bookmark.tag_set.clear()
>> # Create new tag list.
>> tag_names = form.cleaned_data['tags'].split()
>> for tag_name in tag_names:
>> tag, dummy = Tag.objects.get_or_create(name=tag_name)
>> bookmark.tag_set.add(tag)
>> # Save bookmark to database.
>> bookmark.save()
>> return HttpResponseRedirect(
>> '/us

'SimpleLazyObject'

2013-07-12 Thread Kakar Arunachal Service
I've got a TypeError:

int() argument must be a string or a number, not 'SimpleLazyObject'


Here's my view:

def bookmark_save_page(request):
if request.method == 'POST':
form = BookmarkSaveForm(request.POST)
if form.is_valid():
# Create or get link.
link, dummy = Link.objects.get_or_create(
url=form.cleaned_data['url']
)
# Create or get bookmarks.
bookmark, created = Bookmark.objects.get_or_create(
user = request.user,
link = link
)
# Update bookmark title.
bookmark.title = form.cleaned_data['title']
# If the bookmark is being updated, clear old tag list.
if not created:
bookmark.tag_set.clear()
# Create new tag list.
tag_names = form.cleaned_data['tags'].split()
for tag_name in tag_names:
tag, dummy = Tag.objects.get_or_create(name=tag_name)
bookmark.tag_set.add(tag)
# Save bookmark to database.
bookmark.save()
return HttpResponseRedirect(
'/user/%s/' %request.user.username
)
else:
form = BookmarkSaveForm()

variables = RequestContext(request, {'form': form})
return render_to_response('bookmark_save.html',variables)

I really don't know what's going on here. Please guide me.

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: form.errors

2013-07-12 Thread Kakar Arunachal Service
Okay. Thank you so very much! Just one last question, just to know that i
got it right. So, variables and return are not part of the else clause, and
that they return the errors of the last form post. Did i got it right?


On Fri, Jul 12, 2013 at 8:41 PM, Daniel Roseman wrote:

> On Friday, 12 July 2013 14:27:31 UTC+1, Kakar wrote:
>
>> Okay! That did solved the problem. Thank you! Here's my new view.py:
>>
>> def register_page(request):
>> if request.method == 'POST':
>> form = RegistrationForm(request.POST)
>> if form.is_valid():
>> user = User.objects.create_user(
>> username=form.cleaned_data['**username'],
>> email=form.cleaned_data['**email'],
>> password=form.cleaned_data['**password1']
>> )
>> return HttpResponseRedirect('/**register/success/')
>>
>> else:
>> form = RegistrationForm()
>> variables = RequestContext(request,{
>> 'form':form
>> })
>> return render_to_response('**registration/register.html',**variables)
>>
>> I am just a noob with these things. I understood why the first instance
>> didn't worked, but can u please explain to me about the indentation part
>> (variables and return)? I am little bit puzzled in here. And don't the
>> second 'if' require an else?
>> Thanks again!
>>
>
> Well, presumably you understand that in Python, indentation defines blocks
> for things like if and for. If there's no else clause for an if, Python
> will resume execution at the next line that is indented at the same level
> as the beginning of the if statement. In this case, there isn't one,
> because the surrounding block - ie the first if statement - is complete.
> So, it's going to skip over the else clause belonging to the outer if, and
> carry on at the first line at that level - which now is the one starting
> with `variables`.
>
> The upshot of all this is that if the form is not valid, it will skip
> right down to the bottom and execute those last two lines, which render the
> template with the invalid form, and return it.
> --
> 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 group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: form.errors

2013-07-12 Thread Kakar Arunachal Service
Okay! That did solved the problem. Thank you! Here's my new view.py:

def register_page(request):
if request.method == 'POST':
form = RegistrationForm(request.POST)
if form.is_valid():
user = User.objects.create_user(
username=form.cleaned_data['username'],
email=form.cleaned_data['email'],
password=form.cleaned_data['password1']
)
return HttpResponseRedirect('/register/success/')

else:
form = RegistrationForm()
variables = RequestContext(request,{
'form':form
})
return render_to_response('registration/register.html',variables)

I am just a noob with these things. I understood why the first instance
didn't worked, but can u please explain to me about the indentation part
(variables and return)? I am little bit puzzled in here. And don't the
second 'if' require an else?
Thanks again!


On Fri, Jul 12, 2013 at 2:13 PM, Daniel Roseman wrote:

> On Thursday, 11 July 2013 23:08:25 UTC+1, Kakar wrote:
>
>> Hi,
>> I am learning Django from an old Django version book, and i am stuck with
>> a problem regarding forms. When i render forms, i get the registration
>> right, but if its incorrect, it does not show the error msg in the html. I
>> tried {{form.errors}}, but couldn't fix he problem. Please guide me.
>> Thank you.
>>
>
>
>> 
>>
>> def register_page(request):
>> if request.method == 'POST':
>> form = RegistrationForm(request.POST)
>> if form.is_valid():
>> user = User.objects.create_user(
>> username=form.cleaned_data['**username'],
>> email=form.cleaned_data['**email'],
>> password=form.cleaned_data['**password1']
>> )
>> return HttpResponseRedirect('/**register/success/')
>> else:
>> form = RegistrationForm()
>> variables = RequestContext(request,{
>> 'form':form
>> })
>> return render_to_response('**registration/register.html',**
>> variables)
>> else:
>> form = RegistrationForm()
>> variables = RequestContext(request,{
>> 'form':form
>> })
>> return render_to_response('**registration/register.html',**
>> variables)
>>
>> 
>>
>
> You are re-instantiating the form in the first else clause, if it is not
> valid. That new form instance is empty and therefore doesn't have any
> errors.
>
> You don't actually need that else clause at all: Just move the last two
> lines of the function ('variables' and 'return') back one indent level, and
> execution will fall through to that point if the form is invalid, complete
> with errors.
> --
> 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 group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: form.errors

2013-07-11 Thread Kakar Arunachal Service
Its just displaying form again, but without any errors. Please guide me to
where am missing something.


On Fri, Jul 12, 2013 at 4:34 AM, Kakar Arunachal Service <
kakararunachalserv...@gmail.com> wrote:

> I am sorry, but its still not displaying any errors after it renders.
>
>
> On Fri, Jul 12, 2013 at 3:47 AM, carlos <crocha09...@gmail.com> wrote:
>
>> try this with django 1.5.1
>> from django.shortcuts import render
>>
>> def register_page(request):
>> if request.method == 'POST':
>> form = RegistrationForm(request.POST)
>> if form.is_valid():
>> form.save()
>>
>> return HttpResponseRedirect('/register/success/')
>>  else:
>> form = RegistrationForm()
>>  return render(request, 'registration/register.html', {'form':form})
>>
>> Cheers
>>
>>
>>  On Thu, Jul 11, 2013 at 4:08 PM, Kakar Arunachal Service <
>> kakararunachalserv...@gmail.com> wrote:
>>
>>>  Hi,
>>> I am learning Django from an old Django version book, and i am stuck
>>> with a problem regarding forms. When i render forms, i get the registration
>>> right, but if its incorrect, it does not show the error msg in the html. I
>>> tried {{form.errors}}, but couldn't fix he problem. Please guide me.
>>> Thank you.
>>>
>>> This is my forms.py:
>>>
>>> from django import forms
>>> import re
>>> from django.contrib.auth.models import User
>>> from django.core.exceptions import ObjectDoesNotExist
>>>
>>>
>>> class RegistrationForm(forms.Form):
>>> username = forms.CharField(label='Username', max_length=30)
>>> email = forms.EmailField(label="Email",)
>>> password1 = forms.CharField(
>>> label='Password',
>>> widget=forms.PasswordInput()
>>> )
>>> password2 = forms.CharField(
>>> label = 'Password (Again)',
>>> widget=forms.PasswordInput()
>>> )
>>>
>>> def clean_password2(self):
>>> if 'password1' in self.cleaned_data:
>>> password1 = self.cleaned_data['password1']
>>> password2 = self.cleaned_data['password2']
>>> if password1 == password2:
>>> return password2
>>> raise forms.ValidationError('Password do not match.')
>>>
>>> def clean_username(self):
>>> username = self.cleaned_data['username']
>>> if not re.search(r'^\w+$', username):
>>> raise forms.ValidationError('Username can only contain
>>> alphanumeric characters and the underscore.')
>>> try:
>>> User.objects.get(username=username)
>>> except ObjectDoesNotExist:
>>> return username
>>> raise forms.ValidationError('Username is already taken.')
>>>
>>> def clean_email(self):
>>> if 'email' in self.cleaned_data:
>>> email = self.cleaned_data['email']
>>> try:
>>> User.objects.get(email=email)
>>> except ObjectDoesNotExist:
>>> return email
>>> raise forms.ValidationError('Email is already taken.')
>>>
>>> And this is my views.py:
>>>
>>> def register_page(request):
>>> if request.method == 'POST':
>>> form = RegistrationForm(request.POST)
>>> if form.is_valid():
>>> user = User.objects.create_user(
>>> username=form.cleaned_data['username'],
>>> email=form.cleaned_data['email'],
>>> password=form.cleaned_data['password1']
>>> )
>>> return HttpResponseRedirect('/register/success/')
>>> else:
>>> form = RegistrationForm()
>>> variables = RequestContext(request,{
>>> 'form':form
>>> })
>>> return
>>> render_to_response('registration/register.html',variables)
>>> else:
>>> form = RegistrationForm()
>>> variables = RequestContext(request,{
>>> 'form':form
>>> })
>>> return render_to_response('registration/register.html',variables)
>>>
>>> And my register.html:
>>>
>>> {% extends "base.html"

Re: form.errors

2013-07-11 Thread Kakar Arunachal Service
I am sorry, but its still not displaying any errors after it renders.


On Fri, Jul 12, 2013 at 3:47 AM, carlos <crocha09...@gmail.com> wrote:

> try this with django 1.5.1
> from django.shortcuts import render
>
> def register_page(request):
> if request.method == 'POST':
> form = RegistrationForm(request.POST)
> if form.is_valid():
> form.save()
>
> return HttpResponseRedirect('/register/success/')
>  else:
> form = RegistrationForm()
>  return render(request, 'registration/register.html', {'form':form})
>
> Cheers
>
>
> On Thu, Jul 11, 2013 at 4:08 PM, Kakar Arunachal Service <
> kakararunachalserv...@gmail.com> wrote:
>
>> Hi,
>> I am learning Django from an old Django version book, and i am stuck with
>> a problem regarding forms. When i render forms, i get the registration
>> right, but if its incorrect, it does not show the error msg in the html. I
>> tried {{form.errors}}, but couldn't fix he problem. Please guide me.
>> Thank you.
>>
>> This is my forms.py:
>>
>> from django import forms
>> import re
>> from django.contrib.auth.models import User
>> from django.core.exceptions import ObjectDoesNotExist
>>
>>
>> class RegistrationForm(forms.Form):
>> username = forms.CharField(label='Username', max_length=30)
>> email = forms.EmailField(label="Email",)
>> password1 = forms.CharField(
>> label='Password',
>> widget=forms.PasswordInput()
>> )
>> password2 = forms.CharField(
>> label = 'Password (Again)',
>> widget=forms.PasswordInput()
>> )
>>
>> def clean_password2(self):
>> if 'password1' in self.cleaned_data:
>> password1 = self.cleaned_data['password1']
>> password2 = self.cleaned_data['password2']
>> if password1 == password2:
>> return password2
>> raise forms.ValidationError('Password do not match.')
>>
>> def clean_username(self):
>> username = self.cleaned_data['username']
>> if not re.search(r'^\w+$', username):
>> raise forms.ValidationError('Username can only contain
>> alphanumeric characters and the underscore.')
>> try:
>> User.objects.get(username=username)
>> except ObjectDoesNotExist:
>> return username
>> raise forms.ValidationError('Username is already taken.')
>>
>> def clean_email(self):
>> if 'email' in self.cleaned_data:
>> email = self.cleaned_data['email']
>> try:
>> User.objects.get(email=email)
>> except ObjectDoesNotExist:
>> return email
>> raise forms.ValidationError('Email is already taken.')
>>
>> And this is my views.py:
>>
>> def register_page(request):
>> if request.method == 'POST':
>> form = RegistrationForm(request.POST)
>> if form.is_valid():
>> user = User.objects.create_user(
>> username=form.cleaned_data['username'],
>> email=form.cleaned_data['email'],
>> password=form.cleaned_data['password1']
>> )
>> return HttpResponseRedirect('/register/success/')
>> else:
>> form = RegistrationForm()
>> variables = RequestContext(request,{
>> 'form':form
>> })
>> return
>> render_to_response('registration/register.html',variables)
>> else:
>> form = RegistrationForm()
>> variables = RequestContext(request,{
>> 'form':form
>> })
>> return render_to_response('registration/register.html',variables)
>>
>> And my register.html:
>>
>> {% extends "base.html" %}
>> {% block title %}User Registration{% endblock %}
>> {% block head %}User Registration{% endblock %}
>> {% block content %}
>> 
>> {% csrf_token %}
>> {{form.as_p}}
>> 
>> 
>> {% endblock %}
>>
>> --
>> 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.com.
>> Visit

form.errors

2013-07-11 Thread Kakar Arunachal Service
Hi,
I am learning Django from an old Django version book, and i am stuck with a
problem regarding forms. When i render forms, i get the registration right,
but if its incorrect, it does not show the error msg in the html. I tried
{{form.errors}}, but couldn't fix he problem. Please guide me.
Thank you.

This is my forms.py:

from django import forms
import re
from django.contrib.auth.models import User
from django.core.exceptions import ObjectDoesNotExist


class RegistrationForm(forms.Form):
username = forms.CharField(label='Username', max_length=30)
email = forms.EmailField(label="Email",)
password1 = forms.CharField(
label='Password',
widget=forms.PasswordInput()
)
password2 = forms.CharField(
label = 'Password (Again)',
widget=forms.PasswordInput()
)

def clean_password2(self):
if 'password1' in self.cleaned_data:
password1 = self.cleaned_data['password1']
password2 = self.cleaned_data['password2']
if password1 == password2:
return password2
raise forms.ValidationError('Password do not match.')

def clean_username(self):
username = self.cleaned_data['username']
if not re.search(r'^\w+$', username):
raise forms.ValidationError('Username can only contain
alphanumeric characters and the underscore.')
try:
User.objects.get(username=username)
except ObjectDoesNotExist:
return username
raise forms.ValidationError('Username is already taken.')

def clean_email(self):
if 'email' in self.cleaned_data:
email = self.cleaned_data['email']
try:
User.objects.get(email=email)
except ObjectDoesNotExist:
return email
raise forms.ValidationError('Email is already taken.')

And this is my views.py:

def register_page(request):
if request.method == 'POST':
form = RegistrationForm(request.POST)
if form.is_valid():
user = User.objects.create_user(
username=form.cleaned_data['username'],
email=form.cleaned_data['email'],
password=form.cleaned_data['password1']
)
return HttpResponseRedirect('/register/success/')
else:
form = RegistrationForm()
variables = RequestContext(request,{
'form':form
})
return
render_to_response('registration/register.html',variables)
else:
form = RegistrationForm()
variables = RequestContext(request,{
'form':form
})
return render_to_response('registration/register.html',variables)

And my register.html:

{% extends "base.html" %}
{% block title %}User Registration{% endblock %}
{% block head %}User Registration{% endblock %}
{% block content %}

{% csrf_token %}
{{form.as_p}}


{% endblock %}

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: change buttons or widgets

2013-07-08 Thread Kakar Arunachal Service
Thank you so much That's just what i needed! And while i was searching
for this, i came across this: django-crispy (
http://django-crispy-forms.readthedocs.org/en/1.1.1/index.html). Just
wanted to share!


On Mon, Jul 8, 2013 at 6:48 PM, Derek  wrote:

> Widgets: https://docs.djangoproject.com/en/dev/ref/forms/widgets/
>
> For changing the way buttons look; try Twitter Bootstrap:
> http://twitter.github.io/bootstrap/components.html
>
> --
> 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.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




change buttons or widgets

2013-07-07 Thread Kakar Arunachal Service
Hi,
I think this is too early for me to ask bcoz m still learning the whole web
thig. But i'm just very curious. So my question is, how do i change the
button or widgets if i had to? I'm sorry if i named or termed it in a wrong
way.

Thanks!

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Big Picture?

2013-07-07 Thread Kakar Arunachal Service
True!


On Sun, Jul 7, 2013 at 7:35 PM, Amirouche Boubekki <
amirouche.boube...@gmail.com> wrote:

> Hi,
>
> I have a diagram I call big picture, you might find it useful (see
> attachment).
>
> Anything green is most of the time provided by the framework at least it
> is the case in Django.
>
> Anything gray you have to make a choice for.
>
> Anything blue is your code.
>
> Arrows are kind of inspired snakes I'm not sure of the meaning of each of
> them ;)
>
>
> 2013/7/7 ron 
>
>> I need help with getting the big picture in so far as what Django can
>> help me accomplish.
>
>
> Have a look at Django CMS: mezzanine, djangocms amstrongcms. There is also
> a nice demo of django xadmin.
>
>
>> I need to replace an antiquated online attendance-taking system. My first
>> thought was to just build from scratch using Apache, Python, MySQL,
>> HTML/JavaScript.
>
>
> Sounds like a lot of work (see next answer)
>
>
>> My first stop was researching how to integrate Python and Apache, but
>> that led me down the rabbit hole of programming.
>
>
> Python interface itself with servers using the WSGI protocol, this might
> help. Also there is a framework I'm working 
> on(not tested with Apache but should 
> work) that might give insight on what is
> needed to get a framework up.
>
>
>> I kept running across using "Frameworks". From my reading so far, I can't
>> determine if Django, as a framework, will yeild any advantage over just
>> implementing the standalone bits and pieces.
>
>
> Yes it will provide :)
>
>
>> I'm putting out the word, here on the kist, for direction in this
>> matter. My mail confusion is, does Django ome with its own database, and is
>> this the same type database that I'm referring to to when I mentioned doing
>> this task using the autonomous pieces?
>>
>
> I'm not sure I fully understand what you mean here but I try to answer.
> Django was built from the ground up to contains everything needed to build
> a CMS with. This is not anymore True as-is, since there are now somewhat
> common componenent of a website that are not part of Django but developped
> outside, at least the following are very helpful:
>
> - Django compressor
> - South
> - Django debug toolbar
> - Sentry
> - Django social auth
> - Celery
> - Haystack
> - There are e-commerce django appliations but I have no insight on them
> - Django crispy forms is getting some traction
>
> You don't have to use them, but you might need them, just like Django
> Admin.
>
> And a miriad of other application that can help you in your developpement
> at least to bootstrap your project commonly known as django applications.
> Those are specific to Django, aka. most of the time you can't use them with
> other frameworks. There is different kind of apps, apps that provides user
> features, other that are only technical, some of them also are useful
> goodies (django debug toolbar, django extended choices) etc... all this
> makes developpement and learning easier because most of the time you have
> something to copy or learn from and loads of documentation and people that
> can help.
>
> As far as I'm concerned, I went to (somewhat) autonomous pieces route by
> reusing what is done by others because I want to experiement with a
> somewhat new API (and learn new stuff). Rolling it's own framework is not
> difficult if you reuse pieces from others, but you have to have a good idea
> of what you want to achieve and what your solution will make easier (for a
> specific case?). If you have very specific needs and you know what you are
> doing go explore other frameworks mostly Pyramid which is said to be easy
> to customise and scales well or mini-frameworks which have their community
> too and share ressources among the rest of Python community that said you
> won't always benefit from Django ecosystem. *If you want to get things
> done, Django is an answer.*
>
> Also, I might sound a Django enthusiastic fanboy, but I'm not, I find it's
> has many flows not major flows but still thing could be nicer, more elegant
> et al. and other stuff. In my case the «ecosystem is great» is not
> appealing, most of the time I can handle issues on my own, or adapt stuff
> from a Django solution, but for starter, it's a game changer. Anyway, if I
> want to build something right now, I use Django and it's not only because I
> know it, but also because there is this great ecosystem and also it answers
> most of the requirements I encounter.
>
> another link: https://www.djangopackages.com/
>
> HTH,
>
> Amirouche
>
>  --
> 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.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit 

Re: CSRF verification failed

2013-07-07 Thread Kakar Arunachal Service
Thank you Sanjay!


On Sun, Jul 7, 2013 at 4:08 AM, Sanjay Bhangar <sanjaybhan...@gmail.com>wrote:

> On Sat, Jul 6, 2013 at 9:38 AM, Kakar Arunachal Service <
> kakararunachalserv...@gmail.com> wrote:
>
>> Hello!
>> I am getting CSRF verification failed error, even after i added {%
>> csrf_token %} tag in the html file.
>>
>> Here's my html file:
>>
>> {% extends "base.html" %}
>> {% block title %} User Registration {% endblock %}
>> {% block head %} User Registration {% endblock %}
>> {% block content %}
>> 
>> {% csrf_token %}
>> {{ form.as_p }}
>> 
>> 
>> {% endblock %}
>>
>> and my views.py:
>>
>> def register_page(request):
>> if request.method == 'POST':
>> form = RegisrationForm(request.POST)
>> if form.is_valid():
>> user = User.objects.create_user(
>> username = form.cleaned_data['username'],
>> password = form.cleaned_data['password1'],
>> email = form.cleaned_data['email']
>> )
>> return HttpResponseRedirect('/')
>> else:
>> form = RegisrationForm()
>> variables = RequestContext(request, {
>> 'form': form
>> })
>> return render_to_response('registration/register.html',
>> variables)
>> else:
>> return render_to_response('registration/register.html')
>>
>> else:
>   return render_to_response("registration/register.html",
> RequestContext(request, {})
>
>
>> Where am i doing wrong???
>>
>
> In your outer else statement, you need to return a RequestContext instance
> ..
>
> You could also use the 'render' shortcut:
> from django.shortcuts import render
>
> .
>
> return render(request, "registration/register.html")
>
> Basically, you need to make sure the template has the context created by
> RequestContext, otherwise csrf_token will not be available as a variable on
> the template.
>
> Hope that helps,
> Sanjay
>
>
>
>>
>>  --
>> 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.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>  --
> 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.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




CSRF verification failed

2013-07-06 Thread Kakar Arunachal Service
Hello!
I am getting CSRF verification failed error, even after i added {%
csrf_token %} tag in the html file.

Here's my html file:

{% extends "base.html" %}
{% block title %} User Registration {% endblock %}
{% block head %} User Registration {% endblock %}
{% block content %}

{% csrf_token %}
{{ form.as_p }}


{% endblock %}

and my views.py:

def register_page(request):
if request.method == 'POST':
form = RegisrationForm(request.POST)
if form.is_valid():
user = User.objects.create_user(
username = form.cleaned_data['username'],
password = form.cleaned_data['password1'],
email = form.cleaned_data['email']
)
return HttpResponseRedirect('/')
else:
form = RegisrationForm()
variables = RequestContext(request, {
'form': form
})
return render_to_response('registration/register.html',
variables)
else:
return render_to_response('registration/register.html')

Where am i doing wrong???

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: redirct page

2013-07-06 Thread Kakar Arunachal Service
thank you much! That did solved the problem!


On Sat, Jul 6, 2013 at 7:15 PM, Black9design.com <black9desi...@gmail.com>wrote:

> I noticed in the snippet that you provided that it says "form methon". See
> if that is the issue.
>
> On Jul 6, 2013, at 6:29 AM, Kakar Arunachal Service <
> kakararunachalserv...@gmail.com> wrote:
>
> Hello! Thanks for the correction! But even after the {% csrf_token %} tag
> its not redirecting to the main index page. :(
>
>
> On Sat, Jul 6, 2013 at 6:45 PM, Tomas Ehrlich <tomas.ehrl...@gmail.com>wrote:
>
>> Hi there,
>> you're certaily missing {% csfr_token %} in your form.
>>
>> If it doesn't solve the problem, you need to provide more info and be
>> more specific about your "trouble".
>>
>> Dne Sat, 6 Jul 2013 17:44:04 +0530
>> Kakar Arunachal Service <kakararunachalserv...@gmail.com> napsal(a):
>>
>> > Hi,
>> > I am having trouble with redirecting the login page to index page.
>> Please
>> > guide me.
>> >
>> > Here's the html snippet:
>> > 
>> > User Login
>> > {% if form.errors %}
>> > Your username and password didn't match.
>> > Please try again.
>> > {% endif %}
>> > 
>> > Username:{{
>> form.username
>> > }}
>> > Password:{{
>> form.password
>> > }}
>> > 
>> > 
>> > 
>> > 
>> >
>> > Thanks.
>> >
>>
>> --
>> 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.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>  --
> 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.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
>  --
> 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.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: redirct page

2013-07-06 Thread Kakar Arunachal Service
Hello! Thanks for the correction! But even after the {% csrf_token %} tag
its not redirecting to the main index page. :(


On Sat, Jul 6, 2013 at 6:45 PM, Tomas Ehrlich <tomas.ehrl...@gmail.com>wrote:

> Hi there,
> you're certaily missing {% csfr_token %} in your form.
>
> If it doesn't solve the problem, you need to provide more info and be more
> specific about your "trouble".
>
> Dne Sat, 6 Jul 2013 17:44:04 +0530
> Kakar Arunachal Service <kakararunachalserv...@gmail.com> napsal(a):
>
> > Hi,
> > I am having trouble with redirecting the login page to index page. Please
> > guide me.
> >
> > Here's the html snippet:
> > 
> > User Login
> > {% if form.errors %}
> > Your username and password didn't match.
> > Please try again.
> > {% endif %}
> > 
> > Username:{{
> form.username
> > }}
> > Password:{{
> form.password
> > }}
> > 
> > 
> > 
> > 
> >
> > Thanks.
> >
>
> --
> 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.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




redirct page

2013-07-06 Thread Kakar Arunachal Service
Hi,
I am having trouble with redirecting the login page to index page. Please
guide me.

Here's the html snippet:

User Login
{% if form.errors %}
Your username and password didn't match.
Please try again.
{% endif %}

Username:{{ form.username
}}
Password:{{ form.password
}}





Thanks.

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




model relationship

2013-07-05 Thread Kakar Arunachal Service
Hello,
Please guide me in model relationship. When to use many to many, many to
one, one to one relationships??? I'm all confused.
Thank you.

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




alternate to gunicorn

2013-07-03 Thread Kakar Arunachal Service
Hi,
If i was to use nginx in windows, is ther any alternate to Gunicorn for
windows environment.

Thanks.

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: nginx and apache

2013-07-03 Thread Kakar Arunachal Service
Thanks Rafael!


On Wed, Jul 3, 2013 at 12:08 AM, Rafael E. Ferrero <rafael.ferr...@gmail.com
> wrote:

> https://code.djangoproject.com/wiki/DjangoAndNginx
> http://wiki.nginx.org/DjangoFastCGI
>
> its a start. ;)
>
>
> 2013/7/2 Kakar Arunachal Service <kakararunachalserv...@gmail.com>
>
>> Can you please suggest any good tutorial regarding this. And i'm on
>> windows. :(
>>
>> --
>> 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.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
>
> --
> Rafael E. Ferrero
> Claro: (03562) 15514856
>
> --
> 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.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: nginx and apache

2013-07-02 Thread Kakar Arunachal Service
Can you please suggest any good tutorial regarding this. And i'm on
windows. :(

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: django admin

2013-07-02 Thread Kakar Arunachal Service
Thanks a ton! :D


On Tue, Jul 2, 2013 at 9:13 PM, Deepak Sharma <deeky.sha...@gmail.com>wrote:

> On Tue, Jul 2, 2013 at 9:05 PM, Kakar Arunachal Service
> <kakararunachalserv...@gmail.com> wrote:
> > I am really confused here Can i change the admin url??? Or does it always
> > have to be
> > "www.example.com/admin"   ???
>
>
> Hi,
>
> Yes, you can change this. At the place of www.example.com give your IP
> address or if you are using this on localhost, change same with
> localhost.
>
> --
> Deepak Kumar Sharma
> Blog:
> http://deekysharma.wordpress.com
>
> --
> 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.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: nginx and apache

2013-07-02 Thread Kakar Arunachal Service
Thanks. So, nginx is good for both static and app files too?


On Tue, Jul 2, 2013 at 3:18 AM, Rafael E. Ferrero
<rafael.ferr...@gmail.com>wrote:

> i installed apache, its strong but seems to nginx its more faster... i'll
> planning change to nginx... are some people using nginx for static server
> and apache for app server... others says that nginx with lighttpd its more
> faster (and better for concurrency).
> For now im using only one web-server.
>
> Cheers
>
>
> 2013/7/1 Kakar Arunachal Service <kakararunachalserv...@gmail.com>
>
>> Hi,
>> I am very confused with these two. I know about apache, but not much. And
>> then i came across nginx and that its much faster and easier than apache.
>> Please guide me.
>>
>> --
>> 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.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
>
> --
> Rafael E. Ferrero
> Claro: (03562) 15514856
>
> --
> 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.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




django admin

2013-07-02 Thread Kakar Arunachal Service
Hi!
I am really confused here Can i change the admin url??? Or does it always
have to be
"www.example.com/admin"   ???

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




nginx and apache

2013-07-01 Thread Kakar Arunachal Service
Hi,
I am very confused with these two. I know about apache, but not much. And
then i came across nginx and that its much faster and easier than apache.
Please guide me.

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: What is the best practice to learn Django 1.5?

2013-06-28 Thread Kakar Arunachal Service
For me, Beginning Django E-commerce by James McGaw was very helpful! Hope
this helped you.


On Fri, Jun 28, 2013 at 8:08 PM, Mike Dewhirst wrote:

> On 28/06/2013 11:47pm, Roberto López López wrote:
>
>> Two scoops of django is also a good book https://django.2scoops.org/
>>
>
> +1
>
>
>
>>
>> On 06/28/2013 03:45 PM, Gabriel wrote:
>>
>>>
>>> Hey, you could also try Getting Started With Djangorest, that's a
>>> series of classes in everything you might need to become a Django dev.
>>>
>>> -Gabe
>>>
>>> --
>>> 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+unsubscribe@**googlegroups.com
>>> .
>>> To post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at 
>>> http://groups.google.com/**group/django-users
>>> .
>>> For more options, visit 
>>> https://groups.google.com/**groups/opt_out
>>> .
>>>
>>>
>>>
>>
>>
> --
> 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+unsubscribe@**googlegroups.com
> .
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at 
> http://groups.google.com/**group/django-users
> .
> For more options, visit 
> https://groups.google.com/**groups/opt_out
> .
>
>
>

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




postgresql 64 bit in python 32 bit

2013-06-03 Thread Kakar Arunachal Service
Hi,
I just uninstalled python 64 bit and reinstalled python 32 bit. So i have
postgresql 64 bit in my system. Will it a problem later if i use 32 bit
python in 64 bit postresql?

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: linux or windows

2013-06-01 Thread Kakar Arunachal Service
Thanks!


On Sat, Jun 1, 2013 at 9:04 PM, Artem Zinoviev  wrote:

> Django is a python. And nothing more... if you want be a python developer
> linux is must have. Of course you can develop in windows and play with you
> code some times... But a lot of python package don`t work in windows. if
> you want meet new problem every day - windows is your choice :)
>
> пятница, 31 мая 2013 г., 14:11:23 UTC+3 пользователь Kakar написал:
>
>> Hi!
>> I know this question is one absurd question, but just out of curiosity,
>> is it important to use linux other than the windows, related to django.
>> Cause i'm in windows, and if it is, then i was thinking to use Ubuntu.
>> Please advise.
>>
>  --
> 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.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: linux or windows

2013-05-31 Thread Kakar Arunachal Service
Thanks! Learned many things!


On Fri, May 31, 2013 at 6:57 PM, Javier Guerra Giraldez
wrote:

> On Fri, May 31, 2013 at 7:55 AM, Mike Dewhirst 
> wrote:
> > I don't know of anyone voluntarily using Windows as a Django production
> > server platform.
>
>
> not sure if it counts as "voluntarily", but if you _have_ to use MS
> SQL Server, the DB client options on Linux aren't getting any better,
> so soon the best option will be to put the appserver on windows too.
>
> so it seems a very good reason to avoid MS SQL Server.  it's sad,
> since that was by far the best server product from MS.  Fortunately,
> the other big DBs (PostgeSQL, DB2, Oracle) count Linux frienship as a
> core strategy
>
>
> --
> Javier
>
> --
> 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.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: linux or windows

2013-05-31 Thread Kakar Arunachal Service
Ok! Thank u so much!

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: linux or windows

2013-05-31 Thread Kakar Arunachal Service
ok thanks!


On Fri, May 31, 2013 at 5:07 PM, Huy T <huyslo...@gmail.com> wrote:

> Without regarding any other topics, you will find more information dealing
> with *nix and django/python versus a Windows environment. So from an
> information perspective, you'd be doing yourself a disservice if you
> weren't familiar with a unix/linux flavor (not saying you aren't).
>
> Also, security is better historically (may have to check on that one.)
>
>
> On Fri, May 31, 2013 at 7:26 AM, Kakar Arunachal Service <
> kakararunachalserv...@gmail.com> wrote:
>
>> thanks!! So, for the production purpose, one must use linux?
>>
>>
>> On Fri, May 31, 2013 at 4:49 PM, Avraham Serour <tovm...@gmail.com>wrote:
>>
>>> for development purposes it shouldn't make a difference, on your server
>>> I believe ubuntu would be a better choice than windows
>>> on the other hand if your server is ubuntu some might choose to use it
>>> for development also, to be as close as possible to the production
>>> environment
>>>
>>>
>>> On Fri, May 31, 2013 at 2:15 PM, Jonas Geiregat <jo...@geiregat.org>wrote:
>>>
>>>>
>>>> On 31 May 2013, at 13:11, Kakar Arunachal Service wrote:
>>>>
>>>> > Hi!
>>>> > I know this question is one absurd question, but just out of
>>>> curiosity, is it important to use linux other than the windows, related to
>>>> django. Cause i'm in windows, and if it is, then i was thinking to use
>>>> Ubuntu. Please advise.
>>>>
>>>> The platform is unimportant, if you feel at home in windows then use
>>>> windows else use whatever you like as long as it is supported by django.
>>>>
>>>> On a UNIX based system, you could perfectly run/debug django, without
>>>> touching anything like a shell, inside your IDE of choice .
>>>>
>>>> --
>>>> 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.com.
>>>> Visit this group at http://groups.google.com/group/django-users?hl=en.
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>
>>>>
>>>>
>>>  --
>>> 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.com.
>>> Visit this group at http://groups.google.com/group/django-users?hl=en.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>>
>>>
>>
>>  --
>> 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.com.
>> Visit this group at http://groups.google.com/group/django-users?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>  --
> 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.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: linux or windows

2013-05-31 Thread Kakar Arunachal Service
thanks!! So, for the production purpose, one must use linux?


On Fri, May 31, 2013 at 4:49 PM, Avraham Serour <tovm...@gmail.com> wrote:

> for development purposes it shouldn't make a difference, on your server I
> believe ubuntu would be a better choice than windows
> on the other hand if your server is ubuntu some might choose to use it for
> development also, to be as close as possible to the production environment
>
>
> On Fri, May 31, 2013 at 2:15 PM, Jonas Geiregat <jo...@geiregat.org>wrote:
>
>>
>> On 31 May 2013, at 13:11, Kakar Arunachal Service wrote:
>>
>> > Hi!
>> > I know this question is one absurd question, but just out of curiosity,
>> is it important to use linux other than the windows, related to django.
>> Cause i'm in windows, and if it is, then i was thinking to use Ubuntu.
>> Please advise.
>>
>> The platform is unimportant, if you feel at home in windows then use
>> windows else use whatever you like as long as it is supported by django.
>>
>> On a UNIX based system, you could perfectly run/debug django, without
>> touching anything like a shell, inside your IDE of choice .
>>
>> --
>> 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.com.
>> Visit this group at http://groups.google.com/group/django-users?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>  --
> 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.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




linux or windows

2013-05-31 Thread Kakar Arunachal Service
Hi!
I know this question is one absurd question, but just out of curiosity, is
it important to use linux other than the windows, related to django. Cause
i'm in windows, and if it is, then i was thinking to use Ubuntu. Please
advise.

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: view data tables?

2013-05-30 Thread Kakar Arunachal Service
thanks It worked pretty well!


On Sun, May 26, 2013 at 6:47 AM, Drew Ferguson <d...@afccommercial.co.uk>wrote:

> On Sun, 26 May 2013 06:14:11 +0530
> Kakar Arunachal Service <kakararunachalserv...@gmail.com> wrote:
>
> > Sad, i'm on windows! So, can u tell me how to view the tables that i
> > created after syncdb django in pg admin3, there were so many tables. M
> > sorry, m jst a begginer. I dont understand much.
>
> So you are using Postgres and pgadmin3; below applies to all
> databases
>
> the tables you are interested in are
>
> django_* tables for the admin site
> auth_* tables for django user/group authentication
> _ tables for models you have defined
>
> Tables created from your model classes in models.py are named using your
> application name followed by the model name.
> If your application is called "my_app" and you define a model "my_model"
> then the table in the database will be
>
> my_app_my_model
>
> unless you over-ride it
>
> see also
> https://docs.djangoproject.com/en/1.5/ref/models/options/#table-names
>
>
> >
> >
> > On Sun, May 26, 2013 at 5:51 AM, Drew Ferguson
> > <d...@afccommercial.co.uk>wrote:
> >
> > > On Sun, 26 May 2013 05:23:08 +0530
> > > Kakar Arunachal Service <kakararunachalserv...@gmail.com> wrote:
> > >
> > > > Hi, how to view the tables in pg admin for postgresql database, or in
> > > > workbench for mysql db.?? Like there's sqlite databse browser for
> > > > sqlite3. Any other GUI maybe?
> > > >
> > >
> > > Is this what you are looking for?
> > >
> > >
> > >
> http://stackoverflow.com/questions/835069/which-sqlite-administration-console-do-you-recommend
> > >
> > > On my Linux system, sqliteman gets the billing
> > >
> > > "The best developer's and/or admin's GUI tool for Sqlite3 in the world"
> > >
> > > someone thinks it is good. I wouldn't know
> > > --
> > > Drew Ferguson
> > >
> > > --
> > > 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.com.
> > > Visit this group at http://groups.google.com/group/django-users?hl=en.
> > > For more options, visit https://groups.google.com/groups/opt_out.
> > >
> > >
> > >
> >
>
>
>
> --
> Drew Ferguson
>
> --
> 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.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: view data tables?

2013-05-25 Thread Kakar Arunachal Service
Sad, i'm on windows! So, can u tell me how to view the tables that i
created after syncdb django in pg admin3, there were so many tables. M
sorry, m jst a begginer. I dont understand much.


On Sun, May 26, 2013 at 5:51 AM, Drew Ferguson <d...@afccommercial.co.uk>wrote:

> On Sun, 26 May 2013 05:23:08 +0530
> Kakar Arunachal Service <kakararunachalserv...@gmail.com> wrote:
>
> > Hi, how to view the tables in pg admin for postgresql database, or in
> > workbench for mysql db.?? Like there's sqlite databse browser for
> > sqlite3. Any other GUI maybe?
> >
>
> Is this what you are looking for?
>
>
> http://stackoverflow.com/questions/835069/which-sqlite-administration-console-do-you-recommend
>
> On my Linux system, sqliteman gets the billing
>
> "The best developer's and/or admin's GUI tool for Sqlite3 in the world"
>
> someone thinks it is good. I wouldn't know
> --
> Drew Ferguson
>
> --
> 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.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




view data tables?

2013-05-25 Thread Kakar Arunachal Service
Hi, how to view the tables in pg admin for postgresql database, or in
workbench for mysql db.?? Like there's sqlite databse browser for sqlite3.
Any other GUI maybe?

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




theme generator

2013-05-21 Thread Kakar Arunachal Service
Hi!
Is there any kind of theme generator or css generator for django?

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




postgresql

2013-05-20 Thread Kakar Arunachal Service
hi guyz!
I'm new to django and python, and very new to postgresql. Can u suggest any
books or tutorial for postgresql???

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: no module name.models

2013-05-19 Thread Kakar Arunachal Service
Thanks! But i gt d solution, i just had to import catalog.models, as it was
in my project folder. Thanks by d way!

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: no module name erro

2013-05-18 Thread Kakar Arunachal Service
Ok i got d solution for ProductAdmin not in the form problem. But thanks
again!

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: no module name error

2013-05-18 Thread Kakar Arunachal Service
And by the way thanks for being patience with me!

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: no module name error

2013-05-18 Thread Kakar Arunachal Service
Ok i removed ecomstore from,
from ecomstore.catalog.models import Product, Category
to
from catalog.models import Product, Category
And i think it worked fine. But now again it gives an error:
ImproperlyConfigured at/catalog - 'ProductAdmin.exclude' refers to field
'created_at' that is missing from the 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...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: no module name error

2013-05-18 Thread Kakar Arunachal Service
The directory is as follows:
ecomstore
--manage.py
--ecomstore
  __init__.py
 settings.py
 urls.py
 wsgi.py
--preview
 __init__.py
 models.py
 views.py
 test.py
--templates
 --tags
   navigation.html
 base.html
 catalog.html
 index.html
--static
 css.css
--catalog
 __init__.py
 admin.py
 forms.py
 models.py
 tests.py
 views.py

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: no module name error

2013-05-18 Thread Kakar Arunachal Service
ecomstore is the project name. And within it, it has another ecomstore,
which has the __init__.py, settings.py, urls.py and wsgi.py. And yes
catalog too has the __init__.py file in it, as it was created by the
startapp command. The error says, import error: no module named
catalog.models in admin.py line 2, which is, from ecomstore.catalog.models
import Category Product.

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: no module name error

2013-05-18 Thread Kakar Arunachal Service
Oh..m sorry. I mistyped, it was not django.ecomstore.catalog.models, but
just, ecomstore.catalog.models import Category, Product. N in the catalog
dir, it has __init__.py file, so should have done the problem. N m using
sqlite3 so i dnt need adapters too. Pls help.

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




no module name error

2013-05-18 Thread Kakar Arunachal Service
I'm practicing from a book Begining django e-commerce and m stuck in one
place. My project name is ecomstore, and in it i have two app, one is
preview and the other is catalog. In my preview app, there's just html in
the templates dir, and thats not the problem, because the result was fine
when i ran the server. And then i made a new app, catalog. It has two
models, Category and Product. Then to register it with the admin, i made
one admin.py file. And there i imported those two module by:
from django.contrib import admin
from django.ecomstore.catalog.models import Category, Product
...and some other forms related import.
Then when i run the server, i get an Import error: No module named
catalog.models.
I have installed my app in settings.py.  Hope u guys could solve my problem.

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




no module name.models

2013-05-18 Thread Kakar Arunachal Service
I'm practicing from a book Begining django e-commerce and m stuck in one
place. My project name is ecomstore, and in it i have two app, one is
preview and the other is catalog. In my preview app, there's just html in
the templates dir, and thats not the problem, because the result was fine
when i ran the server. And then i made a new app, catalog. It has two
models, Category and Product. Then to register it with the admin, i made
one admin.py file. And there i imported those two module by:
from django.contrib import admin
from django.ecomstore.catalog.models import Category, Product
...and some other forms related import.
Then when i run the server, i get an Import error: No module named
catalog.models.
I have installed my app in settings.py.  Hope u guys could solve my problem.

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Accessing django development server using internet

2013-05-07 Thread Kakar Arunachal Service
Sorry, i'm on win 7.


On Tue, May 7, 2013 at 9:30 PM, Shawn Milochik  wrote:

> pip install gunicorn, then run python manage.py run_gunicorn instead of
> runserver.
>
> Ensure that the port you're running your app on is being handled properly
> by your Web server app (nginx or Apache). This means that hits to your URL
> hit the Web server and are being directed internally at your listening port.
>
>  --
> 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.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Accessing django development server from internet!

2013-05-07 Thread Kakar Arunachal Service
Thank you for your reply! But coud you pls explain in detail how to make it
available over the internet. And i dont have a router, m running it on my
laptop. Pls advise.


On Tue, May 7, 2013 at 11:10 PM, Nikolas Stevenson-Molnar <
nik.mol...@consbio.org> wrote:

>  Keep in mind that the Django development server is designed neither for
> security nor performance, so under no circumstances should you use it as a
> production server. With that said, assuming you're using this for* 
> *development
> purposes, change your manage.py runserver command to bind to the address
> 0.0.0.0. E.g:
>
> $ python manage.py runserver 0.0.0.0
>
> This should make is available to your local network (if not, you may need
> to add the machines your accessing it from to your INTERNAL_IPS setting).
> To make it available over the internet (*not suggested!)* you'll need to
> configure your router.
>
> _Nik
>
>
> On 5/7/2013 8:43 AM, Kakar wrote:
>
> I have my project in my pc, and on python manage.py runserver, i can view it 
> on my browser. But how to view from other computer or on the internet and not 
> locally?... How to make my pc a server to view it from over the internet? Plz 
> help me guyz!
>
>
>
>  --
> 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.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Is it possible to create website like Squarespace or Wix in django?

2013-04-20 Thread Kakar Arunachal Service
Thank u so much! Now i know django is my way to go.


On Sun, Apr 21, 2013 at 10:28 AM, Shawn Milochik  wrote:

> I don't think there's any kind of site you *can't* make with Django. It's
> a Web framework, not a CMS.
>
> It's definitely possible (and trivial) to offer a wide variety of
> templates. It's also possible to allow a user to customize and save a
> template, but that comes with a whole host of security risks you'll have to
> consider.
>
> The CSS is a slightly different matter, as Django is not in the business
> of serving static content. However, if you're already customizing HTML
> templates you can customize some CSS there. For that matter, you could
> allow them to change the CSS link in the template to one of many choices
> you provide, or to their own server/CDN. Again, that's probably a bad idea
> for various security reasons, although technically possible.
>
>
>
>
>  --
> 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.com.
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Hello Django Warriors!

2012-07-17 Thread Kakar Arunachal Service
On Sun, Jul 15, 2012 at 2:56 AM, Timothy Makobu  wrote:

> Django Warr  LOL!
>
> Have a look at Pinax http://pinaxproject.com/
>
>
> On Sun, Jul 15, 2012 at 5:18 AM, Kurtis Mullins 
> wrote:
>
>> On Sat, Jul 14, 2012 at 4:44 PM, Kakar 
>>
>> I'm very new to this Phyton and i just downloaded django package. What i
>>> wanted to ask was,..can i make a social site where the users itself can
>>> customize their themes or the layout???
>>> M a vey newbie in programming so please explain me in detail. Thank you.
>>>
>>> Hey,
>>
>> Welcome to Python and Django! Of course you can. I'd suggest starting
>> with the Django Tutorial to understand the framework and of course learning
>> a bit about the Python programming language before jumping into a task that
>> large.
>>
>> For an example site that provides this functionality (still a work in
>> progress), check out fireflie.com. You have to register to see the
>> functionality but feel free to ignore the subscription after 8 days --
>> unless you're a musician and want to actually use the site.
>>
>> (Disclaimer: I am the lead developer of fireflie.com, my intention is
>> not to advertise here but to show you one example of a site providing this
>> functionality with Python/Django as a back-end. If you do give it a try and
>> don't actually intend on using fireflie.com for its intended purpose,
>> please send in a Account Removal request after you've finished checking it
>> out.)
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
Thanks guys!!! N Kurtis, ur site is gr8! Specially coz m a music lover too!
But i want to add one more question, what if the users itself want to
change its background! I mean the whole theme (the header, and the
background) too? I think i cleared u ri8? Pls ask me if you ddnt
understood. Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.