Re: Django Calendar App Just Like Google Calendar

2013-01-12 Thread Mario Gudelj
It was straight forward. Tastypie makes it really easy to talk json to backbone and plotting the appointments in fullcalendar was even easier. You can have the basic functinality in couple of days. More challenging are the recurring appointments but python's rrule was great help there. On 13 Jan, 2

Django Roles/Permissions

2013-01-12 Thread Chung Wu
Hi there, I am having difficulty figuring out how to structure the following problem: Users have different roles/groups: Admin, Manager, Author Admins can edit every user, can view list of all users, delete all users Manager can edit all users who are not admins or managers, "" Author, can only

Re: show an image in django

2013-01-12 Thread jianhui chen
Really thanks your help. Finally, I find the problem is not in django settings, but in google engine settings. By trying many methods, my problem problem is solved by this way. add - url: /static static_dir: static #my static folder is in the root of the project expiration: '0' to app.yaml. a

Re: What's your opinion about nested apps?

2013-01-12 Thread Nikolas Stevenson-Molnar
The same reason you'd nest Python modules: the scope of the app is broad or complex enough to justify separating into more discrete components, yet those components are not independent from each other or from the top-level app. _Nik On 1/12/2013 4:37 PM, Sithembewena Lloyd Dube wrote: > Why does

Re: What's your opinion about nested apps?

2013-01-12 Thread Sam Solomon
I agree, the simple approach may be good for some things, but we have a highly complex tightly coupled main app that for us, we believe it's easiest to keep bundled together. If we add/write new, more generic apps to our site, we would obviously consider adding it as an app in the "project/" folder

Re: What's your opinion about nested apps?

2013-01-12 Thread Sithembewena Lloyd Dube
I also suspect that this sort of nesting will affect plugability of apps - what is wrong with a simple approach? On Sat, Jan 12, 2013 at 11:02 PM, Sam Solomon wrote: > We've not had any trouble and we have a very nested structure: > > project/main_app/sub_apps/ > > project has manage.py, main_ap

Re: What's your opinion about nested apps?

2013-01-12 Thread Sithembewena Lloyd Dube
Why does this sort of nesting even occur? Why not use the generic Django project/ app structure, where you have a project and apps under a project, instead of apps under other apps? Why would it ever be necessary to 'nest' apps in other apps? On Sat, Jan 12, 2013 at 11:02 PM, Sam Solomon wrote:

RE: Form validation

2013-01-12 Thread Babatunde Akinyanmi
Over ride the post method of your wizard class. There you can call get_all_cleaned_data or get_cleaned_data_for_step. Use the default implementation and adjust it to work according to you logic. From your post method you can raise ValidationError but it will crash the app. If you want the normal fo

Re: NEED HELP ON RUNNING DJANGO ON XAMPP 1.7 UNDER WIN 8

2013-01-12 Thread Nikolas Stevenson-Molnar
Do you have an "Allow" directive for the appropriate directory? http://httpd.apache.org/docs/2.0/mod/mod_access.html#allow _Nik On 1/12/2013 10:27 AM, Kanai Lomayani wrote: > I have managed to install mod_wsgi on apache and django when i try to > access the django address I get this error > *[S

Re: How do I display a static image in my index.html file?

2013-01-12 Thread Jeffrey Black
Directory structure please? FWIW, you have django.contrib.staticfiles defined twice. Did you read the howto doc on static files? @jeffblack360 On Jan 12, 2013, at 2:17 PM, frocco wrote: >> > Page not found (404) > Request Method: GET > Request URL: http://127.0.0.1:8000/static/img/aut

Re: How do I display a static image in my index.html file?

2013-01-12 Thread Nikolas Stevenson-Molnar
Add your static files directory to STATICFILES_DIRS. Make sure to include a trailing comma. E.g: STATICFILES_DIRS = ( os.path.join(DIR,'static'), ) _Nik On 1/12/2013 12:09 PM, frocco wrote: > Page not found (404) > Request Method:GET > Request URL:http://127.0.0.1:8000/static/img/auto.jpg >

Re: How do I display a static image in my index.html file?

2013-01-12 Thread frocco
> > > Page not found (404)Request Method:GETRequest URL: > http://127.0.0.1:8000/static/img/auto.jpg > > Using the URLconf defined in ntw.urls, Django tried these URL patterns, > in this order: > >1. ^staff/$ >2. ^static/img/$ >3. ^static/$ >4. ^admin/doc/ >5. ^admin/ > > The

Re: How do I display a static image in my index.html file?

2013-01-12 Thread frocco
Page not found (404) Request Method: GET Request URL: http://127.0.0.1:8000/static/img/auto.jpg 'img/auto.jpg' could not be found [code] # Django settings for store project. import os import django.contrib.staticfiles DIR = os.path.abspath(os.path.dirname(__name__)) DEBUG = True TEMPLATE_DEBUG =

NEED HELP ON RUNNING DJANGO ON XAMPP 1.7 UNDER WIN 8

2013-01-12 Thread Kanai Lomayani
I have managed to install mod_wsgi on apache and django when i try to access the django address I get this error *[Sat Jan 12 20:29:59 2013] [error] [client 127.0.0.1] client denied by server configuration: C:/xampp/locksmith/locksmith/django.wsgi* my scriptalias : *WSGIScriptAlias /locksmith/

Making of model field type dependent upon the type of admin input form?

2013-01-12 Thread Hans De Winter
I have the following model defined (in my models.py file): class File(models.Model): filename = models.FilePathField(path = '/my_dir/', recursive = True) This model has been registered to the automatic *admin interface* (in the admin.py file): class FileAdmin(admin.ModelAdmin): fields = ('

Re: Django Calendar App Just Like Google Calendar

2013-01-12 Thread Mario Gudelj
I don't think there is one. I looked for one few months ago and ended up building one from scratch with fullcaledar.js, backbone and tastypie On 12 Jan, 2013 6:00 PM, "Kashif Ali" wrote: > Hello Guys, > > Is there any django app available that is a replica of google calendar? > I have checked dja

Re: What's your opinion about nested apps?

2013-01-12 Thread Sam Solomon
We've not had any trouble and we have a very nested structure: project/main_app/sub_apps/ project has manage.py, main_app has main urls.py, etc. sub_apps have models/views/urls, etc. We also have: project/main_app/utils/other_apps/ with no issues (and utils and other_apps both have models, ev

Re: How do I display a static image in my index.html file?

2013-01-12 Thread frocco
Google keeps deleting my reply. I tried the url to the static/img path and get 404 error. On Saturday, January 12, 2013 2:45:48 PM UTC-5, frocco wrote: > > Hello, > > django 1.4 on mac. > > plan to deploy to Bluehost.com when finished. > > I have a php site I want to convert to django. > > but h

Re: How do I display a static image in my index.html file?

2013-01-12 Thread frocco
Hello, django 1.4 on mac. plan to deploy to Bluehost.com when finished. I have a php site I want to convert to django. but honestly, django is harder for me to learn than php, but I am determined. On Saturday, January 12, 2013 12:24:34 PM UTC-5, @jeffblack360 wrote: > > frocco: > > First thin

Re: difficulty with static files

2013-01-12 Thread Sammy
Tom - thanks so much. I was able to resolve it. On Thursday, November 29, 2012 10:00:26 AM UTC-8, Sammy wrote: > > Hello django experts > I am unable to get my static files to work. Here are my settings: > > projectfiles > | > |-myproject > | | > | |-static > | | | > |

Re: How do I display a static image in my index.html file?

2013-01-12 Thread Jeffrey Black
Double-check your the static settings in settings.py and try this: 1: Make sure static URL is '/static/' 2: 3: Move your img directory to store/static directory. 4: Try and hit your image via browser with http://localhost:8000/static/img/auto.jpg 5: Read the Django documentation about managi

Re: How do I display a static image in my index.html file?

2013-01-12 Thread Jeffrey Black
frocco: First things first: What version of Django are you running, and what OS? Thanks, Jeff @jeffblack360 On Jan 11, 2013, at 11:38 PM, Nikolas Stevenson-Molnar wrote: > Could you provide a bit more detail on the problem you're having? > > _Nik > > On 1/11/2013 8:12 PM, frocco wrote: >

RE: Best/Cleanest way to add fields to Class User in models.py?

2013-01-12 Thread bb6xt
I'll advice you take a look at the custom user models documentation. It is new in django 1.5 which will become the latest stable version in less than 2 weeks from now(?). It looks like the cleanest way imho. Sorry I don't have the link but am sure a simple search will lead you to the django doc

Re: What's your opinion about nested apps?

2013-01-12 Thread Fernando Rocha
On Jan 12, 11:37 am, David Medina wrote: > It's only a email typo, never mind. I wanted to explain the "nested" > concept with code. > > The main question could be: *Has it any side effects?*, Third apps maybe?. I had some issues with commands with an app that uses a similar structure. More ab

Re: What's your opinion about nested apps?

2013-01-12 Thread David Medina
It's only a email typo, never mind. I wanted to explain the "nested" concept with code. The main question could be: *Has it any side effects?*, Third apps maybe?. I haven't found nothing about it in official doc and so on. El viernes, 11 de enero de 2013 16:00:37 UTC+1, Sergiy Khohlov escribió:

ANN: Portable Python 2.7.3.2 released

2013-01-12 Thread Perica Zivkovic
Dear people, I would like to announce new release of Portable Python based on Python 2.7.3 Included in this release: - PyScripter v2.5.3 NymPy 1.6.2 SciPy 0.11.0 Matplotlib 1.1.1 PyWin32 218 Django 1.4.3 PIL 1.1.7 Py2Exe 0.6.9 wxPython 2.9.4.0 NetworkX 1.7 Lxml

Re: How do I display a static image in my index.html file?

2013-01-12 Thread frocco
[code] #staff/views.py from django.shortcuts import render_to_response from django.template import RequestContext from staff.models import Staff def index(request): return render_to_response('staff/index.html') * Index.html in folder templates/staff * auto.jpg in folder img My si

Re: Generating HTML code

2013-01-12 Thread Matteo Suppo
I use http://foundation.zurb.com/ or http://twitter.github.com/bootstrap/ They don't generate html but they help build pages faster. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google

Generating HTML code

2013-01-12 Thread Paul Lanza
As I am in the process of learning Django (I've programmed with python for years, and know HTML very well, too), do most programmers develop their HTML by hand, or do you use a 3rd party software to generate HTML and use that as a starting point for the page you are creating. If you are using

Re: how to set template and media directory in settings?

2013-01-12 Thread Mário Neto
And trying like this: >>> PROJECT_PATH = os.path.abspath(os.path.dirname(__name__)) >>> PROJECT_PATH 'C:\\Users\\Mario' >>> os.path.join(os.path.dirname(PROJECT_PATH), "..") 'C:\\Users\\..' Best regards 2013/1/11 frocco > PROJECT_PATH = os.path.join(os.path.dirname(__file__)) > -- Att. *M

Re: Best/Cleanest way to add fields to Class User in models.py?

2013-01-12 Thread Iñigo Medina
On Fri, Jan 11, 2013 at 11:06:57PM -0800, Saqib Ali wrote: > > The User class obviously has a lot of important features that any website > developer will need to track and manage users to the website. > However, I wish the class had three additional members -- all > BooleanFields: myBoolA, myBo

Re: Best/Cleanest way to add fields to Class User in models.py?

2013-01-12 Thread Russell Keith-Magee
On Sat, Jan 12, 2013 at 3:06 PM, Saqib Ali wrote: > > In my models.py, I use django.contrib.auth.models.User as a foreign key > in many of the classes I created. > > The User class obviously has a lot of important features that any website > developer will need to track and manage users to the we

Re: Best/Cleanest way to add fields to Class User in models.py?

2013-01-12 Thread Kashif Ali
On Sat, Jan 12, 2013 at 1:27 PM, Saqib Ali wrote: > Kashif, if I do that, then there are more questions/issues: > > 1) Should user UserProfile be an extension of the User class? Or should it > be a completely separate, independent class? > > You can not extend User class/model as its not an abstr

Re: Best/Cleanest way to add fields to Class User in models.py?

2013-01-12 Thread Saqib Ali
Kashif, if I do that, then there are more questions/issues: 1) Should user UserProfile be an extension of the User class? Or should it be a completely separate, independent class? 2) Whichever method I decide to use, I would like my other models to use as their foreign keys the same Users that ar