|
just wanted to say thank you for this awesome tutorial. Just a minor nit-pick, the path structure used changes slightly and maybe combine some of the steps to see verifiable change. I'm sure I will be posting here with all sorts of questions in the following weeks/months
|
# ¿ Mar 12, 2008 17:50 |
|
|
# ¿ Apr 30, 2024 06:03 |
|
I'm trying to determine if Django is the right tool for my website: http://politicorific.gotdns.com:8090/ try "work" "sweep" It conjugates Hebrew verbs. There are 4800 entries, the example and many of the other sites in the examples are geared toward user created content. Can it be done, should it be done?
|
# ¿ Mar 16, 2008 09:23 |
|
Are there any more tutorials on how to write views/urls? Or any really good examples available in the djangosites w/sources? I've linked up a pre-existing database to my django code. The admin app has incredible power, which demonstrates most everything I want my users to be able to view (search, sort by category). I have about 5,000 records that I want to be able to cross-reference with links inside records. First I'm trying something easier - I want to create a url/view so that https://www.mysite.com/english/x/ where x is a letter a-z returns all entries starting with that letter. Writing 26 different urls sounds stupid, plus I two other similar patterns with another ~250 entries. why doesn't this work? views.py code:
code:
|
# ¿ May 4, 2008 04:59 |
|
awesome! That worked perfectly
|
# ¿ May 4, 2008 05:52 |
|
okay two questions and this is more just to show off... urls.py code:
Basically I'd like to do the same thing as before code:
Next question regarding views/models. __str__ in model constructs the output of the database search into a single string. I need to manipulate this data separately - each piece goes to a different place. I suppose I could use .split() and create another list, but that just doesn't seem elegant enough. code:
really this goes on forever, there are 49 instances of %s and 49 different variables it's combining. There must be a better way!
|
# ¿ May 4, 2008 15:41 |
|
okay here I'll be explicit: Here's the assumption that I want blown apart, that an application of a project can only receive a single output from models.py. code:
then: code:
Can I use a similar admin setup like this for my applications? If so how do I address them in other modules? code:
code:
|
# ¿ May 4, 2008 16:55 |
|
okay I've crawled out of my hole - the tutorial was a bit confusing with the str methods- time to see if I'm doing things correctly. A few posts to make sure I'm on track First) performing a len on database results - either djangobook or the documentation says not to do this: code:
Second random result generator: code:
Third: Static pages code:
Finally I would like to make sure that my grammar is correct on this site I'm building. So I get something like "0 results" verses "1 result" - models.py has the meta tag. code:
one more thing: code:
So, does this all look okay?
|
# ¿ May 22, 2008 17:38 |
|
Thank you Wulfeh - you understood perfectly what I was going for in every instance. The next step is deploying it to my hosting provider
|
# ¿ May 23, 2008 14:29 |
|
okay, I admit defeat again. I'm going to try an abstract explanation of my database search problem. my database is full of entries like this: a1b2c3d4e5 code:
Is it possible to instruct django's database api to be greedy and return (a1b2c3d4e5) from my query(abcde)? Now let me complicate things - my search query is unicode, my data is unicode. I have 12 unicode characters I want the search to ignore. Is it possible to .split() "query" and use wildcards to make the match? Or should I consider .strip()-ing all 12 characters and maintain another database?
|
# ¿ May 24, 2008 18:48 |
|
I'm getting "reduce() of empty sequence with no initial value" also, preferably it'll be doing this across 27 fields from 5000 rows... what about this from djangobook appendix C: http://www.djangobook.com/en/1.0/appendixC/ quote:search
|
# ¿ May 24, 2008 19:26 |
|
Has anyone taken another look at Google's appengine? The thread is gone, but they've opened up to anyone (I never got a NOTIFY ME email). Their count is 80,000 people signed up. Faced with the predicament of spending more to upgrade my host to deploy my django app ($10/month for ssh), I decided to start porting my project over to appengine. It's been sort of a pain, a lot of modules use functionality which isn't supported by appengine, but the biggest headache has been this: Using GQL - google's proprietary database. Upgrading from an existing database is a huge pain in the rear end/or I'm just stupid. I emailed a guy with some decent tutorials about django and appengine after running into some trouble, he wrote this: http://thomas.broxrost.com/2008/06/15/porting-legacy-databases-to-google-app-engine/ http://code.google.com/appengine/articles/bulkload.html So after exporting to a csv file you upload the data to google. One problem: it doesn't natively support unicode in the uploading tool http://code.google.com/p/googleappengine/issues/detail?id=157 So I'm getting this error: code:
|
# ¿ Jun 18, 2008 18:07 |
|
|
# ¿ Apr 30, 2024 06:03 |
|
I'm planning on creating a new google appengine project soon that will create web pages with artwork determined by user input (basically bezier curves showing relationships). The best method I've come up with is to use SVGs since I want them to scale correctly. I would use in-line SVG code in xhtml, but in-line svg isn't fully supported by all browsers (safari seems to put 100pixel margins at the bottom of any inline svg code). So instead I'm planning on using object= and embed= code, however this means I must create the files before sending. If I can't access the file system on app engine, how can I do this? I'm just doing theory right now, so the short version is, how do I dynamically create files to send to users without doing anything to the file system?
|
# ¿ Apr 5, 2009 07:04 |