flashjames / stylematch Goto Github PK
View Code? Open in Web Editor NEWStylematch ProjectX
Home Page: stylematch.se
Stylematch ProjectX
Home Page: stylematch.se
When updating an already existing service, button text 'Lägg till' becomes 'Redigera', which is OK but when there is an error in form while editing it turns back to 'Lägg till', even though you are still editing the service.
Verktyget att göra nya inbjudningnskoder fungerar inte. Vi får tills vidare köra på koden "permanent1" men då missar man poängen att frisörerna känner sig utvalda när de får en egen inbjudningskod.
When the order of a service and a image (on edit services and edit images, admin ui) we currently send back the whole object. Even if it's only the order that have changed.
The change would be in how Backbone handle model changes.
Possible solution here: http://simple10.com/save-only-changed-attributes-in-backbone-js/
Implementing this should save us some datatransfers.
We could also add a delay between the saves. Or a save button.
Should also check which fields from the Django model that are sent to the client, which of them do we use?
Service.js - had forgot to add 'var' in front of some variables.
Picture.js -
It only worked when debugger was open - http://stackoverflow.com/questions/7742781/ie9-bug-javascript-only-works-after-opening-developer-tools-once-very-stran
had to remove all console.log(), that was in the code.
"It sounds like you might have some debugging code in your javascript.
The experience you're describing is typical of code which contain console.log() or any of the other console functionality.
The console object is only activated when the Dev Toolbar is opened."
There was also one more problem, it cached the GET request for all images -> didnt display recently added images.
http://stackoverflow.com/questions/6178366/backbone-js-fetch-results-cached
Solved by:
$.ajaxSetup({
cache: false
});
In top of file.
Solved in commit:
48f8fdee380d64ee2725ac2f5faff0c9af763027
service.js:
When you are editing an already existing service and there is an error with the new values, the button text turns into "Lägg till" but should still be "Redigera".
/p/username doesn't work when nog logged in. You get an error looking like this:
Page not found (404)
Request Method: GET
Request URL: http://localhost:8000/p/hannabergstrom
I get this:
(Pdb) form._errors
{'file': [u'Upload a valid image. The file you uploaded was either not an image or a corrupted image.']}
When trying to upload an image trough image upload interface.
The file: ac27c5cd-6c5_138019_200x200.jpg
When you try to move a image to the last position in a row, it doesnt want to move there (sometimes). Until you move the image around a bit on the page.
Steps to repoduce
-> Sometimes element 4 doesnt reorient as it should (web browser, Chrome)
It's easier to repoduce if:
$(this.el).sortable({
grid: [50, 20]
});
It works fine on the jquery UI demo page, but havent succeeded to understand why it doesnt work on our page.
Implemented with:
http://jqueryui.com/demos/sortable/#display-grid
More people seem to have had this problem, for example here:
http://bugs.jqueryui.com/ticket/6702
Suggestion
Post a bug report at http://bugs.jqueryui.com/
Or try to heighten the sensitivty, so it tries to move the item earlier.
If this hack isnt used, you will get the error "NotImplementedError: This backend doesn't support absolute paths." when trying to delete/edit a image on http://www.stylematch.se:8000/p/edit-images. Same error on services page.
To make it work I implemented a fast hack in index/storages.py
The problem is that the path() method isnt implemented on a File object that's not local (we use Amazon S3 with django-storage). The problem seems to be with Django-tastypie, it calls Path() and expects a certain kind of object to be returned.
More people seem to have had the same problem:
http://blog.hardlycode.com/solving-django-storage-notimplementederror-2011-01/
When executing setup_project.py on the amazon server (ubuntu server), I'm disconnected from the ssh connection.
This happens because "exit" is called in the start.
reset_database.sh
It raises:
Traceback (most recent call last):
File "./manage.py", line 14, in <module>
execute_manager(settings)
File "/home/proxz/ProjectX/projectx/lib/python2.6/site-packages/django/core/management/__init__.py", line 438, in execute_manager
utility.execute()
File "/home/proxz/ProjectX/projectx/lib/python2.6/site-packages/django/core/management/__init__.py", line 379, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/proxz/ProjectX/projectx/lib/python2.6/site-packages/django/core/management/base.py", line 191, in run_from_argv
self.execute(*args, **options.__dict__)
File "/home/proxz/ProjectX/projectx/lib/python2.6/site-packages/django/core/management/base.py", line 220, in execute
output = self.handle(*args, **options)
File "/home/proxz/ProjectX/projectx/lib/python2.6/site-packages/django/core/management/commands/dumpdata.py", line 110, in handle
objects.extend(model._default_manager.using(using).all())
File "/home/proxz/ProjectX/projectx/lib/python2.6/site-packages/django/db/models/query.py", line 84, in __len__
self._result_cache.extend(self._iter)
File "/home/proxz/ProjectX/projectx/lib/python2.6/site-packages/django/db/models/query.py", line 273, in iterator
for row in compiler.results_iter():
File "/home/proxz/ProjectX/projectx/lib/python2.6/site-packages/django/db/models/sql/compiler.py", line 680, in results_iter
for rows in self.execute_sql(MULTI):
File "/home/proxz/ProjectX/projectx/lib/python2.6/site-packages/django/db/models/sql/compiler.py", line 735, in execute_sql
cursor.execute(sql, params)
File "/home/proxz/ProjectX/projectx/lib/python2.6/site-packages/django/db/backends/util.py", line 34, in execute
return self.cursor.execute(sql, params)
File "/home/proxz/ProjectX/projectx/lib/python2.6/site-packages/django/db/backends/sqlite3/base.py", line 234, in execute
return Database.Cursor.execute(self, query, params)
django.db.utils.DatabaseError: no such table: auth_permission
and
Problem installing fixture 'initial_data.json': Traceback (most recent call last):
File "/home/proxz/ProjectX/projectx/lib/python2.6/site-packages/django/core/management/commands/loaddata.py", line 169, in handle
for obj in objects:
File "/home/proxz/ProjectX/projectx/lib/python2.6/site-packages/django/core/serializers/json.py", line 35, in Deserializer
for obj in PythonDeserializer(simplejson.load(stream), **options):
File "/usr/lib/python2.6/json/__init__.py", line 267, in load
parse_constant=parse_constant, **kw)
File "/usr/lib/python2.6/json/__init__.py", line 307, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.6/json/decoder.py", line 319, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.6/json/decoder.py", line 338, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
Bildhanterings-javascriptet fungerar inte på profilen. Det blir ingen "bildvisare", utan alla bilder visas en efter en istället.
Jag installerade det precis.
commit 9b91e9d8d51f46e65ebff40452673bd2fec79416
Author: Jenso [email protected]
Date: Fri Mar 23 01:26:05 2012 +0100
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.