Giter Site home page Giter Site logo

Comments (4)

lullis avatar lullis commented on May 15, 2024

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.

thedangler avatar thedangler commented on May 15, 2024

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.

lullis avatar lullis commented on May 15, 2024

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.

dgrtwo avatar dgrtwo commented on May 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.