grocking the source code

2016-04-17 Thread Becka R.
Hi, 

I'm a junior dev, and I'm trying to understand how Django works under the 
hood in order to up my skills, and hopefully, to eventually contribute. 
 I've been following the thread of functions to dissect how Modelforms 
work, but got stuck at this particular function in widgets.py.
 

class MediaDefiningClass(type):
"""
Metaclass for classes that can have media definitions.
"""
def __new__(mcs, name, bases, attrs):
new_class = super(MediaDefiningClass, mcs).__new__(mcs, name, bases, 
attrs)

if 'media' not in attrs:
new_class.media = media_property(new_class)

return new_class




Can someone help me understand its role?  It's returning a new class that 
does what?  Is mcs a reference to the Python tool? What attrs are being 
looked at, in what object, after the "if" line? There seems to be a lot of 
magic happening here, and I'd like to understand it better.

Thanks again, and LMK if there's somewhere else I should be asking about 
this sort of thing. I'd really like to help make Django more accessible to 
newer developers, and perhaps this function could have a better explanation 
in it; I'm happy to add that once I know what it does. 

Becka

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/6fb3ef14-9fdf-4f9d-b2a0-93ef8081be6f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


code.djangoproject vs docs.djangoproject

2016-03-21 Thread Becka
Hi!

I just made a ticket, and want to follow it up and fix some of the links on
the Django resources <https://code.djangoproject.com/wiki/DjangoResources>
page.  Where is the source for the code.djangoproject? Is it in the same
repo as the  Sorry if this is in the docs; I'm trying to figure out my way
around.

Thanks!

Becka

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CANOxe%2B13PH1UW0pSUYmzFFswWUWs3jGurPacn%3DMzePLK9zzo9w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


adding to documentation

2016-03-15 Thread Becka
Hi,

I'm pretty new to Django, and am hugely interested in making it easier for
folks to get into Django and to start contributing .

I had a pretty terrible time both connecting my app to Postgres, and then
deploying to Heroku, and needed a lot of help because of general
documentation missing online, or being very very hard to find.  The steps
outlined in some tutorials are hugely inaccurate, and it's impossible to
know which ones to use when starting out.

 The psycopg2 package documentation wasn't helpful enough as a manual, and
I wound up making mistakes that I wasn't able to undo or even figure out,
since I was working on my own.  I'm lucky to live in San Francisco, where
help is easy to find.

Now that I've gone through the process though, I'd like to add this to the
tutorial, as well as the steps to deploying on Heroku.  Are these within
the scope of a Django ticket?

Thanks,

Becka

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CANOxe%2B1JBcS4LW-auzp85_a%3Dko1YYKKjF8mr904c_rJsqSvPGw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: I don't understand this error - Django 1.9

2016-03-04 Thread Becka
Whoops. Wrong list.  Sorry about that.

On Fri, Mar 4, 2016 at 1:18 PM, Becka  wrote:

> Hi,
>
> I'm building a pretty basic CRUD application for a community I'm part of.
>   I'm now getting "ImportError: No module named [myappname]" when I run the
> server, and an operational error in the admin.
>
> I looked at the documentation, and followed the steps, but I'm not doing
> something correctly.  I'd like to 1) fix this, and 2) propose some changes
> to the docs to clarify this issue.
>
> My project is called "ladynerds" (We're a professional association for a
> bunch of women software engineers).
>
> Here's the documentation I'm following:
>
> https://docs.djangoproject.com/en/1.9/ref/applications/
>
> I'm using Django 1.9
>
> *Here's my file structure:*
>
> /ladynerds   (project file)
>  /ladynerds  (app)
>   __init__.py
>   models.py
>   forms.py
>   settings.py
>   urls.py
>   views.py
>   wsgi.py
>   /static
>   /templates
>
>
> *Here's what I put into ladynerds/__init__.py:*
>
>
> import apps
>
> default_app_config = 'LadyNerds.apps.LadyNerdsConfig'
>
>
> I've also tried using 'ladynerds.apps.LadyNerdsConfig'
>
>
> *Here's what I put into ladynerds/apps.py:*
>
> from django.apps import AppConfig
>
> class LadyNerdsConfig(AppConfig):
> name = "LadyNerds"
> verbose_name = "LadyNerds"
>
> *Here's my settings.py INSTALLED_APPS*
>
>
> INSTALLED_APPS = (
> 'ladynerds.apps.LadyNerdsConfig',
> 'django.contrib.admin',
> 'django.contrib.auth',
> 'django.contrib.contenttypes',
> 'django.contrib.sessions',
> 'django.contrib.messages',
> 'django.contrib.staticfiles',
> 'ladynerds'
> )
>
>
> I'm getting:  ImportError: No module named LadyNerds
>
> What am I missing?
>
> And, thanks.
>
> --Becka
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CANOxe%2B0F%3D-6PmWD1Xp%2Bnn-nE00j5ZgDV811Lh2MkDRSk%3DgAXWw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


I don't understand this error - Django 1.9

2016-03-04 Thread Becka
Hi,

I'm building a pretty basic CRUD application for a community I'm part of.
I'm now getting "ImportError: No module named [myappname]" when I run the
server, and an operational error in the admin.

I looked at the documentation, and followed the steps, but I'm not doing
something correctly.  I'd like to 1) fix this, and 2) propose some changes
to the docs to clarify this issue.

My project is called "ladynerds" (We're a professional association for a
bunch of women software engineers).

Here's the documentation I'm following:

https://docs.djangoproject.com/en/1.9/ref/applications/

I'm using Django 1.9

*Here's my file structure:*

/ladynerds   (project file)
 /ladynerds  (app)
  __init__.py
  models.py
  forms.py
  settings.py
  urls.py
  views.py
  wsgi.py
  /static
  /templates


*Here's what I put into ladynerds/__init__.py:*


import apps

default_app_config = 'LadyNerds.apps.LadyNerdsConfig'


I've also tried using 'ladynerds.apps.LadyNerdsConfig'


*Here's what I put into ladynerds/apps.py:*

from django.apps import AppConfig

class LadyNerdsConfig(AppConfig):
name = "LadyNerds"
verbose_name = "LadyNerds"

*Here's my settings.py INSTALLED_APPS*


INSTALLED_APPS = (
'ladynerds.apps.LadyNerdsConfig',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'ladynerds'
)


I'm getting:  ImportError: No module named LadyNerds

What am I missing?

And, thanks.

--Becka

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CANOxe%2B0V1K_wcMGAPJe3aiwM9iDdqC4v0qMRPeEVhsG5jvK%3DXg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


confusion about contributions

2016-03-02 Thread Becka
Hi,

I've been spending some time looking over the docs, and I'm really
interested in making them more approachable to relative n00bs like myself,
particularly when it comes to contributing to Django and the docs.

It seems like there's some conflicting information around where to look for
issues.

* There's one address <https://code.djangoproject.com/newticket> where you
need to log in, but I can't see where to sign up

* There's another url
<https://code.djangoproject.com/query?status=!closed&easy=1>where there are
some "easy pickings" tickets

Where can tickets be filed?  Where should someone starting out look for
tickets, and can they (we) open issues? I'd like to clarify what the docs
ssay about this point.

Thanks,

Becka

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CANOxe%2B2-Fz88GBq5OWhwcs7Fyk-fA4Bf-PRaNhmsRSNecm2J%2Bg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.