Instaling django

2012-08-30 Thread Balle
Hi,  I have been trying to download django with every options but when i 
run pyhton on the terminal and then asks to import django.  It always says 
no mudule named django.  Could you pls help, donload it.  Thank you in 
advance

-- 
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.com/d/msg/django-users/-/Y-zKRgFv_a4J.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



No exception in template using with and block.super

2012-08-30 Thread Skirmantas
I am am using with tag to transfer flags to block.super like this:

{% with something=1 %}
{{ block.super }}
{% endwith %}

Now if block.super rises an exception, for example NoReverseMatch,
instead of error page, the {{ block.super }} renders to an empty
string, the exception is swallowed somewhere.

This does not happen without the {% with %} wrapper.

A bug?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Ecommerce Solution

2012-08-30 Thread Swaroop Shankar V
Thanks Alex for your suggestion. I went through the documents for
django-shop and i could see that they are not directly supporting some
features like variation, payment gateway etc. Even if i plan to write the
plugins for that myself, I would like to know if there is any method to
import data from my existing satchmo installation.

Swaroop Shankar V



On Mon, Aug 27, 2012 at 4:39 PM, Alec Taylor  wrote:

> Well there's Django-Shop
>
> On Mon, Aug 27, 2012 at 8:38 PM, Swaroop Shankar V 
> wrote:
> > Hi Alec,
> > Cartridge is the one you mean I guess, but after going through the
> document
> > it seems i will require to install Mezzanine too. I was looking for an
> app
> > which i can use with my existing project and also with some good
> > documentation.
> >
> > Thanks and Regards,
> > Swaroop Shankar V
> >
> >
> >
> > On Mon, Aug 27, 2012 at 2:37 AM, Alec Taylor 
> wrote:
> >>
> >> Mezzanine?
> >>
> >> On Mon, Aug 27, 2012 at 6:03 AM, Swaroop Shankar V  >
> >> wrote:
> >> > Hi All,
> >> > Previously I had asked similar question on this group and decided to
> go
> >> > with
> >> > Satchmo. After the implementation it turned out to be bit difficult to
> >> > maintain since the system do not provide much plugin or customization
> >> > support. So am thinking of implementing another ecommerce solution.
> The
> >> > system am looking for is an app which I can use with my existing site.
> >> > Also
> >> > It would be better if the system would support a mechanism to migrate
> >> > the
> >> > existing data from satchmo. I checked few but almost every project
> lacks
> >> > proper documentation. So is there any django ecommerce project that
> have
> >> > good documentation and easy to integrate?
> >> >
> >> > Thanks and Regards,
> >> >
> >> > Swaroop Shankar V
> >> >
> >> > --
> >> > You received this message because you are subscribed to the Google
> >> > Groups
> >> > "Django users" group.
> >> > To post to this group, send email to django-users@googlegroups.com.
> >> > To unsubscribe from this group, send email to
> >> > django-users+unsubscr...@googlegroups.com.
> >> > For more options, visit this group at
> >> > http://groups.google.com/group/django-users?hl=en.
> >>
> >> --
> >> You received this message because you are subscribed to the Google
> Groups
> >> "Django users" group.
> >> To post to this group, send email to django-users@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> django-users+unsubscr...@googlegroups.com.
> >> For more options, visit this group at
> >> http://groups.google.com/group/django-users?hl=en.
> >>
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To post to this group, send email to django-users@googlegroups.com.
> > To unsubscribe from this group, send email to
> > django-users+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> > http://groups.google.com/group/django-users?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Instaling django

2012-08-30 Thread azizmb.in
Hi

Did you install django correctly?

Try,

easy_install django

or if you have pip,

pip install django

(you might need to use sudo for this)

On Thu, Aug 30, 2012 at 11:58 AM, Balle  wrote:

> Hi,  I have been trying to download django with every options but when i
> run pyhton on the terminal and then asks to import django.  It always says
> no mudule named django.  Could you pls help, donload it.  Thank you in
> advance
>
>  --
> 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.com/d/msg/django-users/-/Y-zKRgFv_a4J.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
- Aziz M. Bookwala

Website  | Twitter  |
Github 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Ecommerce Solution

2012-08-30 Thread Swaroop Shankar V
Mario, is it possible to integrate LFS with an existing django project?
Also is there any method to import the data from my existing satchmo
installation to LFS?

Swaroop Shankar V



On Mon, Aug 27, 2012 at 10:31 PM, Mario Menezes wrote:

> LFS is another option. Lightning Fast Shop is the promise in the name :-)
>
> www.getlfs.com
>
> Disclaimer: I'm not affiliate with LFS; we've used it for a project (
> www.qmaterial.com.br) that is not a ecommerce, but has a significant
> number of similar features (except ecommerce) that using a ecommerce
> solution was the obvious solution.
>
> Best regards,
>
> Mário Menezes
>
>
> Em domingo, 26 de agosto de 2012 17h03min25s UTC-3, Swaroop Shankar
> escreveu:
>
>> Hi All,
>> Previously I had asked similar question on this group and decided to go
>> with Satchmo. After the implementation it turned out to be bit difficult to
>> maintain since the system do not provide much plugin or customization
>> support. So am thinking of implementing another ecommerce solution. The
>> system am looking for is an app which I can use with my existing site. Also
>> It would be better if the system would support a mechanism to migrate the
>> existing data from satchmo. I checked few but almost every project lacks
>> proper documentation. So is there any django ecommerce project that have
>> good documentation and easy to integrate?
>>
>> Thanks and Regards,
>>
>> Swaroop Shankar V
>>
>>  --
> 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.com/d/msg/django-users/-/_GQrKjmFzTYJ.
>
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Instaling django

2012-08-30 Thread Enyert Viñas
U need to install django correctly. Check that you have the a supported
python version for your django version. Try easy_install django or pip
django. I think the installation instruction from django project site
https://www.djangoproject.com/download/ are clear. If you are in windows
use your favorite extractor on Django-.tar.gz, extract it -> go to
the extraction target folder and execute the command python setup.py
install in a session with admin privileges


2012/8/30 Balle 

> Hi,  I have been trying to download django with every options but when i
> run pyhton on the terminal and then asks to import django.  It always says
> no mudule named django.  Could you pls help, donload it.  Thank you in
> advance
>
>  --
> 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.com/d/msg/django-users/-/Y-zKRgFv_a4J.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Instaling django

2012-08-30 Thread Amyth Arora
Seems you have not correctly installed django, you can follow any of the
following tutorials to install the latest stable version of django
according to your operating system:

for windows: Install Django on Windows
Tutorial
for linux (ubuntu) : Install Django on Ubuntu
(linux)

On Thu, Aug 30, 2012 at 7:18 PM, Enyert Viñas  wrote:
> U need to install django correctly. Check that you have the a supported
> python version for your django version. Try easy_install django or pip
> django. I think the installation instruction from django project site
> https://www.djangoproject.com/download/ are clear. If you are in windows
use
> your favorite extractor on Django-.tar.gz, extract it -> go to
the
> extraction target folder and execute the command python setup.py install
in
> a session with admin privileges
>
>
> 2012/8/30 Balle 
>>
>> Hi,  I have been trying to download django with every options but when i
>> run pyhton on the terminal and then asks to import django.  It always
says
>> no mudule named django.  Could you pls help, donload it.  Thank you in
>> advance
>>
>> --
>> 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.com/d/msg/django-users/-/Y-zKRgFv_a4J.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.



-- 
Thanks & Regards


Amyth [Admin - Techstricks]
Email - aroras.offic...@gmail.com, ad...@techstricks.com
Twitter - @a_myth_
http://techstricks.com/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Upload Image and pdf file

2012-08-30 Thread Dott. Tegagni Alessandro
I have a project created with cms Django, and in this project i must upload 
a image and pdf file. the code in models.py is as follow:
http://dpaste.com/793672/

 
 
The file with this step to upload, is inserted in correct folder, but the 
file not work.

In Administrator panel, when i click on image or pdf file, that i uploaded, 
the browser tell me Page not found (404). The current URL, 
home/alessandro/Scrivania/progetto/static/finale/header_blog.jpg, didn't 
match any of these.

I have verifed the permission, but i have in default chmod 777.

Any ideas?

I have follow also this tutorial youtube:Video From 
YtI
 have the same code, but not result.

Any Ideas? Where is my error?

I can send the zip folder with the project, if you want.


I try, also, edit the code of models.py in:
http://dpaste.com/793673/


but the error there is.Now, I think what I not write correctly the 
configuration in settings.py. Media_Root, Media_Url, Static_Root, 
Static_Url are empty. There parameters should not be empty, true? I 
developer in localhost (on Linux/Ubuntu), web server Apache. What should i 
write as configuration?

With second link, the result is: The object albax with primary key 
u'20/static/finale/Magic_green_bus_1.jpg' not exits.

But the Image file, there is in correct file.

Or the Problem is in urls.py, the code is: http://dpaste.com/793124/


Any Ideas?



-- 
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.com/d/msg/django-users/-/tb3nq6Kyux4J.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: About the Django URL tag {% url %}……

2012-08-30 Thread Nikolas Stevenson-Molnar
It should still work... the problem may be elsewhere. Would you please
provide the full contents of both url files?

_Nik

On 8/29/2012 7:37 PM, Scarl wrote:
> My python version is 2.7.2 , and django version is 1.2.7
> I have a test just now.
> If i put the name parameter in mysite.urls like url(r'^test/$',
> 'testpage', name='www'), the {% url www %} can work...
> But when I put the name parameter in mysite.myapp.urls like
> url(r'help/$', 'testpage', name='www'), and mysite.urls is
> url(r'test/', include(mysite.myapp.urls)). This time the {% url www %}
> can not work!
> Is it when I use include('mysite.myapp.urls'), the name parameter can
> not work? And the name parameter can only in mysite.urls?
> Can anyone help me? thx!
> -- 
> 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.com/d/msg/django-users/-/x6qNBIrfKLsJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: About the Django URL tag {% url %}……

2012-08-30 Thread Nikolas Stevenson-Molnar
Also, your URL patters should start with "^" like your first one does.
And unless you need the older version, I would upgrade to the latest
stable version of Django (1.4.1) before doing anything else.

_Nik

On 8/29/2012 7:37 PM, Scarl wrote:
> My python version is 2.7.2 , and django version is 1.2.7
> I have a test just now.
> If i put the name parameter in mysite.urls like url(r'^test/$',
> 'testpage', name='www'), the {% url www %} can work...
> But when I put the name parameter in mysite.myapp.urls like
> url(r'help/$', 'testpage', name='www'), and mysite.urls is
> url(r'test/', include(mysite.myapp.urls)). This time the {% url www %}
> can not work!
> Is it when I use include('mysite.myapp.urls'), the name parameter can
> not work? And the name parameter can only in mysite.urls?
> Can anyone help me? thx!
> -- 
> 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.com/d/msg/django-users/-/x6qNBIrfKLsJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



brute force protection

2012-08-30 Thread brian downing

I want a brute force protector for logins that will:

1.

   block based on username(eventually add ip)

2.

   store info about failed login to db(username, pwd, user-agent, etc)

3.

   When locked will tell user that they are locked out

I looked at the following apps:

1.

   http://code.google.com/p/django-brutebuster/ In decorators.py the
   method returns None when locked so the user gets the "Please enter a
   correct username and password. Note that both fields are
   case-sensitive". I want the user to know the account is locked out.

2.

   https://github.com/alexkuhl/django-failedloginblocker In
   decorators.py the method raises an exception which means if
   debug=False the user will see a 500 error.

3.

   http://code.google.com/p/django-axes/ This doesn't include the user
   (has ip and user-agent). In decorators.py I'm not sure how to get
   the user name. Also I'm concerned about the approach of trying to
   log someone in and then logging them out if the account is locked. I
   like the approaches of #1 and #2 where they first check if the
   account is locked before trying to log them in.

For #1 and #2 I looked into adding the error to the form and I found 
this post Django - Error Message in Custom Auth Backend 
 
that says overwrite django.contrib.auth.forms.AuthenticationForm but I'm 
not sure how to incorporate the new form in the apps.


Does anyone have suggestions about writing a brute force protector that 
will do the things I want?




I posted this on stackoverflow 
 
but didn't get a response.




Brian


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Overriding a Field attribute in a proxy model is not allowed.

2012-08-30 Thread Alti
Hello, 

I'm currently working with an app that i would not like to modify.

This app contains 2 Models, basically : (i took off some code to make it 
clearer)

```
class Invoice(models.Model):
   [...] a bunch of attributes [...]
   lines = generic.GenericRelation(Line)
   
   [...] all the class methods [...]

class Line(models.Model):
   content_type [...]
   [...] a bunch of attributes [...]

   product = models.ForeignKey(Product)
   price = models.DecimalField()
   quantity = models.IntegerField()
   [...] all the class methods [...]

```

I would like to add only method computing the values of these models to use 
it elsewhere (another app).
So no table in database, need to add methods and do not want to modifiy the 
original class, the documentation seems to indicate the model proxy.

So i'm going with something like this in a different app :

```
class PackingList(Invoice):
lines = generic.GenericRelation(PackingListLine)

def get_number_of_boxes(self):
total = 0
for line in self.lines.all():
total += line.get_number_of_boxes()
return total

class Meta:
proxy = True


class PackingListLine(Line):
def get_number_of_boxes(self):
if self.product.quantity_per_box:
return self.quantity / self.product.quantity_per_box

class Meta:
proxy = True

```

But Django raise a beautiful ```django.core.exceptions.FieldError: Proxy 
model 'PackingList' contains model fields.```.
Normal ! It is clearly specified in the docs, it is forbidden to override a 
field attribute in a Django Model.

So i understand the need to restrict the usage of these manipulation to not 
break the framework internal mechanisms, but i don't know in this case 
which other approach would be best (Minimal model with one2one relationship 
? everything in a view class ? separate my code in a different class/file 
that i would call individually ? triggers ? make an intermediate class that 
would get the instance ?).

My question is, what is the clean way to code this ?

-- 
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.com/d/msg/django-users/-/4QK6OGtwP5cJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Combinable generic CBVs

2012-08-30 Thread Rainy


On Aug 29, 5:24 pm, Melvyn Sopacua  wrote:
> On 29-8-2012 18:46, Rainy wrote:
>
> > On Aug 29, 3:10 am, Melvyn Sopacua  wrote:
> >> On 29-8-2012 4:44, Rainy wrote:
>
> >>> When I use CBVs, I nearly always end up needing to mix different types in
> >>> the same view, e.g. detail view and list view, list view and modelform
> >>> view, etc. I really like CBVs but I feel this is the one shortcoming that 
> >>> I
> >>> constantly run into that makes CBVs much less flexible and helpful than
> >>> they could be.
>
> >> What are your real world cases for this? If you combine several models
> >> to make up a page, you should consider writing your own mixins that
> >> inherit only from ContextMixin and implement get_context_data() to add
> >> the extra information.
>
> 
>
> > I will give some examples at the end of the message, but first I want
> >  to expand a bit on this idea.
>
> > Let's say you have a detail CBV, FooView(DetailView): model = Foo ;
> >  and a list view, BarView(ListView): model = Bar .
>
> > Now, combining different types of views is an extremely common case
> > and you might say that the cases when you don't need to do that are
> > usually so simple that existing GCBVs already handle them perfectly.
>
> The list and detail view don't bite each other in many aspects. However,
> as you will list in examples below, you usually don't have just one list
> view per page. See below.


Actually, I've never had more than one list per view, either in these
examples or in any other I've worked with. In fact, I've never had
a view where more than one instance of any type of CBV was
needed, as far as I can remember. The only common case I
can think of is having two forms - let's say a search and login.
I think it should be handled as a special case, maybe allowing
form_model to be a list and updating all CBVs to process it
as either a single item or as a list.

>
> > I don't see any apparent reason why the two examples above can't
> > be combined exactly in the same way you inherit each separate view:
> > FooBarView(DetailView, ListView): detail_model=Foo; list_model=Bar.
>
> Because how would you declare a second list model? And how would you
> pick these up? Aside from making the routing through the model
> difficult, this will also be a declaration nightmare.


I showed examples below, doesn't seem like a nightmare, I think..

>
> > As a bonus, you don't have to decide which mixin to use and when
> > overriding methods, you will know which instance variable and method
> > handles detail and list objects.
>
> Except when you need more than one list or detail or both.
>
> > Here are a few examples where it would be useful, and I can find many
> > more in my projects:
>
> >   - blog post: 3 CBVs: post, list of comments, comment form
> >  - search: FormView, ListView
> >  - photo album: detail view for album, listview of images
>
> > I know each of these cases can be handled with current GCBVs but
> > with a lot more effort and in a more verbose and error-prone way
> > than what I'm proposing.
>
> I don't see that:
> class BlogView(CommentListMixin, CommentFormMixin, DetailView) :
>         model = BlogPosts
>
> versus:
> class BlogView(DetailView, ListView, CreateView) :
>         detail_model = BlogPost
>         list_model = Comments
>         form_model = Comments
>
> I find the second version harder to read, more verbose to type and when
> you want to support multiple models you will have to support some sort
> of sequence or mapping.


It's ok that it's more verbose, in fact it's a good thing becase here
verbosity is moved from method level to class attribute level,
I want my methods to be as short and clear as possible, to make
it easier to follow the logic.

> Not to mention how you'd handle template-coder
> friendly names through context_object_name and similar.


Of course, this would be done with declarations like
context_detail_object_name, etc, only for objects
that need to be accessed in template. In this case,
context_create_object_name is probably not needed
and can be left as None.
>
> Yes, the first version requires more work to code the mixins, but I
> don't find them harder to debug either. In fact, pretty much only one
> point where things can go wrong: get_context_data().

No, the issue is the clash between self.object, context_object_name,
self.model. You have to look through the entire tree of CBVs and
make sure all of them refer to the correct objects everywhere
they're referenced. For example, self.object is created in both
get() and post(), if you want to change the default, you have to
override both of them.

The only reason you would use self.object for both detail
and modelform, imho, is to make GCBVs code shorter and
clearer, inheriting from SingleObjectMixin and reusing all
of its code. As a user of GCBVs, it really doesn't matter
much to me if they're a little longer. What does matter to
me is that as soon as I want to combine different types
of CBVs, it's a major pain even 

Re: Automatically create an InlineForm object inside an admin page

2012-08-30 Thread Nicolas Emiliani
On Tue, Aug 28, 2012 at 7:20 PM, Jill Green  wrote:

> I hope someone has come across this problem before because it's driving me
> nuts.  Basically I have a model, Partner and it has a PartnerAdmin page.
>  Inside the partner I have another model called Data that is an Inline to
> the Partner.  I used the model.ForeignKey in the Data to reference it back
> to the Partner instance.  What I want to do is everytime I create a new
> Partner and click to save it to automatically create one Data object (sort
> of a requirement) for all new partners.  It currently looks like this:
>
> PartnerAdmin:
>  #stuff
>  inlines = ['DataInline',]
>
> Data:
>  name= model.Char
>  #more stuff
>
> DataInline(admin.TabularInline):
>extra = 0
>form = DataForm
>formset = DataFormSet
>
> I have tried using the initial data and trying to bind a form from it but
> it won't work.  Please any help would be appreciated.
>
>
Maybe implementing the save_model method at PartnerAdmin can do the trick.
Here is the doc :

https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.save_model

You should use the change parameter to check if it's a new object or not.

 --
> 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.com/d/msg/django-users/-/YvGlPmf_HtEJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Nicolas Emiliani

Lo unico instantaneo en la vida es el cafe, y es bien feo.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: people.djangoproject.com broken

2012-08-30 Thread creecode
Hello Timothy,

I just tried going to the login webpage and had no problem.  I'm not 
registered on that website so my experience may be somewhat different.

On Thursday, August 30, 2012 10:39:24 AM UTC-7, Timothy Makobu wrote:

Still having no luck. Here's a screenshot of the error, displayed about 5 
> minutes ago:
>

Are you just going to the webpage or is this error after you have tried to 
login?

Are you using OpenID?  That may have something to do with it.

If you are just using the "regular" login (cookie based), have you tried 
deleting the cookies related to the website from your browser?

Toodle-looo.
creecode

-- 
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.com/d/msg/django-users/-/s14_SIlckdwJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: brute force protection

2012-08-30 Thread David Fischer
This has definitely been discussed before[1], but I think it is worth 
discussing again. This issue has become even more pressing since the 
password hashing algorithm has increased its computational complexity 
significantly in 1.4. Because of that increased CPU utilization, a denial 
of service (DoS) attack should be a lot easier and more devastating.

With that said, there are a number of implications. Sometimes locking out 
users is not desirable since it opens a user up to DoS -- especially if 
some of the usernames are public. Also, this sort of thing is handled much 
more efficiently at the web server level as opposed to the application 
level. Your production web server probably has a good way to throttle 
requests. The Django security docs[2] mention this.

I'm +1 about getting some sort of throttler into core (or contrib rather), 
but I think this type of thing needs to be very tunable since different 
people will have wildly different requirements. A sprint at Djangocon maybe?


[1] https://groups.google.com/d/topic/django-developers/cYd-8C-3wFQ/discussion
[2] https://docs.djangoproject.com/en/1.4/topics/security/#id1

On Thursday, August 30, 2012 8:39:26 AM UTC-7, brian wrote:
>
>  I want a brute force protector for logins that will:
>
>1. 
>
>block based on username(eventually add ip) 
> 2. 
>
>store info about failed login to db(username, pwd, user-agent, etc) 
> 3. 
>
>When locked will tell user that they are locked out 
> 
> I looked at the following apps:
>
>1. 
>
>http://code.google.com/p/django-brutebuster/ In decorators.py the 
>method returns None when locked so the user gets the “Please enter a 
>correct username and password. Note that both fields are case-sensitive”. 
> I 
>want the user to know the account is locked out.
> 2. 
>
>https://github.com/alexkuhl/django-failedloginblocker In decorators.py 
>the method raises an exception which means if debug=False the user will 
> see 
>a 500 error.
> 3. 
>
>http://code.google.com/p/django-axes/ This doesn't include the user 
>(has ip and user-agent). In decorators.py I'm not sure how to get the user 
>name. Also I'm concerned about the approach of trying to log someone in 
> and 
>then logging them out if the account is locked. I like the approaches of 
> #1 
>and #2 where they first check if the account is locked before trying to 
> log 
>them in. 
> 
> For #1 and #2 I looked into adding the error to the form and I found this 
> post Django - Error Message in Custom Auth 
> Backendthat
>  says overwrite django.contrib.auth.forms.AuthenticationForm but I'm 
> not sure how to incorporate the new form in the apps. 
>
> Does anyone have suggestions about writing a brute force protector that 
> will do the things I want?
>
>
>
>  I posted this on 
> stackoverflowbut
>  didn't get a response. 
>
>
>
>  Brian
>
>  

-- 
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.com/d/msg/django-users/-/UxXiAVZKxe0J.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Model ChoiceField?

2012-08-30 Thread Lachlan Musicman
Hi,

I was just wondering if there was any noticeable difference between
the models.ChoiceField() and the models.CharField(max_length=x,)?

In the documentation I have (offline, Django v1.4) a reference to:

/path/django-docs-1.4-en/ref/forms/fields.html#django.forms.ChoiceField.choices

But in the example given at
/path/django-docs-1.4-en/ref/models/fields.html#field-choices they use
the CharField() method.

Is there a discernible difference or is it just for clarity?

cheers
L.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Model ChoiceField?

2012-08-30 Thread Lachlan Musicman
Ok, ignore this email - I've just realised one is a Form field, and
the other is a Model field. Apols for stupid.

Cheers
L.

On Fri, Aug 31, 2012 at 1:09 PM, Lachlan Musicman  wrote:
> Hi,
>
> I was just wondering if there was any noticeable difference between
> the models.ChoiceField() and the models.CharField(max_length=x,)?
>
> In the documentation I have (offline, Django v1.4) a reference to:
>
> /path/django-docs-1.4-en/ref/forms/fields.html#django.forms.ChoiceField.choices
>
> But in the example given at
> /path/django-docs-1.4-en/ref/models/fields.html#field-choices they use
> the CharField() method.
>
> Is there a discernible difference or is it just for clarity?
>
> cheers
> L.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Syncdb Error With Oracle Database - IntegrityError Exception

2012-08-30 Thread Jon Blake
Just discovered Django and trying out the Django 1.4 tutorial with an 
Oracle backend database. In my database, I have created user django with 
privs create session, create table, create sequence, create trigger. The 
DATABASES dictionary in settings has been edited to set the default 
settings to the Oracle engine, and the database name, user and password 
specified.

When I run:

$ python manage.py syncdb

I see tables are created, but I also get a traceback ending with:

File "/usr/lib/python2.7/site-packages/django/db/backends/oracle/base.py", 
line 675, in execute
return self.cursor.execute(query, self._param_generator(params))
django.db.utils.IntegrityError: ORA-01400: cannot insert NULL into 
("DJANGO"."AUTH_PERMISSION"."ID")

I did not see a prompt to create a superuser account.

Oracle SQL*Developer shows that schema django contains 9 tables (including 
auth_permission), 16 indexes, 7 triggers and 8 sequences. Table 
django_content_type contains three rows, and the others are empty.

Can anyone advise on how to resolve the ORA-01400 error?

Run-time environment:
  O/S: Fedora 14
  Django: 1.4.1
  Python: 2.7
  DB: Oracle Database 11.1.0.6.0
  cx_Oracle client: 11.1.0.6.0



-- 
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.com/d/msg/django-users/-/O5XePWI1ee4J.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



How to package a django application

2012-08-30 Thread Muhammed Salman
Hi, 

I am new to python and django development and have developed a simple email 
based authentication form as a part of an exercise. Now, i have two 
questions

1: The requirement from me for this exercise was to create it without any 
frameworks but i started it with django so its easier initially and indeed 
it was.So, can someone please tell how to move from this point. I mean if 
the email authentication has to be done purely in Python (so that it works 
like "python server.py") how difficult it is and what could be a few good 
resources to get start with that.
2: I also have a time deadline for this. So if i am not able to do it 
purely with python which packages/files/folders should i send to the 
teacher and what instructions shall i wrote in the readme to make sure that 
my application run on his machine with the least fuss.

Thanks !

-- 
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.com/d/msg/django-users/-/dtLK6gqKiHYJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Hard time debugging an strange problem

2012-08-30 Thread Alexis Roda

Hi all,
sorry for the ambiguous subject, but I can't summarize it in a few words.

This is my first message to the list asking for help so I think that is 
polite to give a big thanks to those of you that are making developing 
with django such a great pleasure. This is a great community.


Said that, I'm working on a management command that adds 'paster create' 
like functionality to 'manage.py'. In order to do tests I have created a 
simple bash script that:


* cleans the environment (uninstall the app from the virtualenv, removes 
the project, app, sqlite database etc.)

* creates a new project (with my command)
* creates a new app (with my command)
* installs the app in develop mode
* creates an empty model (with my command)
* overwrites the model definition with one that has a couple of fields
* runs syncdb
* loads a fixture
* creates a set of views (with my command)

When I run the script, more often than not, I get exceptions in the 
'manage.py' command. If I run the individual commands "by hand" I get no 
errors. What is driving me mad is that adding a 'sleep 1' between the 
commands in the script the exceptions go away (tested running the script 
in a while [ $? != 0 ] loop for more than an hour).


The management command does no black magic: it takes context variables 
from the command line, adds some variables (like the app object returned 
by cache.get_app(), the model we are operating on etc.) and expands a 
set of cheetah templates.


The exceptions are of different types:

http://pastebin.com/sW0AAmHn in this run cache.get_app() is unable to 
find the 'foobar' app. Of course it is in INSTALLED_APPS.


http://pastebin.com/mRSdkgCb in this run syncdb does not create the 
table for the FirstModel model and 'manage.py loaddata' complains. 
FirstModel exists, has an applabel="foobar" attribute and is imported 
from 'models/__init__.py'.


Here's the script:
http://pastebin.com/08veXtJ6

site-packages:
Cheetah-2.4.4-py2.7-linux-i686.egg/
Django-1.3.3-py2.7.egg/
Django-1.4.1-py2.7.egg/
django_crispy_forms-1.1.4-py2.7.egg/
django_tables2-0.11.0-py2.7.egg/
dja-skel.egg-link
easy-install.pth
foobar.egg-link
ipython-0.13-py2.7.egg/
Markdown-2.2.0-py2.7.egg
pep8-1.3.3-py2.7.egg/
pip-1.0.2-py2.7.egg/
Pymacs/
setuptools-0.6c11-py2.7.egg
setuptools.pth

python version:
Python 2.7 (r27:82500, Jul 17 2010, 02:48:50)
[GCC 4.4.3] on linux2

Django 1.4.1


I don't care for having to wait a few seconds in order to get a clean 
environment but I'm very curious about what the problem may be. Any idea?




Regards,
Alexis

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Instaling django

2012-08-30 Thread Jon Blake
What O/S?

I installed Django 1.4.1 today on my Linux F14 box today by:

1. Downloading Django-1.4.1.tar.gz from 
https://www.djangoproject.com/download/
2. As root:
# tar xzvf Django-1.4.1.tar.gz
# cd Django-1.4.1
# python setup.py install
# exit
3. Test it:
$ python
>>> import django
>>> print django.get_version()
1.4.1

HTH,
  Jon

On Thursday, August 30, 2012 4:28:40 PM UTC+10, Balle wrote:
>
> Hi,  I have been trying to download django with every options but when i 
> run pyhton on the terminal and then asks to import django.  It always says 
> no mudule named django.  Could you pls help, donload it.  Thank you in 
> advance
>
>

-- 
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.com/d/msg/django-users/-/Q47WcAEp6vMJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



coding urls in templates

2012-08-30 Thread Mike
Quick question: I changed my urls.py so I can run my project in a 
subdirectory and I broke all the urls in my templates.  Should I be using {% 
url path.to.some_view v1 v2 %} in all my templates instead of hard coding 
the path?

-- 
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.com/d/msg/django-users/-/SV-wL8jMdCUJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: coding urls in templates

2012-08-30 Thread Amyth Arora
could you post the directory structure and your urls.py file. Thanks.

On Fri, Aug 31, 2012 at 11:00 AM, Mike  wrote:

> Quick question: I changed my urls.py so I can run my project in a
> subdirectory and I broke all the urls in my templates.  Should I be using
> {% url path.to.some_view v1 v2 %} in all my templates instead of hard
> coding the path?
>
> --
> 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.com/d/msg/django-users/-/SV-wL8jMdCUJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Thanks & Regards


Amyth [Admin - Techstricks]
Email - aroras.offic...@gmail.com, ad...@techstricks.com
Twitter - @a_myth_
http://techstricks.com/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: How to package a django application

2012-08-30 Thread Amyth Arora
Using pure python scripts with django is not all that difficult, as django
itself is a python package. So , you can simply have a custom script
"mailserver.py" (or whatever name) and you import the script to your views
and simply call the functions from your custom script under the respective
user request. For Example:

Custom Script = mailserver.py
def sendWelcomeEmail(to, from):
""" Function to send a
 Welcome email to First Time Subscribers.
"""

Django App's Views.py
from django.http import HttpResponse
import mailserver

def firstTimers(request):
usermail = request.POST['email']
mailserver.sendWelcome(useremail, 'myn...@mydomain.com')
success = 'Mail Sent.'
return HttpResponse(success)

On Fri, Aug 31, 2012 at 10:51 AM, Dennis Lee Bieber
wrote:

> On Thu, 30 Aug 2012 19:45:20 -0700 (PDT), Muhammed Salman
>  declaimed the following in
> gmane.comp.python.django.user:
>
> > Hi,
> >
> > I am new to python and django development and have developed a simple
> email
> > based authentication form as a part of an exercise. Now, i have two
> > questions
>
> I'm not sure I understand what you mean by "email based
> authentication form"
>
> Taken literally, to me it implies that you have a template email in
> which someone fills out fields and sends it to "you", whereupon you will
> take the information in the email, validate it, record it in some user
> database, and email back some random account name and password.
>
> Or it could mean you are supposed to have a web-page for users to
> register, you record their name, password, and email address in a
> database but do not activate it yet, then send an email to them with
> instructions that they reply to it if they are really the person who
> attempted to register. Then when you receive the reply you match it
> against the database and activate the account.
>
> >
> > 1: The requirement from me for this exercise was to create it without any
> > frameworks but i started it with django so its easier initially and
> indeed
>
> Mistake #1 -- the time spent developing in Django could have been
> spent studying the core Python library, which is what your "without any
> frameworks" indicates.
>
> > it was.So, can someone please tell how to move from this point. I mean if
>
> Obviously, by starting over from scratch.
>
> > the email authentication has to be done purely in Python (so that it
> works
> > like "python server.py") how difficult it is and what could be a few good
> > resources to get start with that.
>
> Are you supposed to implement an SMTP daemon to receive/deliver
> email messages, or only periodically read inbound email from a POP3
> mailbox?
>
> I'd suggest you start with the documentation for your version of
> Pyhthon... In particular the "Python Standard Library" manual. Try the
> chapter on "Internet Protocols and Support" (in my copy, for Python 2.7,
> this is chapter 20), SimpleHTTPServer (20.19) and CGIHTTPServer (20.20),
> poplib (20.9), smtplib (20.12), maybe smtpd (20.13).
>
> On top of that, the chapter on "Internet Data Handling" (chapter 18
> in my copy), email (18.1), mailbox (18.4)
>
> "Data Persistance" (11), sqlite3 (11.13)
>
> If you need a more capable server than the two mentioned above,
> check the chapter "Interprocess Communication" (17), asyncore (17.6)
>
>
> > 2: I also have a time deadline for this. So if i am not able to do it
> > purely with python which packages/files/folders should i send to the
> > teacher and what instructions shall i wrote in the readme to make sure
> that
> > my application run on his machine with the least fuss.
>
> I would think the instructor wouldn't have given you a "no
> frameworks" requirement if they expect assignments to have dependencies
> on outside packages.
> --
> Wulfraed Dennis Lee Bieber AF6VN
> wlfr...@ix.netcom.comHTTP://wlfraed.home.netcom.com/
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Thanks & Regards


Amyth [Admin - Techstricks]
Email - aroras.offic...@gmail.com, ad...@techstricks.com
Twitter - @a_myth_
http://techstricks.com/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: coding urls in templates

2012-08-30 Thread Michael Thon
the root directlry of my domain is hosting wordpress, which I'm using to 
develop the landing pages:
www.zetawrite.com (I know, it still needs a lot of work).

The app itself will only be available to logged in users so I thought that the 
easiest way to deploy it would be to run it in a subdirectory of the main 
website. Now I'm trying to do my first deployment to a staging server.

here's the project level urls.py:

urlpatterns = patterns('',
# Uncomment the admin/doc line below to enable admin documentation:
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

# Uncomment the next line to enable the admin:
url(r'^zetawrite/admin/', include(admin.site.urls)),
url(r'^zetawrite/accounts/', include('registration.backends.default.urls')),
url(r'zetawrite/', include('sieveapp.urls')),

)

Eventually, If the app gets traction, I'll want to have the wordpress landing 
pages and the django project running on separate servers, so I should figure 
out how I can move it without changing any urls...  


On Aug 31, 2012, at 7:45 AM, Amyth Arora  wrote:

> could you post the directory structure and your urls.py file. Thanks.
> 
> On Fri, Aug 31, 2012 at 11:00 AM, Mike  wrote:
> Quick question: I changed my urls.py so I can run my project in a 
> subdirectory and I broke all the urls in my templates.  Should I be using {% 
> url path.to.some_view v1 v2 %} in all my templates instead of hard coding the 
> path?
> 
> -- 
> 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.com/d/msg/django-users/-/SV-wL8jMdCUJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
> 
> 
> 
> -- 
> Thanks & Regards
> 
> 
> Amyth [Admin - Techstricks]
> Email - aroras.offic...@gmail.com, ad...@techstricks.com
> Twitter - @a_myth_
> http://techstricks.com/
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Syncdb Error With Oracle Database - IntegrityError Exception

2012-08-30 Thread Amyth Arora
Hey Jon,

I guess this is because of a bug in django. Django already has a open
ticket for this bug. Check it out
here
.

On Fri, Aug 31, 2012 at 7:17 AM, Jon Blake  wrote:

> Just discovered Django and trying out the Django 1.4 tutorial with an
> Oracle backend database. In my database, I have created user django with
> privs create session, create table, create sequence, create trigger. The
> DATABASES dictionary in settings has been edited to set the default
> settings to the Oracle engine, and the database name, user and password
> specified.
>
> When I run:
>
> $ python manage.py syncdb
>
> I see tables are created, but I also get a traceback ending with:
>
> File "/usr/lib/python2.7/site-packages/django/db/backends/oracle/base.py",
> line 675, in execute
> return self.cursor.execute(query, self._param_generator(params))
> django.db.utils.IntegrityError: ORA-01400: cannot insert NULL into
> ("DJANGO"."AUTH_PERMISSION"."ID")
>
> I did not see a prompt to create a superuser account.
>
> Oracle SQL*Developer shows that schema django contains 9 tables (including
> auth_permission), 16 indexes, 7 triggers and 8 sequences. Table
> django_content_type contains three rows, and the others are empty.
>
> Can anyone advise on how to resolve the ORA-01400 error?
>
> Run-time environment:
>   O/S: Fedora 14
>   Django: 1.4.1
>   Python: 2.7
>   DB: Oracle Database 11.1.0.6.0
>   cx_Oracle client: 11.1.0.6.0
>
>
>
>  --
> 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.com/d/msg/django-users/-/O5XePWI1ee4J.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Thanks & Regards


Amyth [Admin - Techstricks]
Email - aroras.offic...@gmail.com, ad...@techstricks.com
Twitter - @a_myth_
http://techstricks.com/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: coding urls in templates

2012-08-30 Thread Amyth Arora
Hey Mike,

I think i understand what you are trying to achieve now. You can basically
name your urls and then call the url template tag in the templates with the
url name as follows, this way you will not break any urls in your template
if you simply move your app to a new location.

Example:

#zetawrite account urls

urlpatterns += patterns('zetawrite.views',
url(r'^zetawrite/account/signup/$', 'account_signup',
name='account_signup'),
url(r'^zetawrite/account/profile/$', 'account_profile',
name='account_profile'),
url(r'^zetawrite/account/settings/$', 'account_settings',
name='account_settings'),
)

Then use the url template tag as follows:

for an anchor tag like Profile
use Profile

Hope this helps.

On Fri, Aug 31, 2012 at 11:33 AM, Michael Thon  wrote:
>
> the root directlry of my domain is hosting wordpress, which I'm using to
develop the landing pages:
> www.zetawrite.com (I know, it still needs a lot of work).
>
> The app itself will only be available to logged in users so I thought
that the easiest way to deploy it would be to run it in a subdirectory of
the main website. Now I'm trying to do my first deployment to a staging
server.
>
> here's the project level urls.py:
>
> urlpatterns = patterns('',
> # Uncomment the admin/doc line below to enable admin documentation:
> url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
>
> # Uncomment the next line to enable the admin:
> url(r'^zetawrite/admin/', include(admin.site.urls)),
> url(r'^zetawrite/accounts/',
include('registration.backends.default.urls')),
> url(r'zetawrite/', include('sieveapp.urls')),
>
> )
>
> Eventually, If the app gets traction, I'll want to have the wordpress
landing pages and the django project running on separate servers, so I
should figure out how I can move it without changing any urls...
>
>
> On Aug 31, 2012, at 7:45 AM, Amyth Arora 
wrote:
>
> could you post the directory structure and your urls.py file. Thanks.
>
> On Fri, Aug 31, 2012 at 11:00 AM, Mike  wrote:
>>
>> Quick question: I changed my urls.py so I can run my project in a
subdirectory and I broke all the urls in my templates.  Should I be using
{% url path.to.some_view v1 v2 %} in all my templates instead of hard
coding the path?
>>
>> --
>> 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.com/d/msg/django-users/-/SV-wL8jMdCUJ.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.
>
>
>
>
> --
> Thanks & Regards
> 
>
> Amyth [Admin - Techstricks]
> Email - aroras.offic...@gmail.com, ad...@techstricks.com
> Twitter - @a_myth_
> http://techstricks.com/
>
> --
> You received this message because you are subscribed to the Google Groups
"Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.
>
>
> --
> You received this message because you are subscribed to the Google Groups
"Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.




--
Thanks & Regards


Amyth [Admin - Techstricks]
Email - aroras.offic...@gmail.com, ad...@techstricks.com
Twitter - @a_myth_
http://techstricks.com/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Upload Image and pdf file

2012-08-30 Thread Amyth Arora
Do you actually see anyfiles uploaded under static/finale if you manually
browse the folder? or is it empty ?

On Thu, Aug 30, 2012 at 7:54 PM, Dott. Tegagni Alessandro <
tefari@gmail.com> wrote:

> I have a project created with cms Django, and in this project i must
> upload a image and pdf file. the code in models.py is as follow:
> http://dpaste.com/793672/
>
>
>
> The file with this step to upload, is inserted in correct folder, but the
> file not work.
>
> In Administrator panel, when i click on image or pdf file, that i
> uploaded, the browser tell me Page not found (404). The current URL,
> home/alessandro/Scrivania/progetto/static/finale/header_blog.jpg, didn't
> match any of these.
>
> I have verifed the permission, but i have in default chmod 777.
>
> Any ideas?
>
> I have follow also this tutorial youtube:Video From 
> YtI
>  have the same code, but not result.
>
> Any Ideas? Where is my error?
>
> I can send the zip folder with the project, if you want.
>
>
> I try, also, edit the code of models.py in:
> http://dpaste.com/793673/
>
>
> but the error there is.Now, I think what I not write correctly the
> configuration in settings.py. Media_Root, Media_Url, Static_Root,
> Static_Url are empty. There parameters should not be empty, true? I
> developer in localhost (on Linux/Ubuntu), web server Apache. What should i
> write as configuration?
>
> With second link, the result is: The object albax with primary key
> u'20/static/finale/Magic_green_bus_1.jpg' not exits.
>
> But the Image file, there is in correct file.
>
> Or the Problem is in urls.py, the code is: http://dpaste.com/793124/
>
>
> Any Ideas?
>
>
>
>  --
> 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.com/d/msg/django-users/-/tb3nq6Kyux4J.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Thanks & Regards


Amyth [Admin - Techstricks]
Email - aroras.offic...@gmail.com, ad...@techstricks.com
Twitter - @a_myth_
http://techstricks.com/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: About the Django URL tag {% url %}……

2012-08-30 Thread Amyth Arora
Paste the code to your urls.py and highlight which urls are not working.

On Thu, Aug 30, 2012 at 8:07 PM, Nikolas Stevenson-Molnar <
nik.mol...@consbio.org> wrote:

> Also, your URL patters should start with "^" like your first one does.
> And unless you need the older version, I would upgrade to the latest
> stable version of Django (1.4.1) before doing anything else.
>
> _Nik
>
> On 8/29/2012 7:37 PM, Scarl wrote:
> > My python version is 2.7.2 , and django version is 1.2.7
> > I have a test just now.
> > If i put the name parameter in mysite.urls like url(r'^test/$',
> > 'testpage', name='www'), the {% url www %} can work...
> > But when I put the name parameter in mysite.myapp.urls like
> > url(r'help/$', 'testpage', name='www'), and mysite.urls is
> > url(r'test/', include(mysite.myapp.urls)). This time the {% url www %}
> > can not work!
> > Is it when I use include('mysite.myapp.urls'), the name parameter can
> > not work? And the name parameter can only in mysite.urls?
> > Can anyone help me? thx!
> > --
> > 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.com/d/msg/django-users/-/x6qNBIrfKLsJ.
> > To post to this group, send email to django-users@googlegroups.com.
> > To unsubscribe from this group, send email to
> > django-users+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> > http://groups.google.com/group/django-users?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
Thanks & Regards


Amyth [Admin - Techstricks]
Email - aroras.offic...@gmail.com, ad...@techstricks.com
Twitter - @a_myth_
http://techstricks.com/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: people.djangoproject.com broken

2012-08-30 Thread Amyth Arora
Have you tried visiting the website using a proxy ?

On Fri, Aug 31, 2012 at 12:22 AM, creecode  wrote:

> Hello Timothy,
>
> I just tried going to the login webpage and had no problem.  I'm not
> registered on that website so my experience may be somewhat different.
>
> On Thursday, August 30, 2012 10:39:24 AM UTC-7, Timothy Makobu wrote:
>
> Still having no luck. Here's a screenshot of the error, displayed about 5
>> minutes ago:
>>
>
> Are you just going to the webpage or is this error after you have tried to
> login?
>
> Are you using OpenID?  That may have something to do with it.
>
> If you are just using the "regular" login (cookie based), have you tried
> deleting the cookies related to the website from your browser?
>
> Toodle-looo.
> creecode
>
> --
> 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.com/d/msg/django-users/-/s14_SIlckdwJ.
>
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
Thanks & Regards


Amyth [Admin - Techstricks]
Email - aroras.offic...@gmail.com, ad...@techstricks.com
Twitter - @a_myth_
http://techstricks.com/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: people.djangoproject.com broken

2012-08-30 Thread Timothy Makobu
Strange. Well it does say it informed the admin of the error (see
screenshot) That stack-trace should tell the dev just what's happening.

On Fri, Aug 31, 2012 at 9:52 AM, Amyth Arora wrote:

> Have you tried visiting the website using a proxy ?
>
>
> On Fri, Aug 31, 2012 at 12:22 AM, creecode  wrote:
>
>> Hello Timothy,
>>
>> I just tried going to the login webpage and had no problem.  I'm not
>> registered on that website so my experience may be somewhat different.
>>
>> On Thursday, August 30, 2012 10:39:24 AM UTC-7, Timothy Makobu wrote:
>>
>> Still having no luck. Here's a screenshot of the error, displayed about 5
>>> minutes ago:
>>>
>>
>> Are you just going to the webpage or is this error after you have tried
>> to login?
>>
>> Are you using OpenID?  That may have something to do with it.
>>
>> If you are just using the "regular" login (cookie based), have you tried
>> deleting the cookies related to the website from your browser?
>>
>> Toodle-looo.
>> creecode
>>
>> --
>> 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.com/d/msg/django-users/-/s14_SIlckdwJ.
>>
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>
>
> --
> Thanks & Regards
> 
>
> Amyth [Admin - Techstricks]
> Email - aroras.offic...@gmail.com, ad...@techstricks.com
> Twitter - @a_myth_
> http://techstricks.com/
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.