Comments (4)
Hi. I'm not sure what you mean by "adding to the Product class". Could you explain?
If what you mean is just "saving one (or more) Product objects" on Parse, you should be able to do something like this:
import parse_rest
from parse_rest import Object
parse_rest.APPLICATION_ID = YOUR_APP_ID
parse_rest.REST_API_KEY = YOUR_REST_KEY
class Product(Object):
pass
# You can set your attributes when initializing the object
one_product = Product(price=10, name="My First Product")
# Or you can just instantiate and define them later
another_product = Product()
another_product.price = 20.0
another_product.name = "My Second Product"
# Save them on Parse.
one_product.save()
another_product.save()
from parsepy.
There is a Product Class for iOS apps for In-App Purchases. I did what you mentioned above but apparently it is a special class. I talked to Parse and they said to add items to the class you have to call 1/classes/_Product
or else it makes another Product Class.
I tried making a class _Product but I end up with a bad request. It might be because I was missing a column for the Icon. Ill try adding that to see if it works.
I don't see how to upload an image. The File class seems to only grab a url? And nothing in the code indicates that the content type gets changed for a file upload? Am I wrong.
Thank you for the response.
M
from parsepy.
Oh, ok. Thanks for the explanation, forgive my lack of knowledge on the iOS side of things. It looks like there is nothing much we can do about protected classes there. I would recommend just giving your class another name, then.
The File/Image types are somewhat recent, I'm yet to implement the uploading part. Perhaps @dgrtwo will bei faster than me? ;)
from parsepy.
I've been a bit bogged down for this week, but I hope to catch up, review the commits, and try my hand at these issues over the weekend!
from parsepy.
Related Issues (20)
- Incorrect URLs for AWS hosted files HOT 2
- Fix for file uploads HOT 4
- parse-py not pointing to the self-hosted server HOT 2
- Nodechef.com returns only last object with valid data HOT 4
- Ability to access config options. HOT 2
- datetime type in User class HOT 1
- Regex matching for string types does not appear to function HOT 1
- How To Retrieve Objects based on Other Unique Columns
- Cannot use Master Key with a logged in user
- Can't get work any methods HOT 7
- Query constraints
- Batch save isn't working properly HOT 2
- Query Nested attributes HOT 1
- Query for string in array
- SSL: CERTIFICATE_VERIFY_FAILED
- get ACL in an object HOT 1
- Trouble Registering With Bitnami Parse-Server AWS Image HOT 1
- Distinct Queries
- urllib.error.URLError: <urlopen error unknown url type: b'http>, HOT 1
- Proposing a PR to fix a few small typos
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 parsepy.