Coder Social home page Coder Social logo

Comments (35)

lipis avatar lipis commented on July 4, 2024 1

You should fork and the clone the newly created repo for your project. You can do modifications there and committing/pushing your changes as usual.

Later if you want to get the latest updates you can either add a new remote or simply:

git pull https://github.com/gae-init/gae-init.git master

from gae-init.

lipis avatar lipis commented on July 4, 2024

This is just a convention that is used in this project, has nothing to do with Flask and that's why you can't find it.

It is used in the model_db_to_object function
https://github.com/gae-init/gae-init/blob/master/main/util.py#L117-L129

which eventually is being used in producing JSON responses like this one:
https://gae-init.appspot.com/_s/user/

So these _PROPERTIES are there to have a better control of what exactly you want to expose to the JSON/JSONP services instead of exposing them all as you could do with the build in stuff.

Does that make any sense?

from gae-init.

walkerwzy avatar walkerwzy commented on July 4, 2024

yep, very clearly, and I got the for prop in model_db._PROPERTIES: statement, which explians eveything ^^

from gae-init.

lipis avatar lipis commented on July 4, 2024

are you just playing with it or you are building in public app with gae-init? I would be interested to see what you have done :)

from gae-init.

walkerwzy avatar walkerwzy commented on July 4, 2024

I do have a site http://www.dig-music.com, build on a project: https://code.google.com/p/gae-django-cms/, but it's on python 2.5 and didn't maintained since 2011, so I'd rather have my own CMS, based on gae-init, though I'm a .Net guy

from gae-init.

lipis avatar lipis commented on July 4, 2024

Nice!! Looking forward for the gae-init version.. whenever you have something to share/show let me know :)

from gae-init.

walkerwzy avatar walkerwzy commented on July 4, 2024

No problem, and thanks for your work :)

from gae-init.

lipis avatar lipis commented on July 4, 2024

You could have it dual languages very easily by adding another remote to https://github.com/gae-init/gae-init-babel and merge it to your project..!

https://babel.gae-init.appspot.com/l/zh/

Also if you want to contribute with translations would be super awesome... https://crowdin.net/project/gae-init from where you could get the initial translations for the core app!

from gae-init.

walkerwzy avatar walkerwzy commented on July 4, 2024

I've noticed that

from gae-init.

walkerwzy avatar walkerwzy commented on July 4, 2024

hi, how and where does the route /p/... mapped?

from gae-init.

lipis avatar lipis commented on July 4, 2024

https://github.com/gae-init/gae-init/blob/master/main/app.yaml#L34-L36

from gae-init.

lipis avatar lipis commented on July 4, 2024

But not everything that is in /static directory is being uploaded to production. Check also the skip_files section..

from gae-init.

lipis avatar lipis commented on July 4, 2024

Did you figure out what is going where?

from gae-init.

walkerwzy avatar walkerwzy commented on July 4, 2024

yes, I just simply think that all flask matters, and Alfred's full text search seems not work~~
I forgot gae has it's priority

from gae-init.

lipis avatar lipis commented on July 4, 2024

if you want to do full text search on GAE you will have to use the Search API
https://developers.google.com/appengine/training/fts_intro/

from gae-init.

walkerwzy avatar walkerwzy commented on July 4, 2024

oh, you must misunderstand what I meant ^^
I was searching /p/ in local files to find where did it defined, but not get the app.yaml file, so I post here to look for help.

any way, you and your project helped me a lot, I've learned so much on developing with gae and flask, perhaps it will be soon porting my site with this project

from gae-init.

lipis avatar lipis commented on July 4, 2024

One advice that I can give you if you are about to start fresh is to clone the gae-init-babel project if you are about to have i18n support.. and always pull the latest updates from there..!

I keep them always in sync so whatever new comes to gae-init is included almost instantly in other clones..

good luck and if you run into any sort of trouble.. just ping whenever :)

from gae-init.

walkerwzy avatar walkerwzy commented on July 4, 2024

English is good, and enough, so I’m not interest in i18n, yet.
The true question is I forked this repo, and do modifications based on it, I’m new in git and github, I don’s know how to keep sync with your origin repo in my own forked repo.

Or I really need it to clone and pull? but what if I also want to use git to maintain my code?

walker
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

On Saturday, May 17, 2014 at 22:06, Lipis wrote:

One advice that I can give you if you are about to start fresh is to clone the gae-init-babel project if you are about to have i18n support.. and always pull the latest updates from there..!
I keep them always in sync so whatever new comes to gae-init is included almost instantly in other clones..
good luck and if you run into any sort of trouble.. just ping whenever :)


Reply to this email directly or view it on GitHub (#165 (comment)).

from gae-init.

lipis avatar lipis commented on July 4, 2024

Here is a good resource for learning git.. http://git-scm.com/book

from gae-init.

walkerwzy avatar walkerwzy commented on July 4, 2024

I see, and will have a try :)

from gae-init.

lipis avatar lipis commented on July 4, 2024

A bit of topic.. but could you help translating and review the current translations in chinese?! Since my chinese are very very limited :)

https://crowdin.net/project/gae-init

I can add you to the project if you're interested..

from gae-init.

walkerwzy avatar walkerwzy commented on July 4, 2024

Of course, I'll try my best, and you know a little Chinese, that's very amazing

from gae-init.

lipis avatar lipis commented on July 4, 2024

I know how to write China in Chinese... and that's pretty much what I know..

from gae-init.

lipis avatar lipis commented on July 4, 2024

You can join from here: crowdin.net/project/gae-init/invite?d=n6j...

from gae-init.

lipis avatar lipis commented on July 4, 2024

Never mind.. just saw the request :)

from gae-init.

walkerwzy avatar walkerwzy commented on July 4, 2024

I'm in :)

from gae-init.

lipis avatar lipis commented on July 4, 2024

Thanks man.. here you are: http://babel.gae-init.appspot.com/l/zh/

from gae-init.

walkerwzy avatar walkerwzy commented on July 4, 2024

Never mind :)

walker
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

from gae-init.

walkerwzy avatar walkerwzy commented on July 4, 2024

hi, I have a model definition like this:

class Article(ndb.Model):
    author = ndb.KeyProperty(kind=User)
    ...
class User(ndb.Model):
    name = ndb.StringProperty()
    ...

If I've retrieved some models from db like

u = model.Article.get_by_id(someid)

or

us = model.Article.query(somefilter)

and have passed to Jinja2, how can I use the user's name this way u.author.name in template files?
or I can only use StructuredProperty(which means not the reference of the original one?) rather than KeyProperty in this case?

In some other language it's easy to populate what you want from reference keys, but I looked up the docs of ndb, seems neither population nor projection can do the work

from gae-init.

lipis avatar lipis commented on July 4, 2024

You can do it like: u.author.key.get().name

from gae-init.

lipis avatar lipis commented on July 4, 2024

Or you can create a ndb.ComputedProperty to cache this value if you are using it too extensively later on..

from gae-init.

walkerwzy avatar walkerwzy commented on July 4, 2024

both are great, I'll have a try

from gae-init.

lipis avatar lipis commented on July 4, 2024

for the future these kind of questions are better placed in StackOverflow where more people could be benefited as it's not only gae-init specific

from gae-init.

walkerwzy avatar walkerwzy commented on July 4, 2024

Hey, I've rewrite my blog use gae-init, and have it deployed one GAE, see www.dig-music.com. Though I haven't write a new theme, it might be no different in visual.

some more detail or features can be added later, but the majority work has done, and very thank you for your kindness and help.

In fact , the most great part is the integration of grunt and bower, it makes gae-init works like yeoman

from gae-init.

lipis avatar lipis commented on July 4, 2024

That is awesome man! I'm really glad that it worked out for you.. of course you will have to start fixing the styles for the rest of the pages as well.. but you are on a really good path!

p.s. here you could see how you can add external css libs for example:
https://bitbucket.org/lipis/gae-init-pro/src/tip/bower.json and then
https://bitbucket.org/lipis/gae-init-pro/src/tip/main/static/src/style/style.less

from gae-init.

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.