Okay I figured that part out now by editing the correct URLS.py file as I 
was using the one in the app package as opposed to the root level sute 
url.py,

When I go to submit the text info in the form now I receive the following 
error. 

IntegrityError at /get_barcode.html

(1048, "Column 'pub_date' cannot be null")

Request Method:POSTRequest URL:http://127.0.0.1:8000/get_barcode.htmlDjango 
Version:1.7Exception Type:IntegrityErrorException Value:

(1048, "Column 'pub_date' cannot be null")

Exception 
Location:c:\users\win7va~1\appdata\local\temp\easy_install-kwxg3e\MySQL_python-1.2.5-py2.7-win32.egg.tmp\MySQLdb\connections.py
 
in defaulterrorhandler, line 36Python Executable:C:\Python27\python.exePython 
Version:2.7.8Python Path:

['C:\\hwdb\\mysite',
 'C:\\Python27\\lib\\site-packages\\setuptools-5.7-py2.7.egg',
 'C:\\Python27\\lib\\site-packages\\mysql_python-1.2.5-py2.7-win32.egg',
 'C:\\windows\\system32\\python27.zip',
 'C:\\Python27\\DLLs',
 'C:\\Python27\\lib',
 'C:\\Python27\\lib\\plat-win',
 'C:\\Python27\\lib\\lib-tk',
 'C:\\Python27',
 'C:\\Python27\\lib\\site-packages']

Server time:Thu, 16 Oct 2014 13:46:37 -0700
Traceback Switch to copy-and-paste view 
<http://127.0.0.1:8000/get_barcode.html#>

   - C:\Python27\lib\site-packages\django\core\handlers\base.py in 
   get_response
   1. 
      
                          response = wrapped_callback(request, *callback_args, 
**callback_kwargs)
      
      ...
   ▶ Local vars <http://127.0.0.1:8000/get_barcode.html#>
   - C:\hwdb\mysite\oneidentry\views.py in get_barcode
   1. 
      
                        the_new_entry = form.save()
      
      ...
   ▶ Local vars <http://127.0.0.1:8000/get_barcode.html#>
   - C:\Python27\lib\site-packages\django\forms\models.py in save
   1. 
      
                                   construct=False)
      
      ...
   ▶ Local vars <http://127.0.0.1:8000/get_barcode.html#>
   - C:\Python27\lib\site-packages\django\forms\models.py in save_instance
   1. 
      
              instance.save()
      
      ...
   ▶ Local vars <http://127.0.0.1:8000/get_barcode.html#>
   - C:\Python27\lib\site-packages\django\db\models\base.py in save
   1. 
      
                             force_update=force_update, 
update_fields=update_fields)
      
      ...
   ▶ Local vars <http://127.0.0.1:8000/get_barcode.html#>
   - C:\Python27\lib\site-packages\django\db\models\base.py in save_base
   1. 
      
                  updated = self._save_table(raw, cls, force_insert, 
force_update, using, update_fields)
      
      ...
   ▶ Local vars <http://127.0.0.1:8000/get_barcode.html#>
   - C:\Python27\lib\site-packages\django\db\models\base.py in _save_table
   1. 
      
                  result = self._do_insert(cls._base_manager, using, fields, 
update_pk, raw)
      
      ...
   ▶ Local vars <http://127.0.0.1:8000/get_barcode.html#>
   - C:\Python27\lib\site-packages\django\db\models\base.py in _do_insert
   1. 
      
                                     using=using, raw=raw)
      
      ...
   ▶ Local vars <http://127.0.0.1:8000/get_barcode.html#>
   - C:\Python27\lib\site-packages\django\db\models\manager.py in 
   manager_method
   1. 
      
                      return getattr(self.get_queryset(), name)(*args, **kwargs)
      
      ...
   ▶ Local vars <http://127.0.0.1:8000/get_barcode.html#>
   - C:\Python27\lib\site-packages\django\db\models\query.py in _insert
   1. 
      
              return query.get_compiler(using=using).execute_sql(return_id)
      
      ...
   ▶ Local vars <http://127.0.0.1:8000/get_barcode.html#>
   - C:\Python27\lib\site-packages\django\db\models\sql\compiler.py in 
   execute_sql
   1. 
      
                      cursor.execute(sql, params)
      
      ...
   ▶ Local vars <http://127.0.0.1:8000/get_barcode.html#>
   - C:\Python27\lib\site-packages\django\db\backends\utils.py in execute
   1. 
      
                  return super(CursorDebugWrapper, self).execute(sql, params)
      
      ...
   ▶ Local vars <http://127.0.0.1:8000/get_barcode.html#>
   - C:\Python27\lib\site-packages\django\db\backends\utils.py in execute
   1. 
      
                      return self.cursor.execute(sql, params)
      
      ...
   ▶ Local vars <http://127.0.0.1:8000/get_barcode.html#>
   - C:\Python27\lib\site-packages\django\db\backends\mysql\base.py in 
   execute
   1. 
      
                      six.reraise(utils.IntegrityError, 
utils.IntegrityError(*tuple(e.args)), sys.exc_info()[2])
      
      ...
   ▶ Local vars <http://127.0.0.1:8000/get_barcode.html#>
   - C:\Python27\lib\site-packages\django\db\backends\mysql\base.py in 
   execute
   1. 
      
                  return self.cursor.execute(query, args)
      
      ...
   ▶ Local vars <http://127.0.0.1:8000/get_barcode.html#>
   - 
   
c:\users\win7va~1\appdata\local\temp\easy_install-kwxg3e\MySQL_python-1.2.5-py2.7-win32.egg.tmp\MySQLdb\cursors.py
    in execute
   1. 
      
                  self.errorhandler(self, exc, value)
      
      ...
   ▶ Local vars <http://127.0.0.1:8000/get_barcode.html#>
   - 
   
c:\users\win7va~1\appdata\local\temp\easy_install-kwxg3e\MySQL_python-1.2.5-py2.7-win32.egg.tmp\MySQLdb\connections.py
    in defaulterrorhandler
   1. 
      
          raise errorclass, errorvalue
      
      ...
   ▶ Local vars <http://127.0.0.1:8000/get_barcode.html#>
   


I do not remember adding this requirement so how can I add that as part of 
the form entry?

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/43500ce4-397b-44b6-b69a-75150bb21cd6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to