Comments (5)
Not sure why a bunch didn't get short urls but did return 404.
Might switch to 500 and try again and see.
from stumpy.
\nEnvironment:\n\n\nRequest Method: GET\nRequest URL: http://192.168.11.4:8001/url/https://www.amazon.com/gp/dmusic/mp3/player#latestPurchases/\n\nDjango Version: 1.3 SVN-16009\nPython Version: 2.6.5\nInstalled Applications:\n['django.contrib.auth',\n 'django.contrib.contenttypes',\n 'django.contrib.sessions',\n 'django.contrib.sites',\n 'django.contrib.messages',\n 'django.contrib.staticfiles',\n 'django.contrib.admin',\n 'django.contrib.admindocs',\n 'shortener']\nInstalled Middleware:\n('django.middleware.common.CommonMiddleware',\n 'django.contrib.sessions.middleware.SessionMiddleware',\n 'django.middleware.csrf.CsrfViewMiddleware',\n 'django.contrib.auth.middleware.AuthenticationMiddleware',\n 'django.contrib.messages.middleware.MessageMiddleware')\n\n\nTraceback:\nFile "/home/mugen/programming/django/django/core/handlers/base.py" in get_response\n 111. response = callback(request, _callback_args, *_callback_kwargs)\nFile "/home/mugen/programming/Stumpy/shortener/views.py" in submit\n 55. \t\tc.save()\nFile "/home/mugen/programming/Stumpy/shortener/models.py" in save\n 29. \t\t\tself.createShortURL()\nFile "/home/mugen/programming/Stumpy/shortener/models.py" in createShortURL\n 16. \t\tstumps.objects.filter(id=theid).update(shorturl=theshorty)\nFile "/home/mugen/programming/django/django/db/models/query.py" in update\n 465. rows = query.get_compiler(self.db).execute_sql(None)\nFile "/home/mugen/programming/django/django/db/models/sql/compiler.py" in execute_sql\n 869. cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)\nFile "/home/mugen/programming/django/django/db/models/sql/compiler.py" in execute_sql\n 735. cursor.execute(sql, params)\nFile "/home/mugen/programming/django/django/db/backends/util.py" in execute\n 34. return self.cursor.execute(sql, params)\nFile "/home/mugen/programming/django/django/db/backends/mysql/base.py" in execute\n 86. return self.cursor.execute(query, args)\nFile "/usr/lib/pymodules/python2.6/MySQLdb/cursors.py" in execute\n 166. self.errorhandler(self, exc, value)\nFile "/usr/lib/pymodules/python2.6/MySQLdb/connections.py" in defaulterrorhandler\n 35. raise errorclass, errorvalue\n\nException Type: IntegrityError at /url/https://www.amazon.com/gp/dmusic/mp3/player#latestPurchases/\nException Value: (1062, "Duplicate entry '1V' for key 'shorturl'")\n
from stumpy.
I THINK
it's seeing a as the same as A in the short url column (which has a unique tag on it) and isn't letting it in.
from stumpy.
Yes...
for the shorturl column, if it has 'unique=True' it will see 'a' and 'A' as the same thing (which is not for our base62 scheme) and so won't add.
Taking out out 'unique=True' from the shorturl column fixed it.
We still have 'unique=True' on the hashurl column and should be catching any dupes.
from stumpy.
must use urllib.quote_plus(url) to properly feed in urls or a bunch break
from stumpy.
Related Issues (20)
- self stump HOT 2
- hardcoded urls HOT 1
- rewrite base62 as class sets HOT 1
- hash url and admin interface HOT 1
- @login_required HOT 2
- urls.py regex HOT 5
- dupe submit HOT 2
- branches - public vs dev
- key generation HOT 1
- weird stripping in request data (http://google.com -> http:/google.com) HOT 1
- no protocol specific links break redirect() HOT 2
- bookmarklet size
- login next url query string issue HOT 1
- some short url lookups broken HOT 1
- admin clickable link
- URL submit from main page
- Show User Stumps on Main Page HOT 1
- clipboard feature now working within iframe bookmarklet HOT 1
- Switch to using query string submission rather than url parsing HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from stumpy.