Re: How to make a field required in admin site

2013-01-30 Thread Black9design.com
Remove the line blank=True and it will be required.

On Jan 30, 2013, at 7:01 AM, Ariel Isaac  wrote:

> Hi everybody,
> 
> I have a model inherited from a third application call Video in that
> model they have the thumbnail field with blank = True, this make in
> the admin site that user could left in blank the thumbnail field,
> that's something I don't want to happen, I want to make in the
> admin.py in VideoAdmin the field thumbnail required, how is possible
> that ??? anybody knows how to achieve that ???
> 
> I am working with django 1.3
> 
> Regards,
> Ariel
> 
> -- 
> 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: plz help me i have checked many time but i could not find error place.....

2013-02-06 Thread Black9design.com
Depending on your project structure You may want to try adding the project name 
before polls_poll such as.  Project_name_polls_poll.

I hope that helps.

Parker

On Feb 6, 2013, at 5:22 AM, Avnesh Shakya  wrote:

> 
> I have checked many time, even i have deleted my project n i have created new 
> project again and create new model but error is occurred again n again.. i m 
> beginner so plz help me
> 
> C:\mysite>python manage.py shell
> Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on 
> win32
> Type "help", "copyright", "credits" or "license" for more information.
> (InteractiveConsole)
> >>> from polls.models import Poll,Choice
> >>> Poll.objects.all()
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "C:\Python27\lib\site-packages\django\db\models\query.py", line 72, in 
> __repr__
> data = list(self[:REPR_OUTPUT_SIZE + 1])
>   File "C:\Python27\lib\site-packages\django\db\models\query.py", line 87, in 
> __len__
> self._result_cache.extend(self._iter)
>   File "C:\Python27\lib\site-packages\django\db\models\query.py", line 291, 
> in iterator
> for row in compiler.results_iter():
>   File "C:\Python27\lib\site-packages\django\db\models\sql\compiler.py", line 
> 763, in results_iter
> for rows in self.execute_sql(MULTI):
>   File "C:\Python27\lib\site-packages\django\db\models\sql\compiler.py", line 
> 818, in execute_sql
> cursor.execute(sql, params)
>   File "C:\Python27\lib\site-packages\django\db\backends\util.py", line 40, 
> in execute
> return self.cursor.execute(sql, params)
>   File "C:\Python27\lib\site-packages\django\db\backends\sqlite3\base.py", 
> line 344, in execute
> return Database.Cursor.execute(self, query, params)
> DatabaseError: no such table: polls_poll
> >>>
> -- 
> 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: redirct page

2013-07-06 Thread Black9design.com
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 
 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  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  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.